Changed SIGNChest to recognise top and bottom chest

Signed-off-by: Grafe <flingelfrank@hotmail.com>
This commit is contained in:
Grafe 2013-05-09 16:34:10 +02:00
parent 746e3347c6
commit cb663d787e

View File

@ -25,17 +25,15 @@ public class SIGNChest extends DSign {
@Override @Override
public void onInit() { public void onInit() {
if (sign.getTypeId() == 63) { if (sign.getTypeId() == 63) {
for (int x = -1; x <= 1; x++) { for (int i = -1; i <= 1; i++) {
if (sign.getBlock().getRelative(x, 0, 0).getTypeId() == 54) { if (sign.getBlock().getRelative(i, 0, 0).getTypeId() == 54) {
new GameChest(sign.getBlock().getRelative(x, 0, 0), gworld); 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) {
for (int z = -1; z <= 1; z++) { new GameChest(sign.getBlock().getRelative(0, i, 0), gworld);
if (sign.getBlock().getRelative(0, 0, z).getTypeId() == 54) {
if (sign.getBlock().getRelative(0, 0, z) != null) {
new GameChest(sign.getBlock().getRelative(0, 0, z), gworld);
}
} }
} }
} }