Jump to content

[Solved] Having troubles with RenderGameOverlayEvent

[AFGx] Chris

Recommended Posts

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";
public static Helper instance;

public void init(FMLInitializationEvent event)
	System.out.println("[Helper] Loading Helper...");

public void postInit(FMLPostInitializationEvent event)
	System.out.println("[Helper] Done Loading.");

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

Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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