Fixed AddBlocks (again) and simplified expression.

Herpy derpy, >> 2 is not divide by 2, and I am not sure what I was thinking with the double shift.
Dieser Commit ist enthalten in:
Albert Pham 2013-02-23 22:19:51 -08:00
Ursprung 02b85a0034
Commit 02abf41b83

Datei anzeigen

@ -119,9 +119,9 @@ public class AnvilChunk implements Chunk {
// 4 bits, so we have to divide by 2 and get the right 4 bits
if (index % 2 == 0) {
addId = (blocksAdd[section][index >> 2] >> 4) << 8;
addId = (blocksAdd[section][index / 2] & 0xF0) << 4;
} else {
addId = (blocksAdd[section][index >> 2] & 0xF) << 8;
addId = (blocksAdd[section][index / 2] & 0x0F) << 8;
}
return blocks[section][index] & 0xFF + addId;