Minecraft Data Packs / Tool

Mob Fisher - Turn Mobs Into Spawn Eggs

  • check_circle Functions
  • check_circle Predicates
  • 1,215 views, 8 today
  • 209 downloads, 1 today
  • 7
  • 4
5qb avatar 5qb
Level 8 : Apprentice Dragon
0
this is a 1.18.2 "rewrite"/touch-up of PocketMobs, an older datapack that allows you to use a fishing rod on many different kinds of mobs. this one works a little bit differently though, and it's written for my own purposes mostly, meaning it can be a bit unbalanced and unoptimized.

i wrote this in the javascript-to-datapacking framework Sandstone.

step-by-step guide:

throw a fishing rod, egg, and an ender pearl onto the same block. this creates a special fishing rod called a Mob Catcher

toss your fishing hook at passive or neutral mobs. this datapack does not let you pick up most hostile mobs and some usually-aggressive neutral mobs

a spawn egg will appear, replacing the mob. this supports NBT data - so name tags, sheep colors, tame-ness, villager occupations, and even unstacked custom mobs from other datapacks should be compatible with this one.

(by "unstacked", i mean if the custom mob consists of a single mob without hidden armor stands, bats, pigs, or what have you. if it DOES have these things, only one mob will be picked up)

the mob catcher depletes at 4x speed, meaning it can only be used 16 times before it breaks.

as mentioned in the original datapack, sometimes the lure won't catch the mob. try aiming at the mob's feet for best results, or re-casting.

usage notes (for world/server owners):

there is a predicate in this datapack's namespace called is_catchable. all mobs that can be caught and converted into spawn eggs are listed here. if you don't want players to be able to catch a certain mob, remove their condition from the big list.

if you want to add another mob to the datapack's allow-list, it's a bit more difficult. you need to add a predicate entry, but there's also a line defined in functions/catch.mcfunction that checks for a mob type, and a sub-function (big, big big folder of "execute_if"s) that summons the spawn egg.

if you want to summon a catcher without the recipe, use the command/function pf_mobfisher:_summon_catcherdon't forget the underscore after the colon (:)
CompatibilityMinecraft 1.18
toMinecraft 1.19
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome