Make canPlayerUse consistently use this.getBlockPos()

This commit is contained in:
Mrbysco 2024-03-09 00:23:01 +01:00
parent 06ef7146e0
commit 82aaacf1d9

View file

@ -246,7 +246,7 @@ public abstract class TileEntityBase extends BlockEntity {
}
public boolean canPlayerUse(Player player) {
return player.distanceToSqr(this.getBlockPos().getX() + 0.5D, this.worldPosition.getY() + 0.5D, this.worldPosition.getZ() + 0.5D) <= 64 && !this.isRemoved() && this.level.getBlockEntity(this.worldPosition) == this;
return player.distanceToSqr(this.getBlockPos().getX() + 0.5D, this.getBlockPos().getY() + 0.5D, this.getBlockPos().getZ() + 0.5D) <= 64 && !this.isRemoved() && this.level.getBlockEntity(this.worldPosition) == this;
}
protected boolean sendUpdateWithInterval() {