Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

This has nothing to do with your mod. it is a bug of minecraft, try to restart

  • Author

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

what does your getServerGuiElement look like for your IGuiHandler?

I think its my java of the variables.

  • Author

 

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

  • Author

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

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.

  • Author

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

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.