-
Bug
-
Resolution: Unresolved
-
None
-
1.19.62, 1.19.70, 1.19.71, 1.20.0, 1.21.2 Hotfix
-
None
-
Community Consensus
-
Windows
Recently I have been working on a Mystery box system for a Minecraft map. My goal is to create a chest that would give a player a random item for 5 xp per use. I was able to come up with a system to do this, but it would often crash the game after 1-2 uses.
The commands I used for this are:
- clone 15 -62 13 15 -62 12 2 -60 12 (This clones an empty trapped chest to the "Mystery Box" location )
- xp 5l @a[x=-1,y=-60,z=11,r=5,lm=5] (Takes away 5 xp from the player at the "Mystery Box" location)
- execute at @r[type=armor_stand,name="Box"] run clone ~ ~ ~ ~ ~ ~1 12 -62 12 (Clones a trapped chest at a random armor stand location to Location 2)
- clone 12 -62 12 12 -62 13 2 -60 12 (Clone the Trapped Chest from Location 2 to the Mystery Box)
Regarding the contents of the trapped chests, they are usually equipment items such as Iron Sword or Bow. Each trapped Chest only contains 1 item.
They following is a copy of my Minecraft World.
- relates to
-
MCPE-183536 Breaking a trapped chest that has been moved by a piston crashes the game
- Open