Jump to content

[Solved] GUI -Throw's items out of inv instead of picking up with mouse


Mazetar

Recommended Posts

When I try to move items around inn my chest inventory via the GUI, there is this weird bug of items getting thrown out one by one for every click instead of being picked up and dragged by the cursor. What could be causing this to happen?

 

TE: http://pastebin.com/kpzN2Cqm 

GUI: http://pastebin.com/4tDMZ2HW

Container: http://pastebin.com/LR07ir6y

 

Edit: Solved! Was caused by having negative x/y value when creating a slot inn the container.

ref: http://www.minecraftforge.net/forum/index.php/topic,8227.0.html

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

I have restarted inn both run and debugg mode araound 58 times, also if its a mc bug why is it not affecting any other inventory? The creative inv, regular chests etc. They all work. So I'm still certain that the error is on my side

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

 

GUI handler - getServerGuiElement:

if (ID == GuiIds.FURNACE_CHEST_ID)
            return new CotainerFurnaceChest(world.getBlockTileEntity(x, y, z), player);

 

and getClientGuiElement:

 if (ID == GuiIds.FURNACE_CHEST_ID)
            return new GuiFurnaceChest(getServerGuiElement(ID, player, world, x, y, z),player, world, x, y, z);

Only included the relevant lines from my GUI handler.

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Tried updating forge to latest version without any change, didn't expect it to help either.

I feel that I must be totally blind on my own code because I have read the code up and down and I can't find what's different from the tutorial code nor what could logically cause this problem :S

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Problem got solved by Draco18 here: http://www.minecraftforge.net/forum/index.php/topic,8227.0.html

 

He had the same problem and figured that it was because one of the slots got an negative value for it's x or y position which caused this to happen. Problem solved!

 

Thanks for trying to help people, this was a weird one for me :)

 

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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