3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01: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.
Dieser Commit ist enthalten in:
Wizjany 2015-07-17 04:48:09 -04:00
Ursprung a28acdd6a8
Commit 2aad68f80d

Datei anzeigen

@ -241,7 +241,14 @@ public final class BlockData {
return ((data + 1) & 0x3) | (data & ~0x3); return ((data + 1) & 0x3) | (data & ~0x3);
case BlockID.ANVIL: 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: case BlockID.BED:
return data & ~0x3 | (data + 1) & 0x3; return data & ~0x3 | (data + 1) & 0x3;
@ -471,7 +478,14 @@ public final class BlockData {
return ((data + 3) & 0x3) | (data & ~0x3); return ((data + 3) & 0x3) | (data & ~0x3);
case BlockID.ANVIL: 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: case BlockID.BED:
return data & ~0x3 | (data - 1) & 0x3; return data & ~0x3 | (data - 1) & 0x3;