The Command Format
mcfunction
/scriptevent my:clone_and_move <x1 y1 z1> <x2 y2 z2> <destX destY destZ> <min-max>
Use code with caution.
<button class="FTsWP RmjGdc IsqrXb" aria-label="Copy code text to clipboard." data-sfc-cp="" data-wiz-attrbind="disabled=r0jZlf_u/ggNWmb" data-sfc-root="c" data-sfc-cb="KjsqPd=&r0jZlf_t:UEmoBd" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);"></button>
<button id="" class="FTsWP RmjGdc IsqrXb" aria-label="Copy code text to clipboard." data-sfc-cp="" data-wiz-attrbind="disabled=r0jZlf_u/ggNWmb" data-sfc-root="c" data-sfc-cb="KjsqPd=&r0jZlf_t:UEmoBd" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);"></button>
Breakdown of Arguments:
<x1 y1 z1>to<x2 y2 z2>: The coordinates defining the box (area) where your source chests/containers are located.<destX destY destZ>: The coordinates of the specific chest you want the items to move into.<min-max>: The total number of items to move (e.g.,1-10or64-64).
Step-by-Step Example
If you have a wall of chests from
0 64 0 to 2 66 0 and you want to move between 5 and 20 random items into a hopper at 10 64 10, you would type:mcfunction
/scriptevent my:clone_and_move 0 64 0 2 66 0 10 64 10 5-20
Use code with caution.
<button class="FTsWP RmjGdc IsqrXb" aria-label="Copy code text to clipboard." data-sfc-cp="" data-wiz-attrbind="disabled=r0jZlf_27/ggNWmb" data-sfc-root="c" data-sfc-cb="KjsqPd=&r0jZlf_26:UEmoBd" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);"></button>
<button id="" class="FTsWP RmjGdc IsqrXb" aria-label="Copy code text to clipboard." data-sfc-cp="" data-wiz-attrbind="disabled=r0jZlf_27/ggNWmb" data-sfc-root="c" data-sfc-cb="KjsqPd=&r0jZlf_26:UEmoBd" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);"></button>
Key Features to Know:
- Coordinate Shortcuts: You can use
~(e.g.,~ ~1 ~) to reference coordinates relative to yourself or the command block running the script. - Randomization: The script picks items from the source area and places them into random empty slots in the destination container.
- Scoreboard Tracking: Every time the script checks a source container, it updates a scoreboard objective called
item_count.- It lists items using the format:
c_x_y_z: item_name. - You can see this by typing
/scoreboard objectives setdisplay sidebar item_count.
- It lists items using the format:
- Safety: It only moves items into empty slots in the destination. If the destination is full, it will stop moving items.
Requirements:
- Beta APIs: Ensure the "Beta APIs" experimental toggle is turned ON in your world settings.
- Permissions: You must have operator permissions to run
/scriptevent.

