Jump to content

PCChazter

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by PCChazter

  1. I have the same issue with a mod that I am working on. I change the damage every 6 ticks using onUpdate(), then use getIconFromDamageForRenderPass() to change the icon for it, so I don't think using nbt would work for me. Is this going to get fixed in the near future?
  2. So...I was scouring the internet (literally, looking at everything, trying to figure out why this is happening), and everyone else's code, tutorials, and examples all looked to be the same (minus mod-specific details). The only difference I could find (after scratching my head and searching for hours) is that the examples all are @NetworkMod. Sure enough, reverted all my code back to what is in the file I posted on the OP (literally copied and pasted), and made it a NetworkMod.....and it works! Seriously? Why does it even let you make a GuiContainer if it won't work? Any thoughts Forge programmers?
  3. I see, that "handler" variable looks like it should be taken from a List that should have the mod/IGuiHandler relations in it, and NetworkRegistry.instance().registerGuiHandler(this, guiHandler); should have populated it correctly. it giving you a null pointer exception means it was not put in properly. Can you post your main mod file, and the item/block that calls the Gui? Maybe I can see something, maybe not, but I'll give it a shot. Also, make sure you have the latest "recommended" build of Forge, there's always useful updates.
  4. Do you have public static GuiHandler guiHandler = new GuiHandler(); and NetworkRegistry.instance().registerGuiHandler(this, guiHandler); added to your main mod file?
  5. I'm not too sure if this is a bug, or just a mis-use of a GuiContainer. I am trying to make a gui open on an item's right click, with a couple extra custom slots. I got the player's inventory put into it, and decided to try it out, to make sure it was working so far, because I have not made a gui in the past. Everything seemed to be working, but when I try to click an Item, it doesn't let me pick it up, it just picks it up for a second, then puts it back. If I click an item that has another item in the slot above it, it will pick up the item from the slot above it, and empty both slots. Thinking that maybe my code is conflicting with the gui somehow, I made a test mod with a gui, same thing. I then decided to experiment a bit, so I added a few more slots (9 regular slots), and I was able to pick up items from my inventory, but not some of the 9 slots. Thinking that maybe it has something to do with trying to use an item to call the gui, I made a block that would open the gui, and the exact same thing happened. Can anyone please tell me if something is wrong with my code, or if this is just a bug? I have attached the source code for my test mod, with the 2 items, and 2 blocks
×
×
  • Create New...

Important Information

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