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; }