- check_circle Functions
- check_circle Predicates
Published Apr 12th, 2022, 4/12/22 5:23 am
- 3,356 views, 2 today
- 421 downloads, 0 today
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.
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.
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
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 Catchertoss 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_catcher
don't forget the underscore after the colon (:)Compatibility | Minecraft 1.18 |
to | Minecraft 1.19 |
Tags |
5546571
119
Create an account or sign in to comment.