Fixed firing of on_move event event after no change in position. (#1284)
This commit is contained in:
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"))
|
@Inject(method = "setPos", at = @At("TAIL"))
|
||||||
private void secondPos(CallbackInfo ci)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user