Don't fire entitymovevent for players. (#6402)

This commit is contained in:
Noah van der Aa 2021-08-15 19:37:42 +02:00
parent f217b15bbf
commit f9143cf9ec

View file

@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.pushEntities();
this.level.getProfiler().pop();
+ // Paper start
+ if (((ServerLevel) this.level).hasEntityMoveEvent) {
+ if (((ServerLevel) this.level).hasEntityMoveEvent && !(this instanceof net.minecraft.world.entity.player.Player)) {
+ if (this.xo != getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
+ Location from = new Location(this.level.getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
+ Location to = new Location (this.level.getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());