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

Can't get custom inventory to work


Recommended Posts

Okay, so i kind of have the inventory working. The only thing i really can't get to work is picking up an item and placing it in to the inventory for the player. I've been looking for a solution a long time now and I haven't come across one yes so i search here for help!

 

Current action: As i click the slot i get 1, only 1 cobble stone in the hand and then it removes it from the gui (as expected as i picked it up) then when i click an inventory slot (player inventory) it just goes back in to the gui (the normal inventory) and then when i exit the gui it drops a copple of stacks on the ground O.o

 

Gui: https://github.com/vpklotar/Industrial-Line/blob/master/src/se/vpklotar/il/gui/GuiNetController.java

Container: https://github.com/vpklotar/Industrial-Line/blob/master/src/se/vpklotar/il/block/NetControllerContainer.java

uNet: https://github.com/vpklotar/Industrial-Line/blob/master/src/se/vpklotar/il/power/uNet.java

 

I would really appreciate if someone could help me sort this out!

Link to post
Share on other sites

None of your slots use the player inventory.

Check your layoutInventory() in NetControllerContainer.

 

Okay, haha, failed to notice that, at least i get a new block into my inventory but it should be a stack O.o And though it renders there it seams to be null for some reason...

Link to post
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.

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



×
×
  • Create New...

Important Information

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