diff --git a/src/main/java/com/zixiken/dimdoors/client/RenderDimDoor.java b/src/main/java/com/zixiken/dimdoors/client/RenderDimDoor.java index d4f27640..5a63c138 100644 --- a/src/main/java/com/zixiken/dimdoors/client/RenderDimDoor.java +++ b/src/main/java/com/zixiken/dimdoors/client/RenderDimDoor.java @@ -69,7 +69,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer GlStateManager.texGen(GlStateManager.TexGen.R, GL11.GL_OBJECT_LINEAR); GlStateManager.texGen(GlStateManager.TexGen.Q, GL11.GL_OBJECT_LINEAR); - EnumFacing orientation = EnumFacing.getHorizontal((tile.orientation.getHorizontalIndex() % 4) + 4); + EnumFacing orientation = tile.orientation.rotateYCCW(); switch (orientation) { case SOUTH: @@ -121,7 +121,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer float[] color = tile.getRenderColor(rand); GlStateManager.color(color[0] * var17, color[1] * var17, color[2] * var17, color[3]); - switch (tile.orientation) { + switch (orientation) { case SOUTH: worldRenderer.pos(x + .01, y - 1, z).endVertex(); worldRenderer.pos(x + .01, y - 1, z + 1.0D).endVertex(); diff --git a/src/main/java/com/zixiken/dimdoors/shared/DDProxyCommon.java b/src/main/java/com/zixiken/dimdoors/shared/DDProxyCommon.java index 0df87e0a..5e8221d3 100644 --- a/src/main/java/com/zixiken/dimdoors/shared/DDProxyCommon.java +++ b/src/main/java/com/zixiken/dimdoors/shared/DDProxyCommon.java @@ -57,7 +57,7 @@ public abstract class DDProxyCommon implements IDDProxy { TileEntityDimDoor dimTile = (TileEntityDimDoor) tile; IBlockState state = world.getBlockState(pos.down()); dimTile.orientation = state.getBlock() instanceof BlockDimDoorBase - ? state.getValue(BlockDoor.FACING).rotateY() //@todo the rotateY here is very counter intuitive but seems needed for the render? + ? state.getValue(BlockDoor.FACING).getOpposite() : ModBlocks.blockDimDoor.getDefaultState().getValue(BlockDoor.FACING); dimTile.doorIsOpen = door.isDoorOnRift(world, pos) && door.isUpperDoorBlock(world.getBlockState(pos)); dimTile.lockStatus = 0; //@todo