Mod export issue.

Published by JumpWatch on
Status
Works as designed
Issue description

I just made a test export of my current mod called TUT (The Unknown Tech) made with Shadowmaster435.

I opened the mod in a decompiler and found this (picture)

How can i fix this?

Issue comments

You can delete these folders manualy, or use the Regenerate code and build button and then Export to JAR

MCreator manages files inside mod package. So if you made files in say

  • test.mod.package.mcreator

Files inside test.mod.package will be left intact, but all files in test.mod.package.mcreator or its sub-packages will be deleted on regeneration.

 

Not even. Inde the Root directory where example the core file TUT.class or whatever is I made a file called modconfig to obviously make some changeable things in my work in progress mod. Even that file got deleted. Good reason I got a github backup of it to make sure even if needed I still have a safe backup.

So the package name in workspace settings is net.theunknown.tut and you make custom class with FQDN net.theunknown.tut.CustomClass?

When regnerated that file is removed.

This is expected in your case.

I am citing what I already wrote:

MCreator manages files inside mod package. So if you made files in say

  • test.mod.package.mcreator

Files inside test.mod.package will be left intact, but all files in test.mod.package.mcreator or its sub-packages will be deleted on regeneration.

In the terms of your package, that would mean (to be easier to understand in your case)

MCreator manages files inside mod package. So if you made files in say

  • net.theunknonwn.tut

Files inside net.theunknonwn or for example net.theunknonwn.custom will be left intact, but all files in net.theunknonwn.tut or its sub-packages will be deleted on regeneration.

ModSettings in the tree you screenshotted is inside net.theunknonwn.tut so it would be removed as it is detected as a non-MCreator file.

If you want to have custom files inside MCreator package for some reason, use custom code mod element which will place same named file in the MCreator mod package root and this file will be marked to be preserved.

If you do not want to use custom code, you still have this:

MCreator manages files inside mod package. So if you made files in say

  • net.theunknonwn.tut

Files inside net.theunknonwn or for example net.theunknonwn.custom will be left intact, but all files in net.theunknonwn.tut or its sub-packages will be deleted on regeneration.

Although I can not see why you couldn't change that class custom code mod element extends. I suggest to look a bit into Java before doing things like this ;)

I know java i wrote wrong as of i didn't do proper thinking. But yeah. What i mean't is that i didn't want to use the custom element function even tho i could find a easier way to code my thing with it but oh well. thats long gone now.