How to make Server Crates – Tutorial Series #011

Commands:
Step 1: Crate Resetter
1) /clear @a[x=-4, y=5, z=-28, r=10] stained_glass_pane 14
2) /clone ~ ~1 ~ ~ ~1 ~ -4 5 -28

Step 2: Detect Key (common crate)
1) /testforblocks ~ ~1 ~ ~ ~1 ~ -4 5 -28
2) /tag @a[x=-4, y=5, z=-28, r=10] add crate
3) /setblock -4 5 -28 air
4) /setblock -13 4 -35 redstone_block

Step 3: Give Rewards (common crate)
1) /setblock ~ ~1 ~ air
2) /scoreboard players random @a crate 1 3
3) /particle minecraft:totem_particle -4 6 -28
4) /playsound random.levelup @a[x=-4, y=5, z=-28, tag=crate, c=1]
5) /title @a[x=-4, y=5, z=-28, tag=crate, c=1] title §5•§a§lCommon Crate§5•
6) /execute @a[tag=crate, c=1, scores={crate=1}] ~ ~ ~ clone -13 4 -33 -13 4 -33 -4 5 -28
7) /execute @a[tag=crate, c=1, scores={crate=2}] ~ ~ ~ clone -13 5 -33 -13 5 -33 -4 5 -28
8) /execute @a[tag=crate, c=1, scores={crate=3}] ~ ~ ~ clone -13 6 -33 -13 6 -33 -4 5 -28
9) /tag @a[tag=crate] remove crate

Step 4: Detect if Empty
1) /testforblocks ~ ~1 ~ ~ ~1 ~ -4 5 -28
2) /clone -7 5 -34 -7 5 -34 -4 5 -28

Please Note: You’ll need to alter the commands so that the coordinates (e.g. x=,y=,z=) match the area that your crate and chests are located in your own worlds.

Luka’s Java Parity Download (2D Glass Panes Resource Pack)

One Comment on “How to make Server Crates – Tutorial Series #011

  1. Faiz

    April 1, 2021 10:26

    Very good

Write your comment Here