Change file names to match [a-z0-9/._-], to prevent ResourceLocationExceptions
aaronhowser1 opened this issue ยท 4 comments
FTB Quests gets this error, stopping me from loading a list of textures:
[03:47:42] [Render thread/ERROR] [FTB Quests/]: A mod has broken resource preventing this list from loading: net.minecraft.util.ResourceLocationException: Non [a-z0-9/._-] character in path of location: chisel:textures/block/redstoneLamp/redstone_lamp_on.png
The mod dev has said that this is more stopping Minecraft from crashing than an arbitrary limitation on the mod's end.
Minecraft still picks it up and crashes internally, even with validation. The code im using is
images.addAll(Minecraft.getInstance().getResourceManager().listResources("textures", t -> t.endsWith(".png") && ResourceLocation.isValidResourceLocation(t)));
Renaming it from redstoneLamp to redstone_lamp is all that needs to be done
That texture is never used, just exclude it from whatever list you're creating.
But why are you doing that at all? I don't see the purpose of gathering all textures. It doesn't crash with only chisel. I'll fix the names when I implement those blocks.