Fix warning

This commit is contained in:
TheMode 2021-07-21 20:06:12 +02:00
parent fceafb0b1e
commit 266ecd5b64

View File

@ -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);