From d93e302d2a83cb9ac93b1da8d81e8d5419e00659 Mon Sep 17 00:00:00 2001 From: themode Date: Thu, 6 Jan 2022 08:25:22 +0100 Subject: [PATCH] Avoid memory barrier on replace --- .../java/net/minestom/server/instance/palette/PaletteImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3f3c8375a..fdbc14e86 100644 --- a/src/main/java/net/minestom/server/instance/palette/PaletteImpl.java +++ b/src/main/java/net/minestom/server/instance/palette/PaletteImpl.java @@ -268,7 +268,7 @@ final class PaletteImpl implements Palette, Cloneable { cache[index] = getPaletteIndex(newValue); }); // Set values to final array - count.set(0); + count.setPlain(0); setAll((x, y, z) -> { final int index = count.getPlain(); count.setPlain(index + 1);