Solved Adding items to minecart chest

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Aberforth

Member
Jun 14, 2019
40
2
8
Canada
Hello,

By right clicking an armor stand the player can open a GUI:

Code:
on right click on entity:
    if name of clicked entity is "container":
        if {container_open::%event-entity%} is 0:
            send action bar "&7Opened container" to player
            open chest with 6 rows named "&fContainer" to player

I would want the player to be able to add items to the GUI. I know I could do it if it was a chest:

Code:
on right click on chest:
    if player's tool is torch:
        add 1 torch to event-block's inventory

But what should I do to achieve the same effect with a GUI like above instead of an actual chest?
[doublepost=1594629395,1594464308][/doublepost]Any ideas?
 
Maybe this:
Code:
set {Tool} to player's tool
{Tool} is not air
#stuff

Sorry, I don't get it, can you explain further? What am I supposed to put in #stuff ?
[doublepost=1594717204,1594655707][/doublepost]I decided to change the idea a little bit, instead of using an armor stand I'm gonna use a minecart chest. It has an inventory so I thought it'd be easier.
Code:
on right click on minecart:
    add 1 stick to the inventory of the clicked entity

For some reason, this doesn't put items in the chest. Any ideas?

Okay I tried this:

Code:
on right click on minecart:
    set {_e} to event-entity
    add 1 stick to {_e}'s inventory

And it works so I believe I'll be fine from here. The problem is solved.
 
Status
Not open for further replies.