Experience Orbs temporarily desync after bouncing on lava.
This has been an issue for quite a while, but is very easy to see with the new debug flags.
Steps to Reproduce
Add
-DMC_DEBUG_ENABLEDand-DMC_DEBUG_SHOW_LOCAL_SERVER_ENTITY_HIT_BOXESto your JVM arguments in the launcherCreate a pool of lava
Spawn experience orbs on one side of it
Use their attraction of players to lure them into the lava
Expected Result
The orbs will not desync and jump around.
Actual Result
The orbs desync and jump around. See attached video.
Code Analysis
This is caused by experience orbs running non-deterministic movement code on both the client and server. Each side moves to a different location, temporarily desynchronizing them. When they next sync, the orb jumps to the correct location.
if (this.level().getFluidState(this.blockPosition()).is(FluidTags.LAVA)) {
this.setDeltaMovement((this.random.nextFloat() - this.random.nextFloat()) * 0.2F, 0.2F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
}Linked issues
Attachments
Comments 0
No comments.