nexusrightsi Posted December 7, 2015 Posted December 7, 2015 So i've been wondering what the cause could be that stops @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot) in the container class of my gui to be called. It all used to work untill I started adding in buttons, just regular basic buttons might i add. No special slots either. Its as if its skipping the first 5 player inventory slots hence it uses the armor inventory and the crafting grid of the inventory. here is a short video of the problem: https://www.youtube.com/watch?v=2e2V63rwWiI Quote
ovikk Posted December 7, 2015 Posted December 7, 2015 code? oops.. diesieben07 posted just before me... Quote I might be terribly wrong.. Like really, really wrong. But I'm just trying to help.
ovikk Posted December 7, 2015 Posted December 7, 2015 So, when you shift click an item, the code doesn't run? Quote I might be terribly wrong.. Like really, really wrong. But I'm just trying to help.
nexusrightsi Posted December 7, 2015 Author Posted December 7, 2015 So, when you shift click an item, the code doesn't run? nope, the method isn't even being called. which should have. Quote
coolAlias Posted December 7, 2015 Posted December 7, 2015 You also need to show your Gui, IGuiHandler, and code where you open the gui. I suspect you probably changed something else while adding buttons, so try this little test: in your Gui class constructor / init methods, comment out anything to do with buttons. Make ONLY this change, and try again - does the method get called now? I'm guessing it won't, but I may be wrong. The answer will help us help you. Quote http://i.imgur.com/NdrFdld.png[/img]
nexusrightsi Posted December 7, 2015 Author Posted December 7, 2015 You must call super.initGui() in your initGui method. Thank you so much! after all this time breaking my head over what could be wrong it is finally fixed T_T Like really, i could kiss you right now. But yay, thank you so much! :> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.