From 29bbc39a1a55daa2b413cc81eea4071c4a4f177e Mon Sep 17 00:00:00 2001 From: Eoghanmc22 Date: Tue, 4 Jan 2022 10:05:55 -0500 Subject: [PATCH] improve bit logic --- .../java/net/minestom/server/instance/palette/PaletteImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/instance/palette/PaletteImpl.java b/src/main/java/net/minestom/server/instance/palette/PaletteImpl.java index 37a1fecab..c3ce194ba 100644 --- a/src/main/java/net/minestom/server/instance/palette/PaletteImpl.java +++ b/src/main/java/net/minestom/server/instance/palette/PaletteImpl.java @@ -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) {