function init
function main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Passenger must be `LivingEntity` | |
summon minecraft:armor_stand 8.0 0.0 8.0 {Tags: ["vehicle"], Passengers: [{id: "minecraft:armor_stand", Tags: ["passenger"]}]} | |
# Move passenger to the current world position | |
execute as @e[x=7.5, y=-0.5, z=7.5, dx=0.0, tag=passenger] run function move_passenger | |
# Eject passenger | |
kill @e[x=7.5, y=-0.5, z=7.5, dx=0.0, tag=vehicle] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data modify storage trie nodes[0].colored set value true | |
data modify storage trie nodes[1].colored set value false | |
execute if score index[2] int matches 0 run function 00 | |
execute if score index[2] int matches 1 run function 01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// triggers | |
type BeeNestDestroyedTrigger = { | |
trigger: "bee_nest_destroyed", | |
conditions: { | |
block?: ResourceLocation, | |
item?: ItemPredicate, | |
num_bees_inside?: MinMaxBounds | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute if score index[0] int matches 0 run datapack enable "file/0" last | |
execute if score index[0] int matches 1 run datapack enable "file/1" last |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ($n + 1)_ge | |
scoreboard players operation eq _ -= ge _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "minecraft:generic", | |
"pools": [ | |
{ | |
"rolls": 1, | |
"entries": [ | |
{ | |
"type": "minecraft:item", | |
"name": "minecraft:tnt", | |
"functions": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialize buckets | |
data modify storage _ sorted set value [{_: 0b}, {_: 0b}, {_: 0b}, {_: 0b}, {_: 0b}, {_: 0b}, {_: 0b}, {_: 0b}] | |
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
# scatter non-empty data | |
execute if data storage _ data[0] run function scatter/ | |
# remove empty buckets | |
data remove storage _ sorted[{_: 0b}] |