Anuken / Mindustry

The automation tower defense RTS
https://mindustrygame.github.io
GNU General Public License v3.0
22.69k stars 2.98k forks source link

Java Modding Bug #9977

Closed 6-BennyLi-9 closed 4 months ago

6-BennyLi-9 commented 4 months ago

Platforms

Linux

Build

146

Issue

If I made a bug in my Mod, and Mindustry will

[E] Failed to load mod file /home/benny/.local/share/Mindustry/mods/originalBetaVersion1.zip. Skipping. [E] java.lang.ExceptionInInitializerError

That's all right but my Mod won't be seen in Mods, what mean I must open the folder and delete it.

Steps to reproduce

  1. I found a bug and debugged it.
  2. When I reload my Mod,it doesn't work.
  3. After a long time, when I open the Mods folder, there are about eight clone of my Mod
  4. I delete all the bug Mod and reload.
  5. Now it works well.

Mods used

No response

Save file

No response

(Crash) logs

No response

Submission

JasonP01 commented 4 months ago

What even is bozo reporting

JasonP01 commented 4 months ago

I am not using Foo's Client, and have made sure the bug is not caused by mods I have installed.

Also liar

6-BennyLi-9 commented 4 months ago

It should be an advice

SMOLKEYS commented 3 months ago

If your mod's main class throws an error during initialization, Mindustry will skip it.

6-BennyLi-9 commented 3 months ago

If your mod's main class throws an error during initialization, Mindustry will skip it.

In fact, because of "Mindustry will skip it", the Mod won't be delete or be rewrite when I reload the bug-fixed mod, so there will be lots of fixed mod and a wrong mod, and Mindustry will load the wrong one.