mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Added rotation support to redstone repeaters.
This commit is contained in:
parent
e62015c0b8
commit
d397460026
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user