3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Added rotation support to redstone repeaters.

Dieser Commit ist enthalten in:
sk89q 2011-06-03 22:51:42 -07:00
Ursprung e62015c0b8
Commit d397460026

Datei anzeigen

@ -115,6 +115,16 @@ public final class BlockData {
case 2: return 3;
case 3: return 0;
}
} else if (type == BlockID.REDSTONE_REPEATER_OFF
|| type == BlockID.REDSTONE_REPEATER_ON) {
int dir = data & 0x03;
int delay = data - dir;
switch (dir) {
case 0: return 1 | delay;
case 1: return 2 | delay;
case 2: return 3 | delay;
case 3: return 0 | delay;
}
} else if (type == BlockID.TRAP_DOOR) {
int open = data & 0x4;
int withoutOpen = data ^ 0x4;
@ -223,6 +233,16 @@ public final class BlockData {
case 3: return 2;
case 0: return 3;
}
} else if (type == BlockID.REDSTONE_REPEATER_OFF
|| type == BlockID.REDSTONE_REPEATER_ON) {
int dir = data & 0x03;
int delay = data ^ 0x03;
switch (dir) {
case 1: return 0 | delay;
case 2: return 1 | delay;
case 3: return 2 | delay;
case 0: return 3 | delay;
}
} else if (type == BlockID.TRAP_DOOR) {
int open = data & 0x4;
int withoutOpen = data ^ 0x4;