Background
FishingHook.tick() contains following logic:
if (this.onGround()) {
this.life++;
if (this.life >= 1200) {
this.discard();
return;
}
} else {
this.life = 0;
}The hook is intended to be retrieved after being on ground for 60s (1200 ticks).
This no longer works like intended, starting from version 25w18a (1.21.6 snapshot) and until now (last tested 26.3-snapshot-8).
UPDATE: This is tested and still present in release 26.3.
Expected
Following behavior is expected after reading the code:
Player uses fishing rod
Bobber lands on the ground
Bobber disappears after 60 seconds and fishing rod retrieves
This behavior is present in all versions up until 25w17a.
Actual
Player uses fishing rod
Bobber lands on the ground
Bobber stays on the ground indefinitely
This behavior is present starting from 25w18a and up until now (26.3-snapshot-8).
Notes
This change of behavior is likely explained by this diff in FishingHook.tick():
- if (!fluidState.is(FluidTags.WATER)) {
+ if (!fluidState.is(FluidTags.WATER) && !this.onGround() && this.hookedIn == null) {
this.setDeltaMovement(this.getDeltaMovement().add(0.0, -0.03, 0.0));
}
Due to this, the bobber keeps glitching out of the block and gets onGround=false, thus resetting this.life back to zero.
Steps
In the attachment you can see a recording of me performing following steps in each environment (new/actual first, old/expected second):
Reset scoreboard
Set tick rate to 2000
Activate scoreboard addition
Throw bobber
Observe results:
Expected: score stops just above 1200
Actual: score does not stop
Additional steps:
Set tick rate to 2
Activate logging of NBT
onGround stateThrow bobber
Observe results:
Expected: bobber lands and remains with
onGround=trueActual: bobber lands and fluctuates between
onGround=trueandonGround=false
Fix
- if (!fluidState.is(FluidTags.WATER) && !this.onGround() && this.hookedIn == null) {
+ if (!fluidState.is(FluidTags.WATER) && this.hookedIn == null) {
this.setDeltaMovement(this.getDeltaMovement().add(0.0, -0.03, 0.0));
}
Removing the onGround? check before applying down force, makes the bobber stick in the ground correctly and expire after 1200 ticks.
Thank you for helping us improve Minecraft! We saved your files: