Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Added rotation support to redstone repeaters.
Dieser Commit ist enthalten in:
Ursprung
e62015c0b8
Commit
d397460026
@ -115,6 +115,16 @@ public final class BlockData {
|
|||||||
case 2: return 3;
|
case 2: return 3;
|
||||||
case 3: return 0;
|
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) {
|
} else if (type == BlockID.TRAP_DOOR) {
|
||||||
int open = data & 0x4;
|
int open = data & 0x4;
|
||||||
int withoutOpen = data ^ 0x4;
|
int withoutOpen = data ^ 0x4;
|
||||||
@ -223,6 +233,16 @@ public final class BlockData {
|
|||||||
case 3: return 2;
|
case 3: return 2;
|
||||||
case 0: return 3;
|
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) {
|
} else if (type == BlockID.TRAP_DOOR) {
|
||||||
int open = data & 0x4;
|
int open = data & 0x4;
|
||||||
int withoutOpen = data ^ 0x4;
|
int withoutOpen = data ^ 0x4;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren