Made trapdoors rotatable.

Dieser Commit ist enthalten in:
sk89q 2011-05-31 19:43:48 -07:00
Ursprung f9aa5910f2
Commit 438a33cc0d

Datei anzeigen

@ -115,6 +115,15 @@ public final class BlockData {
case 2: return 3;
case 3: return 0;
}
} else if (type == BlockID.TRAP_DOOR) {
int open = data & 0x4;
int withoutOpen = data ^ 0x4;
switch (withoutOpen) {
case 0: return 3 | open;
case 1: return 2 | open;
case 2: return 0 | open;
case 3: return 1 | open;
}
}
return data;
@ -214,6 +223,15 @@ public final class BlockData {
case 3: return 2;
case 0: return 3;
}
} else if (type == BlockID.TRAP_DOOR) {
int open = data & 0x4;
int withoutOpen = data ^ 0x4;
switch (withoutOpen) {
case 3: return 9 | open;
case 2: return 1 | open;
case 0: return 2 | open;
case 1: return 3 | open;
}
}
return data;