PrincessCyanMarine / SimpleVeinminer

A Simple Veinminer for Fabric
Other
3 stars 4 forks source link

Mod will crash game if whitelist values contain invalid paths or characters #29

Open valkyrienyanko opened 3 months ago

valkyrienyanko commented 3 months ago

I knew adding the ID techreborn:sapphire_ore to the whitelist would work but I wanted to add all Tech Reborn ores so I was trying to figure out why #techreborn:mineable/omni_tool wasn't working. I think it's because the mod does not know how to handle forward slashes in the value. Anyways, I tried doing #c:techreborn:mineable/omni_tool because why not lets just try some value that I know won't work and then the game crashed with the following error

net.minecraft.util.InvalidIdentifierException: Non [a-z0-9/._-] character in path of location: c:techreborn:mineableomni_tool

Notice how there is no / in the value above even so I put one. Also please note that before I even knew the wiki existed I was trying values like <tag:block:techreborn:...> and the mod would crash because of the <> characters.

Please add a simple try catch to handle these scenarios for people like me that didn't know the wiki existed. And maybe whisper the player a message in game to the wiki talking about the blacklist / whitelist if they do try doing invalid paths or weird characters.

I am using this mod for Fabric 1.20.1

TL;DR