mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-08 11:50:36 +01:00
No need to update the palette count on resize
This commit is contained in:
parent
5579415513
commit
41862c576b
@ -32,7 +32,7 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
|
|||||||
// Specific to this palette type
|
// Specific to this palette type
|
||||||
private final AdaptivePalette adaptivePalette;
|
private final AdaptivePalette adaptivePalette;
|
||||||
private int bitsPerEntry;
|
private int bitsPerEntry;
|
||||||
private int count = 0;
|
private int count;
|
||||||
|
|
||||||
private long[] values;
|
private long[] values;
|
||||||
// palette index = value
|
// palette index = value
|
||||||
@ -315,8 +315,8 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
|
|||||||
palette.valueToPaletteMap = valueToPaletteMap;
|
palette.valueToPaletteMap = valueToPaletteMap;
|
||||||
getAll(palette::set);
|
getAll(palette::set);
|
||||||
this.bitsPerEntry = palette.bitsPerEntry;
|
this.bitsPerEntry = palette.bitsPerEntry;
|
||||||
this.count = palette.count;
|
|
||||||
this.values = palette.values;
|
this.values = palette.values;
|
||||||
|
assert this.count == palette.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getPaletteIndex(int value) {
|
private int getPaletteIndex(int value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user