Err too much.

This commit is contained in:
AlgorithmX2
2014-01-20 10:41:37 -06:00
parent 5652ec30ec
commit 834e9c04c5
159 changed files with 7953 additions and 1541 deletions
+15 -1
View File
@@ -3,6 +3,7 @@ package appeng.parts.automation;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import appeng.api.config.RedstoneMode;
import appeng.api.config.Upgrades;
import appeng.api.networking.IGridNode;
@@ -17,6 +18,19 @@ import appeng.util.Platform;
public abstract class PartSharedItemBus extends PartUpgradeable implements IGridTickable
{
private TileEntity getBlockTileEntity(TileEntity self, int x, int y, int z)
{
World w = self.worldObj;
if ( w.getChunkProvider().chunkExists( x >> 4, z >> 4 ) )
{
TileEntity te = w.getBlockTileEntity( x, y, z );
return te;
}
return null;
}
public PartSharedItemBus(Class c, ItemStack is) {
super( c, is );
}
@@ -57,7 +71,7 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
cached = true;
TileEntity self = getHost().getTile();
TileEntity target = self.worldObj.getBlockTileEntity( self.xCoord + side.offsetX, self.yCoord + side.offsetY, self.zCoord + side.offsetZ );
TileEntity target = getBlockTileEntity( self, self.xCoord + side.offsetX, self.yCoord + side.offsetY, self.zCoord + side.offsetZ );
int newAdaptorHash = Platform.generateTileHash( target );