mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 10:57:11 +00:00
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.
This commit is contained in:
parent
02b85a0034
commit
02abf41b83
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user