How to edit the CoreMod.java class so that it persists after building

Started by Wabbaka on

Topic category: Help with MCreator software

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to edit the CoreMod.java class so that it persists after building

I'm trying to register in a MyMod constructor { CustomClass.REGISTRY.register(bus); } but after building it is deleted

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I found a way to block the…
Sun, 04/07/2024 - 01:58

I found a way to block the base files of the mod, but I understand that if I remove this, all my custom code will be deleted?

In 2024.1, a new user code…
Sun, 04/07/2024 - 08:38

In 2024.1, a new user code blocks will be added that will allow you to do this better:

Instead of locking base mod files, one can now add code within those custom user blocks and the code between those placeholder sections in the code will persist across builds, and if another generator specifies the same user code blocks, even across Minecraft versions, and even across modding APIs when possible.

Custom user code blocks inside code generated by MCreator

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh that's cool thanks
Sun, 04/07/2024 - 17:11

Oh that's cool thanks