Fixes #3296: Prevent invalid TileEntites from updating their block. (#3301)

Updating the blockstate of invalid TEs will cause Forge to restore the
block including the TE leading to invalid TEs sticking around after
being moved.
This commit is contained in:
yueh
2017-12-31 13:06:18 +01:00
committed by GitHub
parent 45878df17d
commit a7a65ae39d
3 changed files with 3 additions and 3 deletions
@@ -74,7 +74,7 @@ public class TileCraftingStorageTile extends TileCraftingTile
@Override @Override
public int getStorageBytes() public int getStorageBytes()
{ {
if( this.world == null || this.notLoaded() ) if( this.world == null || this.notLoaded() || this.isInvalid() )
{ {
return 0; return 0;
} }
@@ -143,7 +143,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
public void updateMeta( final boolean updateFormed ) public void updateMeta( final boolean updateFormed )
{ {
if( this.world == null || this.notLoaded() ) if( this.world == null || this.notLoaded() || this.isInvalid() )
{ {
return; return;
} }
@@ -84,7 +84,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
private void changePowerLevel() private void changePowerLevel()
{ {
if( this.notLoaded() ) if( this.notLoaded() || this.isInvalid() )
{ {
return; return;
} }