Posted February 16, 201411 yr I wanted to have a string rendered on the game overlay, but using the event doesn't work for me. What am I doing wrong? package at.diekiste.helper; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Helper.MODID, version = Helper.VERSION) public class Helper { public static final String MODID = "helper"; public static final String VERSION = "0.1 Beta"; @Instance(MODID) public static Helper instance; @EventHandler public void init(FMLInitializationEvent event) { System.out.println("[Helper] Loading Helper..."); } @EventHandler public void postInit(FMLPostInitializationEvent event) { System.out.println("[Helper] Done Loading."); } @EventHandler public void renderGameOverlay(RenderGameOverlayEvent event) { Minecraft.getMinecraft().fontRenderer.drawString("Hello World", 2, 2, 0xffffffff); } } Edit: This has been solved. Big thanks to Jdb100! don't use @EventHandler over your renderGameOverlayEvent use @SubscribeEvent
February 16, 201411 yr you need to register your class as event handler and seeing as you are using your base class for event handler just add this into your post init MinecraftForge.EVENT_BUS.register(this); Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
February 16, 201411 yr are you 1.7.2 or 1.6 Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
February 16, 201411 yr don't use @EventHandler over your renderGameOverlayEvent use @SubscribeEvent Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
February 16, 201411 yr no problem Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
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.