Rabbit Pathfinding Fixed
ModFixes rabbit pathfinding efficiently
Description
Fixes rabbit pathfinding efficiently.
As of 1.21.1 there are multiple problems with rabbit pathfinding:
Basic pathfinding
- The calculation of the jump height/velocity is incorrect and poorly implemented.
This results in too small jumps for climbing over a block. - Rabbits "stall" (no horizontal movement) during jumps - due to this they just jump upwards in the same place when trying to climb a block.
This behavior is caused byRabbitMoveControlwhich only sets the (horizontal) speed correctly during movement but not while jumping. - Rabbits are stuck / try to wander around forever.
- The root cause is that
EntityNavigationsets its timeouts based on movement speed.
If the movement speed is 0 (this is the case when a rabbit/mob is "stuck"), the timeout is also 0... and if the timeout is 0 it's ignored and therefore it's executed forever (or until interrupted by something external like another goal). - Rabbits only have a single goal when idle:
WanderAround(Far). Most other entities also useLookAroundGoal.
Thus the above mentioned infinite navigation is never stopped in favor of executing another goal like in most other mobs. RabbitMoveControl#tickconstantly updates the rabbits speed (RabbitEntity#setSpeed).
While doing this it also indirectly executesmoveControl#moveTothus the rabbit always tries to reach it's last target even when it shouldn't do that.
- The root cause is that
As of
1.21.4/24w46aMC-150224 was fixed, correcting the jump height (1) and fixing the stall (2).
However all other parts - including optimizations and sanity checks in above mentioned fixes - are still missing.
Eating carrot crops
- Rabbits can't reach the crops and always stop one block short of them.
This is due to selecting the incorrect distance from the crop block (it's1but should be0). - Rabbits eat the crop instantly even while still jumping and being in the air.
- The goal/behavior is immediately aborted (after a few ticks - when a target crop block was selected) due to incorrect implementation of
shouldContinueandisTargetPosmethods.
Other fixes
- The client-side rotation of Adults rabbit's head is most of the time slightly upwards - MC-306682 affects 26.1 or later
Detailed video comparisons are also available.
Compatibility
Mod Loaders
Game Versions
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Screenshots
Similar Mods
Pommel - Held Item Models
Allows resource pack creators to overwrite the models for held items just like the spyglass and trident
Heart Crystals
increase your hearts perminently with heart crystals found underground
Wilds
Welcome to Wilds! A mod that aims to improve the vanilla biomes with all kinds of mobs, blocks, mechanics and world gene...
More Respawn Anchors
A simple mod that adds more Respawn Anchors to the game.
Cobblemon: Parting Gifts
This addon mod to Cobblemon adds a highly configurable Reward system for releasing Pokemon. Inspired by the mechanic in...
Craft Slabs Back into Blocks [Fabric/Forge/NeoForge]
A fully configurable mod that lets you craft slabs back into blocks
Included in Modpacks (15)
Elysium Days
Sensible MC
MC Rebalanced
Vanilla QOL Improved
Simplicity Refabricated: Vanilla+
Beta Decay
BLACK_MC optimization
Lurker in the Fog: Herobrine’s Dominion
Sengoku Chronicles
Refabricated Beta
Refabricated Villagers: Vanilla+
Revision
Expanded Adventures: Vanilla+
Teushitties Revenge 3D: Dorfeldt Fucking Dies
CRINGELAND - a Vanilla+