Fixed chest signs not working properly

Signed-off-by: Grafe <flingelfrank@hotmail.com>
This commit is contained in:
Grafe 2013-05-09 17:01:41 +02:00
parent cb663d787e
commit b7bcacf32b
2 changed files with 9 additions and 12 deletions

View File

@ -205,7 +205,6 @@ public class GameWorld {
int z = os.readInt();
Block block = gworld.world.getBlockAt(x, y, z);
gworld.checkSign(block);
}
os.close();

View File

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