Jump to content

[SOLVED]: Player inventory bound to GUI wont allow items to move


Recommended Posts

Posted

I am trying to get my first GUI working correctly.  :'(

 

I have the GUI rendering, opening and have the container able to store the items when closed. 

I am able to shift click items into the GUI's Slots but when I try and pick up the items from the inventory slots or the hot bar in the GUI's they bounce back into the GUI

 

how do I make it so that I can manipulate the slot positions and such like normal? It looks like the GUI has refresh issue that is

constantly rebinding the Inventory contents therefore not letting me pull the items out so I can move or split stacks.

 

any assistance you can provide would be appreciated.

 

Thanks.  :)

 

Neoublie

Mod [WIP] - Codename: Project Shadow

Neoublie

Author of Codename: Project Shadow

 

if you do models and textures pm me. looking for some assistance.

Posted

Sorry I didn't think to put that up there,

 

here is the Container code,

 

http://pastebin.com/m0MhRmRm

 

I have been trying to use EE3 and the forge tutorials as reference but can't seem to see what I am doing wrong

 

 

EDIT - Looks like I missed a portion that I had added at one stage, but lost at one point with my revising code while trying to get other stuff working.

 

if (slotItemStack.stackSize == itemStack.stackSize){
	return null;
}
slot.onPickupFromSlot(player, slotItemStack);

 

I still have some layout and formatting issues remaining but I think I can tweak them easy enough.

 

Neoublie

Author of Codename: Project Shadow

 

if you do models and textures pm me. looking for some assistance.

Posted

Turns our mine is not exactly working correctly yet. I am still having some issues with being able to grab items and move them.  Sometimes I can pick them up and some times they bound right back to the initial slot.

 

It is like the game is going through a loop and binding the items each cycle, but if I can catch it at the right stage of the cycle I can grab and hold onto the item.  is there anything I am missing. do you have your code available that I could have a look at if your Gui's slots are working correctly?

 

Neoublie

Author of Codename: Project Shadow

 

if you do models and textures pm me. looking for some assistance.

Posted
  On 6/12/2013 at 9:41 PM, Neoublie said:

Turns our mine is not exactly working correctly yet. I am still having some issues with being able to grab items and move them.  Sometimes I can pick them up and some times they bound right back to the initial slot.

 

It is like the game is going through a loop and binding the items each cycle, but if I can catch it at the right stage of the cycle I can grab and hold onto the item.  is there anything I am missing. do you have your code available that I could have a look at if your Gui's slots are working correctly?

Yes; I replied to your PM.

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

Posted

Silly me. Why don't I post it here, in case someone else wants to see it?

 

Container code:

 

  Reveal hidden contents

 

Common Proxy code:

 

  Reveal hidden contents

 

TE code:

 

  Reveal hidden contents

 

And the SlotSolarCharger:

 

  Reveal hidden contents

 

If you need anything else, you can check out our GitHub repo at https://github.com/Pentachoron-Labs/SBFP-Tech.

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

Posted

Turns out I was so close to having the inventory slots working correctly.  I was only missing 1 line from my mod base class.  good old @NetworkMod

 

Thanks to the thread here here I was able to check all the things I thought was wrong with my GUI class, TileEntity, and Container and stumbled across the mention of missing @NetworkMod

 

Thanks all.

Neoublie

Author of Codename: Project Shadow

 

if you do models and textures pm me. looking for some assistance.

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.