Find textures for blocks whose palette entry leaves properties at their defaults

Textures were looked up by the block state with only the properties the
pack set, so a plain grass_block never matched its snowy=false variant
and fell back to its map colour. The lookup now uses the full state.

Model used: Claude Opus 5.5
This commit is contained in:
piexel
2026-10-18 22:20:41 +02:00
parent 13312e9182
commit 6c3822cdaf
@@ -72,7 +72,8 @@ final class BlockTextures {
}
Optional<BlockTexture> topTexture(BlockData block) {
return topTextures.computeIfAbsent(block.getAsString(true), this::resolveTopTexture);
// Blockstate files match on every property, so defaults the pack left out have to be spelled out too.
return topTextures.computeIfAbsent(block.getAsString(false), this::resolveTopTexture);
}
private Optional<BlockTexture> resolveTopTexture(String blockState) {