mojira.dev
MC-313689

Fishing rod's bob position desyncs when in water

When fishing rod’s bob is in water, the server and client disagrees on its position.

Analysis based on the decompiled FishingHook#tick method, comments added by me:

if (this.currentState == FishingHook.FishHookState.BOBBING) {
   Vec3 movement = this.getDeltaMovement();
   double force = this.getY() + movement.y - blockPos.getY() - liquidHeight;
   if (Math.abs(force) < 0.01) {
	  force += Math.signum(force) * 0.1;
   }

   // Usage of random instead of the syncronizedRandom.
   this.setDeltaMovement(movement.x * 0.9, movement.y - force * this.random.nextFloat() * 0.2, movement.z * 0.9);

Comments 0

No comments.

isokissa3

(Unassigned)

Unconfirmed

26.3, 26.4 Pre-Release 2

Retrieved