diff --git a/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java b/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java index 82dd566..f0e1731 100644 --- a/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java @@ -200,7 +200,7 @@ public class ZoneVolumeMapper { } } else if (diskBlockType == Material.WOODEN_DOOR.getId() || diskBlockType == Material.IRON_DOOR_BLOCK.getId()) { // Door blocks - + if (j - 1 > 0) { Block blockBelow = world.getBlockAt(x, y - 1, z); boolean belowIsGlass = blockBelow.getTypeId() == Material.GLASS.getId(); @@ -209,9 +209,9 @@ public class ZoneVolumeMapper { if (belowIsGlass) { // Top door block. Set both it and the block below as door. blockBelow.setType(Material.getMaterial(diskBlockType)); - blockBelow.setData(diskBlockData); + blockBelow.setData((byte)(diskBlockData & ~((byte)8))); // turn off 8 bit for bottom door worldBlock.setType(Material.getMaterial(diskBlockType)); - worldBlock.setData(diskBlockData); + worldBlock.setData(diskBlockData); } else { worldBlock.setType(Material.GLASS); } @@ -243,7 +243,7 @@ public class ZoneVolumeMapper { x++; } if (!deferred.isEmpty()) { - War.war.getServer().getScheduler().scheduleSyncDelayedTask(War.war, deferred, 1); + War.war.getServer().getScheduler().scheduleSyncDelayedTask(War.war, deferred, 2); } } } catch (FileNotFoundException e) { diff --git a/war/src/main/java/com/tommytony/war/volumes/Volume.java b/war/src/main/java/com/tommytony/war/volumes/Volume.java index 1af4790..5ab8130 100644 --- a/war/src/main/java/com/tommytony/war/volumes/Volume.java +++ b/war/src/main/java/com/tommytony/war/volumes/Volume.java @@ -241,11 +241,13 @@ public class Volume { // Check if is bottom door block if (j + 1 < this.getSizeY() && this.getBlockTypes()[i][j + 1][k] == oldBlockType) { // set both door blocks right away - currentBlock.setType(Material.getMaterial(oldBlockType)); - currentBlock.setData(oldBlockData); + Block blockAbove = this.getWorld().getBlockAt(x, y + 1, z); blockAbove.setType(Material.getMaterial(oldBlockType)); blockAbove.setData(this.getBlockDatas()[i][j + 1][k]); + + currentBlock.setType(Material.getMaterial(oldBlockType)); + currentBlock.setData(oldBlockData); } } else if (((oldBlockType == Material.TORCH.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.REDSTONE_TORCH_OFF.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.REDSTONE_TORCH_ON.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.LEVER.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.STONE_BUTTON.getId() && ((oldBlockData & 0x02) == 0x02)) || (oldBlockType == Material.LADDER.getId() && ((oldBlockData & 0x04) == 0x04)) || (oldBlockType == Material.RAILS.getId() && ((oldBlockData & 0x02) == 0x02))) && i + 1 != this.getSizeX()) { // Blocks that hang on a block south of themselves need to make sure that block is there before placing themselves... lol