Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by Guru_Fraser

  1. I've seen the event for "NameFormat Event" and changing the display name within that doesn't work. What I'm trying to achieve is something that would find all "loaded" players and edit their name based on my own scenarioes. Is there anything within the API that allows me to modify a display name / edit it at render level?
  2. I want to change how players names are rendered, but cannot work out how to modify it. I've found RenderPlayerEvent but, theres no way to change how to render their name that I can see without editing base classes?
  3. No it has bukkit, but I am trying to make it so that it picks up the item in slot 0 just like you would if you left clicked it, which would trigger a bukkit event, but I can't seem to make the forge trigger the bukkit even because I don't think I'm sending a packet to the server and am not too sure how to send the packet to the server telling it I've clicked, because I thought detectAndSendChanges did that.
  4. I'm trying to, but slotClick inside container doesn't tell the server anything, would you recommend a different method for my operation? I did use detectAndSendUpdates(); but it didn't really do anything about it server side. I picked the item up, but the server side didn't recieve it
  5. The question is irrelevant to bukkit. My mod is for forge, i'm trying to use forge packets to send the a server which may be bukkit.... my mod is client side and i'm trying to tell the server HEY IM CLICKING THIS ITEM... using slotClick doesn't send any packet to the server, its all client side, I'm asking if packet 102 will send to the server or not because the constructor says @SideOnly(Side.CLIENT) if it doesn't send to the server, how can I achieve this.
  6. This is apprently a "@SideOnly(Side.Client)" Now does this mean I cannot send it to the server to say that I've picked up a specific item? All I'm trying to do is make the server think and know I'm left clicking the item automatically, this would (on bukkit side, what I want to happen: ) call InventoryClickEvent, which is what I want to spoof via my mod, as I'm sure you've seen theres plenty of gui's that use this feature of clicking an item and teleporting etc, I want to initiate this click and allow bukkit to know I'm clicking this, all automagically.
  7. Happen to know how to make it send to the server, and work as a command eg make it so it runs lets for example say "/seed" ? Because I tried it and all it does it outputs it in chat .
  8. Eclipse is my friend How the hell do i use sendTextToPlayer() ? I thought this would work: player.sendChatToPlayer("Hi"); but it doesn't, its asking for "chatmessagecomponent" which doesn't accept any params D:.
  9. No, in an anvil you can rename a chest, thus you can have a chest named "edward" .
  10. PERFECT. THank you so much man, just what I was looking for, you're like a walking forge dictionary
  11. I couldn't see anything that would get the name in here though? I saw .toString() but I had doubts that was right, is that correct though or should I be seing another method?
  12. How would I find out if the player is currently looking into a chest (just single) and how would I get the name of this chest?
  13. So it would be 0,0,35 for a left click on slot 35... Maybe?
  14. Lemme try and give you it in actions. Step 1: - Mod initiates the same function as hitting "E" on the keyboard - (Opens Inventory) Step 2: - Mod hovers over itemstack in slot 35 and LEFT CLICKS. Step 3: - Mod now hovers over the itemstack in slot 5 and LEFT CLICKS. Thats all I'm trying to work out
  15. I had an item in slot 5 and an item in slot 35 of the players inventory right. I want the mod to do exactly as if you were to if you left clicked the item in slot 35, then whilst its "holding" the item from slot 35 it would click on slot 5, so essentially the item from slot 35 would be now in slot 5, and the item that was in slot 5 would be "on the cursor".
  16. How would I go about making it so that it opens the players inventory (done this bit), then clicks an item in slot 35, then tries placing that item over the top of the item in slot 5, then closes the inventory? I cannot work out how to use slotClick(int, int, int, player)
  17. Also is this what you meant? package net.minecraft.client.gui; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.gui.achievement.GuiStats; import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.client.resources.I18n; import net.minecraft.stats.StatList; public class DungeonRealmButtonAdder extends GuiIngameMenu { public void init(){ this.buttonList.add(new GuiButton(10, this.width - 100, this.height - 22, 98, 20, "Dungeon Realms")); } @Override protected void actionPerformed(GuiButton par1GuiButton) { switch (par1GuiButton.id) { case 0: this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); break; case 1: par1GuiButton.enabled = false; this.mc.statFileWriter.readStat(StatList.leaveGameStat, 1); this.mc.theWorld.sendQuittingDisconnectingPacket(); this.mc.loadWorld((WorldClient)null); this.mc.displayGuiScreen(new GuiMainMenu()); case 2: case 3: default: break; case 4: this.mc.displayGuiScreen((GuiScreen)null); this.mc.setIngameFocus(); this.mc.sndManager.resumeAllSounds(); break; case 5: this.mc.displayGuiScreen(new GuiAchievements(this.mc.statFileWriter)); break; case 6: this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter)); break; case 7: this.mc.displayGuiScreen(new GuiShareToLan(this)); break; case 10: new GuiDungeonControls(); } } }
  18. I seem to have confused you, I am referring to client side here, on the server the max health can exceed 20; I want my client to track the health AND max health correctly, but instead it just reads 0.0 and 20. When actually my health is like 200 / 300. I can code bukkit, thats easy, I'm very new to forge coding, Heres my code that I'm trying: String s = mod_dungeonrealms.formatExp(mc.thePlayer.func_110139_bj(), mc.thePlayer.func_110138_aP()) + " / " + mc.thePlayer.func_110138_aP(); public static String formatExp(float f, float f2) { if((f >= ((f2 / 3) * 2))) { return " \u00A7a " + f; } else if(f >= ((f2 / 3))) { return " \u00A76 " + f; } else { return " \u00A7c " + f; } }
  19. Thanks I'll look into that! Since you seem to be very good at this; you don't happen to know how to get the correct health and max health of a player when on a bukkit server? I am using minecraft methods and they're returning health as 0.0 always and max as 20.0 always .
  20. Thanks, but looking in minecraft.currentScreen there is no way to add buttons to the button list, or even check when the button is clicked, how would I handle that?
  21. How would I add a button to main menu without editing any base classes?
  22. I am using this method to format my health and max health: s = "" + this.formatExp(mc.thePlayer.func_110139_bj(), mc.thePlayer.func_110138_aP()) + " / " + mc.thePlayer.func_110138_aP(); (formatExp is a custom method that just colours stuff) But this is intended for a Bukkit server, and I am just wondering; is it possible to get the proper health and max health? Because bj() returns 0.0 and aP() always returns 20. Even though on the server I had 100 HP and 100 max hp....
  23. Looking at that, how the hell do I edit anything? Or do I cancel and render it myself?
  24. Well I don't think its possible to edit the string display for the exp level without editing base classes? Instead of displaying 80 I want it to say for example "80 Potato"
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.