Jump to content

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


Recommended Posts

Posted

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

Posted

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

Posted

 

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

Posted

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

Posted

Wait sorry not thinking clearly,

Have you made sure the drawn slots and the actual slots are in the same position?

I think its my java of the variables.

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.