Prevent guis/containers from staying open after the TEs block is unloaded. Fixes #4976

This commit is contained in:
Thiakil committed 2018-04-26 12:09:06 +08:00
1 parent 8e1f0e544b
commit a71d95aa8d
1 file changed
+1 -1
@@ -161,7 +161,7 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl
@Override
public boolean isUsableByPlayer(EntityPlayer entityplayer)
{
return !isInvalid();
return !isInvalid() && this.world.isBlockLoaded(this.pos);//prevent Containers from remaining valid after the chunk has unloaded;
}
@Override