From 70eb27608674a4338029c491cbfef2aa9a1a02b3 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 4 Sep 2013 14:29:53 -0400 Subject: [PATCH] Fixed More Bugs Fixed a similar bug in DDTeleporter and PocketBuilder that caused things to be oriented wrong. Specifically, teleporting would orient the player wrong relative to the destination door and pockets would be oriented wrong relative to their parents. Teleporting works properly now. --- StevenDimDoors/mod_pocketDim/DDTeleporter.java | 6 +++--- StevenDimDoors/mod_pocketDim/world/PocketBuilder.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/DDTeleporter.java b/StevenDimDoors/mod_pocketDim/DDTeleporter.java index bb9ca30..97aae3f 100644 --- a/StevenDimDoors/mod_pocketDim/DDTeleporter.java +++ b/StevenDimDoors/mod_pocketDim/DDTeleporter.java @@ -142,8 +142,8 @@ public class DDTeleporter throw new IllegalStateException("The destination world should be loaded!"); } - //Check if the block at that point is actually a door - int blockID = world.getBlockId(door.getX(), door.getY(), door.getZ()); + //Check if the block below that point is actually a door + int blockID = world.getBlockId(door.getX(), door.getY() - 1, door.getZ()); if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID && blockID != properties.TransientDoorID && blockID != properties.UnstableDoorID) { @@ -152,7 +152,7 @@ public class DDTeleporter } //Return the orientation portion of its metadata - return world.getBlockMetadata(door.getX(), door.getY(), door.getZ()) & 3; + return world.getBlockMetadata(door.getX(), door.getY() - 1, door.getZ()) & 3; } public static Entity teleportEntity(Entity entity, Point4D destination) diff --git a/StevenDimDoors/mod_pocketDim/world/PocketBuilder.java b/StevenDimDoors/mod_pocketDim/world/PocketBuilder.java index 98e51a4..e8afbe0 100644 --- a/StevenDimDoors/mod_pocketDim/world/PocketBuilder.java +++ b/StevenDimDoors/mod_pocketDim/world/PocketBuilder.java @@ -227,8 +227,8 @@ public class PocketBuilder throw new IllegalStateException("The link's source world should be loaded!"); } - //Check if the block at that point is actually a door - int blockID = world.getBlockId(source.getX(), source.getY(), source.getZ()); + //Check if the block below that point is actually a door + int blockID = world.getBlockId(source.getX(), source.getY() - 1, source.getZ()); if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID && blockID != properties.TransientDoorID) { @@ -236,7 +236,7 @@ public class PocketBuilder } //Return the orientation portion of its metadata - int orientation = world.getBlockMetadata(source.getX(), source.getY(), source.getZ()) & 3; + int orientation = world.getBlockMetadata(source.getX(), source.getY() - 1, source.getZ()) & 3; return orientation; }