Adding dropped items to a 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 community!

    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.

MaraCZSK

New Member
Oct 3, 2021
5
0
1
Hi so basically im trying to make this command that loops items on ground and puts them in a chest
Skript Version: 2.5.3
Skript Author:
Bensku
Minecraft Version: 1.17.1
Addons:
Skelett v1.9.11
skRayFall v1.9.2.6
SkQuery v4.1.5
SkBee v1.11.2



Code:
command /chest_loop:
trigger:
loop all blocks in radius 2 around player:
if loop-block is chest:
loop all dropped items in radius 5 around loop-block:
add loop-value-2 to loop-block's inventory
 
Hi so basically im trying to make this command that loops items on ground and puts them in a chest
Skript Version: 2.5.3
Skript Author:
Bensku
Minecraft Version: 1.17.1
Addons:
Skelett v1.9.11
skRayFall v1.9.2.6
SkQuery v4.1.5
SkBee v1.11.2



Code:
command /chest_loop:
trigger:
loop all blocks in radius 2 around player:
if loop-block is chest:
loop all dropped items in radius 5 around loop-block:
add loop-value-2 to loop-block's inventory
debug your code
 
I mean i found that it loops the dropped items but cant put it in the chest because the name of the dropped items for example is "dropped cobblestone block"
 
I mean i found that it loops the dropped items but cant put it in the chest because the name of the dropped items for example is "dropped cobblestone block"
The name has nothing to do with it, broadcast loop-block and loop-value-2
 
upload_2021-10-6_15-14-49.png

But it just doesnt add it to the chest

Code:
command /chest_loop:
    trigger:
        loop all blocks in radius 2 around player:
            if loop-block is a chest:
                loop all dropped items in radius 5 around loop-block:
                    add loop-value-2 to {_items::*}
                    send "%{_items::*}%"
                    send "%loop-block%"
                    add {_items::*} to loop-block's inventory
 
Status
Not open for further replies.