Fixed Various Bugs #83

Merged
SenseiKiwi merged 4 commits from rewrite into DevBranch 2013-09-05 05:48:01 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 70eb276086 - Show all commits

View File

@@ -142,8 +142,8 @@ public class DDTeleporter
throw new IllegalStateException("The destination world should be loaded!"); throw new IllegalStateException("The destination world should be loaded!");
} }
//Check if the block at that point is actually a door //Check if the block below that point is actually a door
int blockID = world.getBlockId(door.getX(), door.getY(), door.getZ()); int blockID = world.getBlockId(door.getX(), door.getY() - 1, door.getZ());
if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID && if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID &&
blockID != properties.TransientDoorID && blockID != properties.UnstableDoorID) blockID != properties.TransientDoorID && blockID != properties.UnstableDoorID)
{ {
@@ -152,7 +152,7 @@ public class DDTeleporter
} }
//Return the orientation portion of its metadata //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) public static Entity teleportEntity(Entity entity, Point4D destination)

View File

@@ -227,8 +227,8 @@ public class PocketBuilder
throw new IllegalStateException("The link's source world should be loaded!"); throw new IllegalStateException("The link's source world should be loaded!");
} }
//Check if the block at that point is actually a door //Check if the block below that point is actually a door
int blockID = world.getBlockId(source.getX(), source.getY(), source.getZ()); int blockID = world.getBlockId(source.getX(), source.getY() - 1, source.getZ());
if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID && if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID &&
blockID != properties.TransientDoorID) blockID != properties.TransientDoorID)
{ {
@@ -236,7 +236,7 @@ public class PocketBuilder
} }
//Return the orientation portion of its metadata //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; return orientation;
} }