Jump to content

Help with container clicks


Recommended Posts

How would I go about making it so that it opens the players inventory (done this bit), then clicks an item in slot 35, then tries placing that item over the top of the item in slot 5, then closes the inventory? I cannot work out how to use slotClick(int, int, int, player)

Link to comment
Share on other sites

the vanilla "E" inventory ? you will need a coremod if you want to do stuff like this else

im not sure i understand what you're trying to do

what i understand:

player pick up an item (its in his hand/mouse thing)

player hovers over a certain slot

player click that slot

the gui close


what do you want to do with the item in the player hand ? drop it on the groudn, place it in the slot ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

I had an item in slot 5 and an item in slot 35 of the players inventory right. I want the mod to do exactly as if you were to if you left clicked the item in slot 35, then whilst its "holding" the item from slot 35 it would click on slot 5, so essentially the item from slot 35 would be now in slot 5, and the item that was in slot 5 would be "on the cursor".

Link to comment
Share on other sites

Lemme try and give you it in actions.

Step 1: - Mod initiates the same function as hitting "E" on the keyboard - (Opens Inventory)

Step 2: - Mod hovers over itemstack in slot 35 and LEFT CLICKS.

Step 3: - Mod now hovers over the itemstack in slot 5 and LEFT CLICKS.


Thats all I'm trying to work out :/

Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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