Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

Crash report in entity immunity list on start up

Varg95 opened this issue ยท 9 comments

commented

Minecraft version: 1.12.2 [change as necessary]
Wizardry version: 4.1.2[change as necessary]
Environment: Singleplayer

Issue details: [crash on start up]

Other mods involved: [none]

Link to crash report (if applicable): [ https://pastebin.com/u6vWL97F ]

commented

According to your crash report, it seems to be related to this issue: #31

Interesting enough, I also have this crash report as well.

commented

yeah but it should have been fixed n 4.1.2 right?

commented

Could you tell me whether you edited the config file manually or used the in-game config menu to make this change? Could you also post your config file? It should help me see exactly what's wrong. Thanks.

commented

My crash happened when I edited the config manually.
For Example, I added rotd:dragon to the fire resistances list.

<
rotd:dragon
>

commented

still happens.
if you put ANYTHING in resistances list, in any category, it won't load the server.
I've tried to put blaze into fire resistance and it instantly crashes the server on load after the change.
https://paste.ee/p/H1iHS - crash
https://paste.ee/p/dV8zR - config part

commented

Uhhh... That would be because Arrays.asList() only returns a wrapper around the original array, and not a new list. Arrays can't be resized like that, so you can't do things like add or remove elements. If you're going to use asList() pretty much every time you reference the array, you're not gaining much by using an array, and should just use a List instead. Better, yet, an EnumSet, since the use case matches exactly, and DamageType is already an enum.

commented

Yeah I think that's quite old code. I guess I originally chose an array to work nicely with the varargs parameter and I added more functionality afterwards when I really ought to have changed it. It would have worked if the Arrays.asList call was in a new ArrayList<>(...) but your way is better. Thanks.

commented

I am also encountering this issue

commented

I've had this issue as well, and I was manually editing the config through a text editor.