Fall back to a sensible facing direction

Fall back to a sensible facing direction when there is no tileEntity.
This e.g. happens when a facade is painted as machine. Facing down won't
really render nicely---down is not a valid rotation for machines.
This commit is contained in:
HenryLoenwind committed 2015-10-23 23:45:22 +02:00
1 parent 3a4094285a
commit 1a0247b4a5
1 file changed
+1 -1
@@ -159,7 +159,7 @@ public abstract class AbstractMachineBlock<T extends AbstractMachineEntity> exte
// used to render the block in the world
TileEntity te = world.getTileEntity(x, y, z);
int facing = 0;
int facing = 3;
if(te instanceof AbstractMachineEntity) {
AbstractMachineEntity me = (AbstractMachineEntity) te;
facing = me.facing;