Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Is possible to have custom events? I did implement one, but it doesn't seem to be working.

 

event class: http://paste.minecraftforge.net/view/1d1907f2

event triggered: http://paste.minecraftforge.net/view/271a63a0

event handler: http://paste.minecraftforge.net/view/1036b904

handler is register in @init method:

MinecraftForge.EVENT_BUS.register(new PowerEventHandler());

 

It crashes on getting parameter-less constructor (tried even adding one, but then my event rewritten ALL other events...)

            Constructor<?> ctr = eventType.getConstructor();

2013-03-03 15:05:44 [iNFO] [sTDERR] java.lang.NoSuchMethodException: monnef.core.LightningGeneratedEvent.<init>()
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at java.lang.Class.getConstructor0(Class.java:2706)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at java.lang.Class.getConstructor(Class.java:1657)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at net.minecraftforge.event.EventBus.register(EventBus.java:69)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at net.minecraftforge.event.EventBus.register(EventBus.java:53)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at monnef.jaffas.power.mod_jaffas_power.load(mod_jaffas_power.java:131)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:478)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:656)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:207)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:456)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.run(Minecraft.java:744)
2013-03-03 15:05:44 [iNFO] [sTDERR] 	at java.lang.Thread.run(Thread.java:662)

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

  • Author

problem solved. forge does some changes to all events on start using ASM library. the event is in my coremod and namespace was marked with TransformerExclusions so my event didn't get the needed tweaking after start.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.