Jump to content

Recommended Posts

Posted

Hello so i tried creating a @Config using forges testing one and well it is not loading and i am wondering why the config it self is loading just not the gui.

 

Here is my code.

 

Config:

  Reveal hidden contents

 

i have this in my init event in the main class:

ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE);

 

And this event:

@SubscribeEvent public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)

{

if (event.getModID().equals(Reference.MODID))

{

ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE);

}

}

Posted

Have you tried it outside the IDE?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 12/31/2018 at 3:21 PM, Discult said:

i have this in my init event in the main class:

ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE);

Expand  

This part is unnecessary and is already done for you.

  On 12/31/2018 at 3:21 PM, Discult said:

And this event:

@SubscribeEvent public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)

{

if (event.getModID().equals(Reference.MODID))

{

ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE);

}

}

Expand  

Are you using an instance based event subscriber?

Do you have an @Mod annotated class?

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 1/1/2019 at 2:19 PM, Cadiboo said:

This part is unnecessary and is already done for you.

Are you using an instance based event subscriber?

Do you have an @Mod annotated class?

Expand  

 

  On 1/1/2019 at 2:19 PM, Cadiboo said:

This part is unnecessary and is already done for you.

Are you using an instance based event subscriber?

Do you have an @Mod annotated class?

Expand  

Yes i do have a @mod annotated class. what is meant by instance base event subscriber. above the class where my events are in i have a 

@EventBusSubscriber(modid = Reference.MODID, value = Side.CLIENT)

 

and i have EVENT_BUS.register in my init on my clientproxy

Posted
  On 1/1/2019 at 5:13 PM, Discult said:

what is meant by instance base event subscriber

Expand  

Instance based means that you registered the subscriber with EVENT_BUS.register(new EventSubscriber()) Instance based subscribers must have instance (non-static) @SubscriberEvent annotated methods.

Static EventSubscribers are registered with @EventBusSubscriber or EVENT_BUS.register(EventSubscriber.class). Static based subscribers must have static @SubscriberEvent annotated methods.

 

You've got a static event subscriber with instance methods (which won't be called), simply add static to your methods and you're done (and remove the double registration)

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 1/2/2019 at 6:17 AM, Cadiboo said:

Instance based means that you registered the subscriber with EVENT_BUS.register(new EventSubscriber()) Instance based subscribers must have instance (non-static) @SubscriberEvent annotated methods.

Static EventSubscribers are registered with @EventBusSubscriber or EVENT_BUS.register(EventSubscriber.class). Static based subscribers must have static @SubscriberEvent annotated methods.

 

You've got a static event subscriber with instance methods (which won't be called), simply add static to your methods and you're done (and remove the double registration)

Expand  

right so i didn't register it in the client proxy cause of the @EventBusSub and i made the method static but for some reason it is still not displaying the config button 

 

Posted

Please post your code as a GitHub repository 

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.