Skip to content

Customizing Entity Fishing

Electro_593 edited this page Jul 22, 2023 · 5 revisions

Spectrum's Fishing Rods (additionally to being able fish in more than just water) use a mechanism called Entity Fishing. It does exactly what is written on the tin: when fishing in a liquid, there is a chance to lure in an entity!

You can specify which entities are fished where by placing json files in the directory <data_pack_or_mod_name>/entity_fishing/.

Properties:

  • (FluidPredicate) fluid: The fluid that can contain fishable entities (like via fluid id, or fluid tag)
  • (BiomePredicate) biome: The biomes these entities can be fished in
  • (LightPredicate) light: The block and sky light of where these entities can be fished
  • (DimensionPredicate) dimension: The dimensions these entities can be fished in
  • (MoonPhasePredicate) moon_phase: The moon phase these entities can be fished in
  • (TimeOfDayPredicate) time_of_day: The time of day that these entities can be fished
  • (WeatherPredicate) weather: The weather these entities can be fished in
  • (CommandPredicate) command: An arbitrary command to test against
  • (float) chance: The base chance to fish an entity instead of the usual loot. This value is multiplied with the "Big Catch" enchantment's level, should the fishing rod be enchanted
  • {} entries: A weighted list of entity entries that can be fished
    • (Identifier) entity: The entity that will be fished up
    • (int) weight: The relative likelihood that this entry is selected
    • (String) nbt: A standard NBT string that will applied to the entity
    • (JsonNBT) nbt: An NBT compound using Spectrum's custom JsonNBT format, which will be applied to the entity

Example: Dragonrot

{
  "fluid": {
    "tag": "spectrum:dragonrot"
  },
  "chance": 0.5,
  "entities": [
    {
      "id": "minecraft:pufferfish",
      "weight": 10
    },
    {
      "id": "minecraft:creeper",
      "weight": 5,
      "nbt": {
        "powered": true
      }
    },
    {
      "id": "minecraft:cod",
      "weight": 2
    },
    {
      "id": "minecraft:salmon",
      "weight": 2
    }
  ]
}
Clone this wiki locally