Jump to content

MOMOTHEREAL

Members
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

MOMOTHEREAL's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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. 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.
  8. 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]
  9. 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!
×
×
  • Create New...

Important Information

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