improve bit logic

This commit is contained in:
Eoghanmc22 2022-01-04 10:05:55 -05:00 committed by TheMode
parent 3aeb0690d8
commit 29bbc39a1a

View File

@ -127,8 +127,7 @@ final class PaletteImpl implements Palette, Cloneable {
final boolean currentAir = oldBlock == 0;
final long indexClear = clear << bitIndex;
block |= indexClear;
block ^= indexClear;
block &= ~indexClear;
block |= (long) value << bitIndex;
if (currentAir != placedAir) {