Open Kasaichan opened 2 years ago
If only I knew how to add a label for mobs... Of course, this is about code which goes into being a feature, but the purpose of the code is for mobs. Yet again, the mob tag would likely be designated for custom mobs exclusively.
i gotchu chief
Leaping is already a thing for hostile mobs. Slimes cover jumping as random movement Frogs in 1.19 covers this with jumping to a specified block over gaps etc
Vanilla leaping AI is just a fancy way for mobs to cross the same flat space more aggressively. Plus, afaik even with jump boost the landing point can't be controlled. Would be a lot more interesting to see mobs use leaping as a traversal tool, to close or create long distances.
to allow them to jump over gaps
Will keep this issue open to attest to the 1.19 Frogs, but Slimes, Magma Cubes and Rabbits are examples of the base AI moving with small random movements, but not jumping over gaps.
I have checked the yml files for the 12 hostile mobs, and only the Silkfang, Kuongatari, and Virinsipede have
!<minecraft:behavior.leap_at_target> jumpHeight: 0.X
. This AI is from the spider, which is a jump but it does not allow for an accurate jump from point A to point B, which is what this suggestion addresses.
With 16 days to think about this suggestion, I've done research on the gravity value of minecraft, and played an fps which had an excellent example of this AI. As a supplement to the research, I'll also bring up this video about calculating projectile destinations, which has an example for arcs, which would be relevant to this issue.
Is your feature request related to a problem?
Creating a Unique Approach to the target. Most vanilla enemies will walk at a slow and consistent pace, so avoiding them is easy. In the abyss, going straight forward with ground mobs might lead them into harm, and a general function that could work with some mobs would be to allow them to jump over gaps, like the Billabonk, Inbyo, Kuongatari, Titanjaw, and Demon Badger.
Describe the solution you'd like.
The mob will select the target or target block, and "fly" to that block with a long jump. Could be a calculation of determining the motion needed to reach the destination (including motion up to fight gravity) or a glide straight across (Blocks, Suffocation and Knockback interrupt it). The distance that mobs can use this jump ability is configurable (a Billabonk's jump distance being much less than an Inbyo).
Describe alternatives you've considered.
I'm not sure if the Splitjaw already has an ability like this, or if a relic allows for hoping down to the block, but I am aware that there won't be a mob update anytime soon. Offz's been pretty busy working with everyone, and he's the only one I know of who touches the mob coding on this server.
Agreements
Other
The agreement ensuring open issues around the idea of mob AI may be mentioned again by me in the future.