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.

MOMOTHEREAL

Members
  • Joined

  • Last visited

  1. OMG OMG THANK YOU!!!! Final code (working): @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if(type.contains(TickType.RENDER)) { if (FMLClientHandler.instance().getClient().thePlayer != null){ ItemStack helmetStack = FMLClientHandler.instance().getClient().thePlayer.getCurrentArmor(3); if(helmetStack != null && helmetStack.itemID == GoogleGlassesMod.GoogleGlassHelmet.itemID){ FMLClientHandler.instance().getClient().fontRenderer.drawStringWithShadow("POTATO", 2, 2, 16777215); } } } }
  2. The tickEnd: @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if(type.contains(TickType.RENDER)) { if (FMLClientHandler.instance().getClient().thePlayer != null){ if (FMLClientHandler.instance().getClient().thePlayer.getCurrentArmor(0)==GoogleGlassesMod.GoogleGlassStack){ FMLClientHandler.instance().getClient().fontRenderer.drawStringWithShadow("POTATO", 2, 2, 16777215); } } } } And the GoogleGlassStack: ublic static ItemStack GoogleGlassStack = new ItemStack(GoogleGlassHelmet); I think I am doing it wrong at the GoogleGlassStack. Help?
  3. New code (tickEnd): public void tickEnd(EnumSet<TickType> type, Object... tickData) { if(type.contains(TickType.RENDER)) { if (Variables.status == 0){ FMLClientHandler.instance().getClient().fontRenderer.drawStringWithShadow("POTATO", 2, 2, 16777215); } } } Now it also displays on the Main Menu! How to check if it is ingame?
  4. Thanks a lot for your patience. I have this code now in my TickHandler class: @SideOnly(Side.CLIENT) public class TickHandler implements ITickHandler{ @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if(type.contains(TickType.PLAYER)) { if (Variables.status == 0){ FMLClientHandler.instance().getClient().fontRenderer.drawStringWithShadow("POTATO", 2, 2, 16777215); Variables.status = 1; } } } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER); } @Override public String getLabel() { // TODO Auto-generated method stub return null; } } I used the String POTATO as a test. When I join, I see the string, but it disappears on the next tick. How to let it stay there? Also, what method do you suggest for detecting the Helmet. Creating a Minecraft instance?
  5. How can I listen to Player ticks? :3 Sorry if I seem noob, I am kinda new to Forge.
  6. But what is the Tick event?
  7. Please help!
  8. Hello, I have basic understanding of the Forge API now. What I am trying to do is to have a GUI drawn at the top right of the screen when the player has a special helmet. The problem is that I cannot figure out the event that is triggered when the player changes his helmet, and also check if the player has that helmet when it joins the world to draw that gui. Any help is appreciated! ~Momo.
  9. Thanks for the quick answer, but I am quit new to Forge programming. Could you give me what to write? The one I just tested is not working: [embed=425,349] fontrenderer.drawStringWithShadow("My client 1.0", 2, 2, 0xffffff); [/embed]
  10. Hello, I am modding a very simple client for myself and a friend. What I am actually trying to do in this case is to show up text at the top left (for example: "My client 1.0". I am modding with MCP for 1.6.2. I tried to lookup on the Internet, but the GuiIngame.java doesn't seem to work along with Minecraft, because when I tried editing the F3 menu, it didn't change anything... Thanks in advance!

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.