SamsCreations
SamsCreations

Let's make a Moonlight Trout that only bites in rivers at night, during a full moon.

Make a file

Create plugins/SamsFishing/catches/my-fish.yml. Every file in that folder is loaded, so your fish stay apart from the defaults.

Write the fish

moonlight_trout:
  rarity: diamond
  item:
    material: SALMON
    name: "<gradient:#C9D8FF:#7C8CF2>Moonlight Trout</gradient>"
    lore:
      - "<gray>Only rises when the moon is full."
  size: "30-70"
  when:
    biomes: ["river", "frozen_river"]
    time: night
    moon: [full]
  • moonlight_trout – the id, lowercase and unique
  • rarity – bronze, silver, gold, diamond, platinum or mythic
  • material – what players without the resource pack see
  • size – in cm
  • when – where and when it bites (every option)

Add a picture (optional)

Put a 16×16 PNG at resourcepack/textures/catch/moonlight_trout.png. Tip: copy a default fish and repaint it.

Reload and test

Run /fishing reload. If something is wrong, the console says what and where.

  • /fishing give <player> catch moonlight_trout 55 – get the fish
  • /fishing here – see what can bite where you stand

It never bites?

Run /fishing here at the spot. If your fish is under "not here", a condition fails. Check the biome name (river, not River). Start with one condition and add the rest one by one.

Make it special

moonlight_trout:
  # ...everything from above...
  weight: 2                      # twice as likely as other diamond fish
  price: "150 + 4 * size"        # its own price
  message: "<#C9D8FF>The trout shimmers in your hands!"
  commands: ["eco give %player% 250"]   # when caught
  food:
    hunger: 6
    effects: ["NIGHT_VISION 120 1"]
    commands: ["say %player% ate moonlight"]   # when eaten

Next