diff --git a/src/com/wimbli/WorldBorder/BorderData.java b/src/com/wimbli/WorldBorder/BorderData.java index e941d21..a146d53 100644 --- a/src/com/wimbli/WorldBorder/BorderData.java +++ b/src/com/wimbli/WorldBorder/BorderData.java @@ -179,7 +179,7 @@ public class BorderData //these material IDs are acceptable for places to teleport player; breathable blocks and water private static LinkedHashSet acceptableBlocks = new LinkedHashSet(Arrays.asList( - new Integer[] {0, 6, 8, 9, 37, 38, 39, 40, 50, 55, 59, 63, 64, 65, 66, 68, 69, 70, 71, 72, 75, 76, 77, 83, 93, 94} + new Integer[] {0, 6, 8, 9, 37, 38, 39, 40, 50, 55, 59, 63, 64, 65, 66, 68, 69, 70, 71, 72, 75, 76, 77, 78, 83, 93, 94} )); //these material IDs are ones we don't want to drop the player onto, like cactus or lava @@ -190,11 +190,11 @@ public class BorderData // check if a particular spot consists of 2 breathable blocks over something relatively solid private boolean isSafeSpot(World world, int X, int Y, int Z) { - Integer below = (Integer)world.getBlockAt(X, Y - 1, Z).getTypeId(); - return (acceptableBlocks.contains((Integer)world.getBlockAt(X, Y, Z).getTypeId()) // target block breathable, or is water - && acceptableBlocks.contains((Integer)world.getBlockAt(X, Y + 1, Z).getTypeId()) // above target block breathable, or is water - && (!acceptableBlocks.contains(below) || below == 8 || below == 9) // below target block not breathable (probably solid), or is water - && !painfulBlocks.contains(below) // below target block not something painful + Integer below = (Integer)world.getBlockTypeIdAt(X, Y - 1, Z); + return (acceptableBlocks.contains((Integer)world.getBlockTypeIdAt(X, Y, Z)) // target block breathable, or is water + && acceptableBlocks.contains((Integer)world.getBlockTypeIdAt(X, Y + 1, Z)) // above target block breathable, or is water + && (!acceptableBlocks.contains(below) || below == 8 || below == 9) // below target block not breathable (probably solid), or is water + && !painfulBlocks.contains(below) // below target block not something painful ); } diff --git a/src/plugin.yml b/src/plugin.yml index d2984f3..2f6a9cd 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,7 +1,7 @@ name: WorldBorder author: Brettflan description: Efficient, feature-rich plugin for limiting the size of your worlds. -version: 1.2.1 +version: 1.2.2 main: com.wimbli.WorldBorder.WorldBorder commands: wborder: