From b7bcacf32bc72c99c508b6401b8481e835747f20 Mon Sep 17 00:00:00 2001 From: Grafe Date: Thu, 9 May 2013 17:01:41 +0200 Subject: [PATCH] Fixed chest signs not working properly Signed-off-by: Grafe --- src/com/dre/dungeonsxl/game/GameWorld.java | 1 - src/com/dre/dungeonsxl/signs/SIGNChest.java | 20 +++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/com/dre/dungeonsxl/game/GameWorld.java b/src/com/dre/dungeonsxl/game/GameWorld.java index 58841bff..10d4ea2d 100644 --- a/src/com/dre/dungeonsxl/game/GameWorld.java +++ b/src/com/dre/dungeonsxl/game/GameWorld.java @@ -205,7 +205,6 @@ public class GameWorld { int z = os.readInt(); Block block = gworld.world.getBlockAt(x, y, z); gworld.checkSign(block); - } os.close(); diff --git a/src/com/dre/dungeonsxl/signs/SIGNChest.java b/src/com/dre/dungeonsxl/signs/SIGNChest.java index 1e1465c5..fcae2bd0 100644 --- a/src/com/dre/dungeonsxl/signs/SIGNChest.java +++ b/src/com/dre/dungeonsxl/signs/SIGNChest.java @@ -24,17 +24,15 @@ public class SIGNChest extends DSign { @Override public void onInit() { - if (sign.getTypeId() == 63) { - for (int i = -1; i <= 1; i++) { - if (sign.getBlock().getRelative(i, 0, 0).getTypeId() == 54) { - new GameChest(sign.getBlock().getRelative(i, 0, 0), gworld); - } - if (sign.getBlock().getRelative(0, 0, i).getTypeId() == 54) { - new GameChest(sign.getBlock().getRelative(0, 0, i), gworld); - } - if (sign.getBlock().getRelative(0, i, 0).getTypeId() == 54) { - new GameChest(sign.getBlock().getRelative(0, i, 0), gworld); - } + for (int i = -1; i <= 1; i++) { + if (sign.getBlock().getRelative(i, 0, 0).getTypeId() == 54) { + new GameChest(sign.getBlock().getRelative(i, 0, 0), gworld); + } + if (sign.getBlock().getRelative(0, 0, i).getTypeId() == 54) { + new GameChest(sign.getBlock().getRelative(0, 0, i), gworld); + } + if (sign.getBlock().getRelative(0, i, 0).getTypeId() == 54) { + new GameChest(sign.getBlock().getRelative(0, i, 0), gworld); } }