mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix BlockData causing unit test to fail
Yes, even though north/south and south/north anvils LOOK the same, they are in fact different data values.
This commit is contained in:
parent
a28acdd6a8
commit
2aad68f80d
@ -241,7 +241,14 @@ public final class BlockData {
|
||||
return ((data + 1) & 0x3) | (data & ~0x3);
|
||||
|
||||
case BlockID.ANVIL:
|
||||
return data ^ 0x1;
|
||||
int damage = data & 0x4;
|
||||
switch (data & ~0x4) {
|
||||
case 0: return 3 | damage;
|
||||
case 2: return 1 | damage;
|
||||
case 1: return 0 | damage;
|
||||
case 3: return 2 | damage;
|
||||
}
|
||||
break;
|
||||
|
||||
case BlockID.BED:
|
||||
return data & ~0x3 | (data + 1) & 0x3;
|
||||
@ -471,7 +478,14 @@ public final class BlockData {
|
||||
return ((data + 3) & 0x3) | (data & ~0x3);
|
||||
|
||||
case BlockID.ANVIL:
|
||||
return data ^ 0x1;
|
||||
int damage = data & 0x4;
|
||||
switch (data & ~0x4) {
|
||||
case 0: return 1 | damage;
|
||||
case 2: return 3 | damage;
|
||||
case 1: return 0 | damage;
|
||||
case 3: return 2 | damage;
|
||||
}
|
||||
break;
|
||||
|
||||
case BlockID.BED:
|
||||
return data & ~0x3 | (data - 1) & 0x3;
|
||||
|
Loading…
Reference in New Issue
Block a user