diff --git a/rainbow/src/main/java/org/geysermc/rainbow/mapping/texture/StitchedTextures.java b/rainbow/src/main/java/org/geysermc/rainbow/mapping/texture/StitchedTextures.java index c3e8f9c..8923a17 100644 --- a/rainbow/src/main/java/org/geysermc/rainbow/mapping/texture/StitchedTextures.java +++ b/rainbow/src/main/java/org/geysermc/rainbow/mapping/texture/StitchedTextures.java @@ -37,7 +37,11 @@ public record StitchedTextures(Map sprites, Supplier Map sprites = new HashMap<>(); for (Map.Entry material : materials.entrySet()) { - sprites.put(material.getKey(), preparations.getSprite(material.getValue().texture())); + TextureAtlasSprite sprite = preparations.getSprite(material.getValue().texture()); + // Sprite could be null when this material wasn't stitched, which happens when the texture simply doesn't exist within the loaded resourcepacks + if (sprite != null) { + sprites.put(material.getKey(), sprite); + } } return new StitchedTextures(Map.copyOf(sprites), () -> stitchTextureAtlas(preparations), preparations.width(), preparations.height()); }