@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block){
super.onNeighborBlockChange(world, x, y, z, block);
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityElevatorBase) {
TileEntityElevatorBase thisTe = (TileEntityElevatorBase)te;
if(thisTe.isCoreElevator()) {
TileEntityElevatorBase teAbove = getCoreTileEntity(world, x, y, z);
if(teAbove != null && teAbove != thisTe) {
for(int i = 0; i < thisTe.getSizeInventory(); i++) {
ItemStack item = thisTe.getStackInSlot(i);
if(item != null) {
ItemStack leftover = TileEntityHopper.func_145889_a(teAbove, item, 0);
thisTe.setInventorySlotContents(i, null);
if(leftover != null) {
EntityItem entity = new EntityItem(world, teAbove.xCoord + 0.5, teAbove.yCoord + 1.5, teAbove.zCoord + 0.5, leftover);
world.spawnEntityInWorld(entity);
}
}
}
}
}
thisTe.updateConnections();
}
TileEntityElevatorBase elevatorBase = getCoreTileEntity(world, x, y, z);
if(elevatorBase != null) elevatorBase.updateRedstoneInputLevel();
}