Fixed firing of on_move event event after no change in position. (#1284)

This commit is contained in:
Ghoulboy authored and GitHub committed 2022-01-23 22:46:32 +01:00
1 parent ad0bbfbce7
commit a1a2488bc3
1 file changed
+2 -1
@@ -94,6 +94,7 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
@Inject(method = "setPos", at = @At("TAIL"))
private void secondPos(CallbackInfo ci)
{
events.onEvent(EntityEventsGroup.Event.ON_MOVE, motion, pos1, this.pos);
if(pos1!=this.pos)
events.onEvent(EntityEventsGroup.Event.ON_MOVE, motion, pos1, this.pos);
}
}