diff --git a/tile/AEBaseTile.java b/tile/AEBaseTile.java index 969da396..01dba94b 100644 --- a/tile/AEBaseTile.java +++ b/tile/AEBaseTile.java @@ -48,6 +48,11 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, public int renderFragment = 0; public String customName; + public boolean notLoaded() + { + return !worldObj.blockExists( xCoord, yCoord, zCoord ); + } + public TileEntity getTile() { return this; diff --git a/tile/crafting/TileCraftingStorageTile.java b/tile/crafting/TileCraftingStorageTile.java index 520c2752..f4ef9c0f 100644 --- a/tile/crafting/TileCraftingStorageTile.java +++ b/tile/crafting/TileCraftingStorageTile.java @@ -37,7 +37,7 @@ public class TileCraftingStorageTile extends TileCraftingTile public int getStorageBytes() { - if ( worldObj == null ) + if ( worldObj == null || notLoaded() ) return 0; switch (worldObj.getBlockMetadata( xCoord, yCoord, zCoord ) & 3) diff --git a/tile/crafting/TileCraftingTile.java b/tile/crafting/TileCraftingTile.java index 4150feb6..65b62891 100644 --- a/tile/crafting/TileCraftingTile.java +++ b/tile/crafting/TileCraftingTile.java @@ -154,6 +154,9 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP public void updateMeta(boolean updateFormed) { + if ( worldObj == null || notLoaded() ) + return; + boolean formed = isFormed(); boolean power = false; diff --git a/tile/networking/TileEnergyCell.java b/tile/networking/TileEnergyCell.java index a3ef4063..4aa143dd 100644 --- a/tile/networking/TileEnergyCell.java +++ b/tile/networking/TileEnergyCell.java @@ -31,6 +31,9 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage private void changePowerLevel() { + if ( notLoaded() ) + return; + byte leel = (byte) (8.0 * (internalCurrentPower / internalMaxPower)); if ( leel > 7 )