mirror of
https://github.com/GTNewHorizons/Hardcore-Ender-Expansion.git
synced 2026-10-25 20:22:31 +00:00
Close GUI when the block is destroyed (#40)
This commit is contained in:
1 parent
4a24bb478d
commit
a2e5b40bc9
1 file changed
+3
-1
@@ -105,7 +105,9 @@ public abstract class TileEntityAbstractInventory extends TileEntity implements
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64D;
|
||||
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this && player
|
||||
.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D)
|
||||
<= 64.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user