tileEntity = this.tileEntities.get(i);
tileEntity.zCoord = this.length - 1 - tileEntity.zCoord;
tileEntity.blockMetadata = this.metadata[tileEntity.xCoord][tileEntity.yCoord][tileEntity.zCoord];
if (tileEntity instanceof TileEntitySkull && tileEntity.blockMetadata == 0x1) {
TileEntitySkull skullTileEntity = (TileEntitySkull) tileEntity;
int angle = skullTileEntity.func_82119_b();
int base = 0;
if (angle <= 7) {
base = 4;
} else {
base = 12;
}
skullTileEntity.setSkullRotation((2 * base - angle) & 15);
}
}
refreshChests();
}