The minecraft:randomize
sequence handler runs a certain number of actions in a randomized order, regardless of each action's result.
The sequence handler is successful if any picked action executed successfully.
Name | Description | Type | Default Value |
---|---|---|---|
entries | The entries of the sequence. | An action, list of actions or hash-prefixed action tag | |
count | The number of entries to run. If not present or greater than the number of entries present, it will run all entries randomly instead. | An optional, positive integer |
{ "type": "minecraft:sequence", "handler": "minecraft:randomize", "entries": [ { "action": { "type": "minecraft:teleport", "distance": 16, "entity": "this" } }, { "action": { "type": "minecraft:drop_item_from_block", "item": "minecraft:diamond", "position": "this" } }, { "action": { "type": "minecraft:spawn_entity", "entity": { "type": "minecraft:creeper" }, "position": "this" } } ], "count": 1 }