From 41862c576b10306d50106b831e9985dfb5702e40 Mon Sep 17 00:00:00 2001 From: themode Date: Sun, 27 Feb 2022 01:14:57 +0100 Subject: [PATCH] No need to update the palette count on resize --- .../net/minestom/server/instance/palette/FlexiblePalette.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/instance/palette/FlexiblePalette.java b/src/main/java/net/minestom/server/instance/palette/FlexiblePalette.java index 9d5703c66..e09970fc6 100644 --- a/src/main/java/net/minestom/server/instance/palette/FlexiblePalette.java +++ b/src/main/java/net/minestom/server/instance/palette/FlexiblePalette.java @@ -32,7 +32,7 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable { // Specific to this palette type private final AdaptivePalette adaptivePalette; private int bitsPerEntry; - private int count = 0; + private int count; private long[] values; // palette index = value @@ -315,8 +315,8 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable { palette.valueToPaletteMap = valueToPaletteMap; getAll(palette::set); this.bitsPerEntry = palette.bitsPerEntry; - this.count = palette.count; this.values = palette.values; + assert this.count == palette.count; } private int getPaletteIndex(int value) {