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


  • Posts

  • Joined

  • Last visited

Posts 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. 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.

  3. 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

  4. nobody provides support for bukkit here

    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.

  5. 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.



  6. 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 :/

  7. 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".

  8. 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)

  9. org.bukkit.entity.Damageable.getHealth()


    Javadocs are your friend: http://jd.bukkit.org/rb/apidocs/org/bukkit/entity/Damageable.html

    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"));
    protected void actionPerformed(GuiButton par1GuiButton) {
            switch (par1GuiButton.id)
                case 0:
                    this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
                case 1:
                    par1GuiButton.enabled = false;
                    this.mc.statFileWriter.readStat(StatList.leaveGameStat, 1);
                    this.mc.displayGuiScreen(new GuiMainMenu());
                case 2:
                case 3:
                case 4:
                case 5:
                    this.mc.displayGuiScreen(new GuiAchievements(this.mc.statFileWriter));
                case 6:
                    this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
                case 7:
                    this.mc.displayGuiScreen(new GuiShareToLan(this));
                case 10:
                	new GuiDungeonControls();

  10. 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;


  11. mc.currentScreen.buttonList is the list that contains all Buttons of a Gui.

    Its protected, but if you don't want to use reflection just make an accessor class in the net.minecraft.client.gui package.

    and to make your button do something make a new subclass of GuiButton and in there override mousePressed.

    Then do something like this:

    if (super.mousePressed(*params*)) {
        // perfom action when button is pressed

    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 :S.

  12. If you really want to do this without becoming a coremod and doing it with ASM (the proper way), you need to make a Client-Side tick handler that checks the buttonList of the currently open gui if it contains your button, and if not, add it.

    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?

  13. 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....

  • Create New...

Important Information

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