shadowmage45 / AncientWarfare

Updated Ancient Warfare mod for Minecraft 1.5.2+
http://ancientwarfare.wikispaces.com/
Other
10 stars 7 forks source link

Mailbox bug: Accidentally clicking the "target" button while holding an item causes that item to disappear. #22

Closed keenerb closed 10 years ago

keenerb commented 10 years ago

I clicked the "target mailbox" button above one of my slots in the Personal Mailbox.

THe item I was holding (sapling) disappeared. I'm able to duplicate regularly.

shadowmage45 commented 10 years ago

Ruh roh....that sounds bad :(

I will look into this shortly, and should have a fix with today/tomorrows update

shadowmage45 commented 10 years ago

It appears that this is caused by my 'seamless' swap between GUIS -- most of the buttons on the select GUI are in the same places as the inventory slots, so the server senses an inventory click, and acts on the appropriate slot, which is no longer in that position on the client -- from my testing the item does not actually disappear, but is placed into one of the inventory slots of the mailbox (but is invisible on the client unless they click on the right slot or re-open the GUI).

I am investigate a few possible solutions, and should have this fixed shortly. Possibilities are: a) drop the item on the ground, much like other GUIs do b) attempt to cache/restore the item under the cursor -- will prefer to go this route if possible c) detect if item is under cursor and disable clicking on buttons -- second preference if I can't get b) to work

Would you mind testing this same type of thing in a few other GUIs to see if any others suffer the same issue? I'm pretty sure there are a couple of other GUIs that I do the 'seamless' swap that have both buttons and inventory slots. I will try to go through and take a look at these if I have time later though.

keenerb commented 10 years ago

Town Hall NPC list drops the item to the ground.