create registrates

Started by maxhaaa on

Topic category: Help with MCreator software

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
create registrates

so simpily, im trying to move this peice of code, into

   
public static final CreateRegistrate REGISTRATE = CreateRegistrate.create("createmodworkspace");

into

@Mod("createmodworkspace")

public class CreatemodworkspaceMod {

    public static final Logger LOGGER = LogManager.getLogger(CreatemodworkspaceMod.class);

    public static final String MODID = "createmodworkspace";

   public static final CreateRegistrate REGISTRATE = CreateRegistrate.create("createmodworkspace");
    
    public CreatemodworkspaceMod() {

>into one of these user sections. so it wont regen every time

        // Start of user code block mod constructor

        // End of user code block mod constructor

        MinecraftForge.EVENT_BUS.register(this);

        IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();



        CreatemodworkspaceModBlocks.REGISTRY.register(bus);

        CreatemodworkspaceModBlockEntities.REGISTRY.register(bus);

        CreatemodworkspaceModItems.REGISTRY.register(bus);



        CreatemodworkspaceModTabs.REGISTRY.register(bus);



        // Start of user code block mod init

        // End of user code block mod init

    }

this is so i can make my own regestries and not have mcreator auto generate these every single time.

if i move it into the init section it throws up this error

 


17 errors
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 55s
1 actionable task: 1 executed

BUILD FAILED
Task completed in 57 seconds

if i move it back to i originally placed it. it causes no errors. is there anyway i can make it so it doesn't auto generate each time? its all i want to do

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so yea, just want to…
Tue, 11/05/2024 - 21:41

so yea, just want to specifiy, i want the  public class static not to regenerate each time so i can make my own registries and not have to worry about it regenerating each time i exit mcreator. i didn't have time to recreate the entire orignial code right now but i got what was important