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
.
Comments 0
No comments.