Jump to content

[FIXED][1.7.10] Custom Inventory GUI Constantly Selecting Slot 0


yoshiquest

Recommended Posts

I'm having an issue with my Container class. Every time a slot is clicked, the slot picked is always 0, no matter which one I choose (overrode slotClick to test this). What could be causing this issue? Or, more specifically, what all methods call slotClick, so I can narrow down the problem a bit more?

 

Would post code, but system is written in Clojure and VERY complex. I will say though that the IInventory seems to work just fine, transferStackInSlot is not overridden (though this shouldn't be a problem), canInteractWith always returns true, and the slots I add are still highlighted when hovering over them, and their slots are indeed set properly.

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

Added code to my github for those who understand clojure code: forge-clj test-mod

 

Where forge-clj is the api I'm building, and test-mod is the mod with the actual gui code and stuff. This is still a problem, so help would be appreciated.

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

Bumping because I just overhauled my entire gui system, and this is STILL happening.

 

If you need to see a java-ish version of a piece of my code, just ask (I'd rather not convert the entire codebase to that, thanks).

 

But seriously though, I need some help here, because I have no idea what could be causing this to happen.

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

Ok nevermind. I was reimplementing the addSlotToContainer method, and forgot to set the slotNumber of the newly-created slot to the size of the list. So it was me derping. Sorry if I wasted your time :P.

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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