Crash when removing mod that had blacklisted item.
TheUnderTaker11 opened this issue ยท 5 comments
NOTE FOR ANYONE ELSE HAVING THIS PROBLEM: It can be solved by going to the ItemBlacklist.json in your world file, then using a text editor to remove the entry for the item(s) causing your server to crash.
On v1.4.0 on MC 1.12.2.
Steps to reproduce are simple, have a mod, ban an item in the mod, then try and load up again. (I did this with server but I assume the crash would still happen in SP.
You need to do some kind of check for if the item actually exists (Easy enough by just checking mod ID, since it is given in the registry name.) As it is now, if a banned item doesn't exist it just crashes the server.
Why didn't you include the crash report...?
If it was so easy why didn't you PR a fix?
Well first off what the hell? It's almost like your not entitled to have every bug of your own mod fixed for you dude, learn to take a suggestion...
I literally even left a way for other people with the same problem to fix this, so not sure why you felt the need to be such a dick about it.
And secondly, the crash report will just tell you what I already said, and with a max of 10 minutes spent you could re-create the crash.
crash-2019-02-24_00.28.21-server.txt
hmm I wonder what's in the error log?
Caused by: java.lang.RuntimeException: There was an error loading your config file. To prevent damage, the server will be closed.
Oh looks like this is intentional. I wonder why? Oh it's because now you can't typo something and think it's banned, while it's actually not. Gee, that's handy.
(Oh, and it even tells you what item it is: Caused by: java.lang.IllegalArgumentException: enderrift:browser isn't a valid item.
)
Just an FYI: We get many, many people complaining about all sorts of things all day long. We aren't trying to be mean, just efficient.
Did you bother TRYING to reproduce? Cause we have had that item banned for a few days now, and it didn't crash until we removed the mod the item was from, as I said already.
This should not be closed, it is not fixed.
So how is the server supposed to know when an item has been removed vs something has been a typo?
The answer is, it can't, so it fails when there are items in the config that don't exist. This is an intentional thing, to prevent typos. There is no better way of doing this that's not super over complicated.