mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Fix warning
This commit is contained in:
parent
fceafb0b1e
commit
266ecd5b64
@ -105,7 +105,7 @@ public final class Palette implements PublicCloneable<Palette> {
|
|||||||
|
|
||||||
if (currentAir != placedAir) {
|
if (currentAir != placedAir) {
|
||||||
// Block count changed
|
// Block count changed
|
||||||
this.blockCount += currentAir ? 1 : -1;
|
this.blockCount += (short) (currentAir ? 1 : -1);
|
||||||
}
|
}
|
||||||
blocks[index] = block;
|
blocks[index] = block;
|
||||||
}
|
}
|
||||||
@ -225,8 +225,8 @@ public final class Palette implements PublicCloneable<Palette> {
|
|||||||
if (!hasPalette) {
|
if (!hasPalette) {
|
||||||
return blockId;
|
return blockId;
|
||||||
}
|
}
|
||||||
final short value = blockPaletteMap.getOrDefault(blockId, (short)-1);
|
final short value = blockPaletteMap.getOrDefault(blockId, (short) -1);
|
||||||
if(value == -1){
|
if (value == -1) {
|
||||||
// Resize the palette if full
|
// Resize the palette if full
|
||||||
if (paletteBlockMap.size() >= getMaxPaletteSize()) {
|
if (paletteBlockMap.size() >= getMaxPaletteSize()) {
|
||||||
resize(bitsPerEntry + bitsIncrement);
|
resize(bitsPerEntry + bitsIncrement);
|
||||||
|
Loading…
Reference in New Issue
Block a user