mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-08 03:40:27 +01:00
Avoid recomputing palette
This commit is contained in:
parent
d93e302d2a
commit
edfcc50214
@ -265,7 +265,7 @@ final class PaletteImpl implements Palette, Cloneable {
|
|||||||
final int newValue = function.apply(x, y, z, value);
|
final int newValue = function.apply(x, y, z, value);
|
||||||
final int index = count.getPlain();
|
final int index = count.getPlain();
|
||||||
count.setPlain(index + 1);
|
count.setPlain(index + 1);
|
||||||
cache[index] = getPaletteIndex(newValue);
|
cache[index] = newValue != value ? getPaletteIndex(newValue) : value;
|
||||||
});
|
});
|
||||||
// Set values to final array
|
// Set values to final array
|
||||||
count.setPlain(0);
|
count.setPlain(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user