No more suffocating in walls

-Fixed teleportation deplacement placing players next to the door
instead of in front of them, without breaking the rendering of the
doors' "portals".
This commit is contained in:
Mathijs Riezebos 2017-05-14 17:39:00 +02:00
parent a56fded267
commit ab4257bdd8
2 changed files with 3 additions and 3 deletions

View file

@ -69,7 +69,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer<TileEntityDimDoor>
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<TileEntityDimDoor>
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();

View file

@ -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