if (RedstoneControlHelper.hasRSControl(stack)) {
((IRedstoneControl) tile).setControl(RedstoneControlHelper.getControl(stack));
}
}
if (tile instanceof IReconfigurableFacing) {
IReconfigurableFacing reconfig = (IReconfigurableFacing) tile;
int quadrant = MathHelper.floor(living.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if (reconfig.allowYAxisFacing()) {
quadrant = living.rotationPitch > 60 ? 4 : living.rotationPitch < -60 ? 5 : quadrant;
}
switch (quadrant) {
case 0:
reconfig.setFacing(2);
return;
case 1:
reconfig.setFacing(5);
return;
case 2:
reconfig.setFacing(3);
return;
case 3:
reconfig.setFacing(4);
return;
case 4:
reconfig.setFacing(1);
return;
case 5:
reconfig.setFacing(0);
return;
}
}
if (tile instanceof TileCoFHBase) {
((TileCoFHBase) tile).onNeighborBlockChange();