implements PLN-0085

This commit is contained in:
2026-05-23 22:24:27 +01:00
parent cfb842c56f
commit 4bf51998dc
7 changed files with 35 additions and 56 deletions
@@ -349,10 +349,7 @@ public class PackerAssetWalker {
for (byte value : tile.paletteIndices()) {
maxUsedIndex = Math.max(maxUsedIndex, Byte.toUnsignedInt(value));
}
if (maxUsedIndex == 0) {
continue;
}
final int requiredColorCount = maxUsedIndex;
final int requiredColorCount = maxUsedIndex + 1;
final Optional<DeclaredPalette> fragilePalette = declaredPalettes.stream()
.filter(palette -> palette.colorCount() < requiredColorCount)
.findFirst();