From 266ecd5b64c5ead2bc9fd5ef4db3ef16ec0ae617 Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 21 Jul 2021 20:06:12 +0200 Subject: [PATCH] Fix warning --- .../java/net/minestom/server/instance/palette/Palette.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minestom/server/instance/palette/Palette.java b/src/main/java/net/minestom/server/instance/palette/Palette.java index 1238165d8..906e08756 100644 --- a/src/main/java/net/minestom/server/instance/palette/Palette.java +++ b/src/main/java/net/minestom/server/instance/palette/Palette.java @@ -105,7 +105,7 @@ public final class Palette implements PublicCloneable { if (currentAir != placedAir) { // Block count changed - this.blockCount += currentAir ? 1 : -1; + this.blockCount += (short) (currentAir ? 1 : -1); } blocks[index] = block; } @@ -225,8 +225,8 @@ public final class Palette implements PublicCloneable { if (!hasPalette) { return blockId; } - final short value = blockPaletteMap.getOrDefault(blockId, (short)-1); - if(value == -1){ + final short value = blockPaletteMap.getOrDefault(blockId, (short) -1); + if (value == -1) { // Resize the palette if full if (paletteBlockMap.size() >= getMaxPaletteSize()) { resize(bitsPerEntry + bitsIncrement);