-
Bug
-
Resolution: Fixed
-
1.18.2, 22w11a, 22w18a
-
None
-
Plausible
-
Mob behaviour
-
Low
When a rabbit pathfinds to a carrot block and consumes it, the MoreCarrotTicks value is set to 40 ticks.
It seems the intended behavior is that once until this value is 0 the rabbit will not be able to eat any carrots. However, because of a bug, the result is ignored.
Looking at Rabbit$RaidGardenGoal#canUse:
@Override public boolean canUse() { if (this.nextStartTick <= 0) { if (!this.rabbit.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { return false; } this.canRaid = false; this.wantsToRaid = this.rabbit.wantsMoreFood(); // If ticks == 0 this.wantsToRaid = true; } return super.canUse(); }
The result of wantsMoreFood is ignored and overridden by true.