File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lib_trees/data/gm4_trees/function/sapling Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 44# run from gm4_trees:sapling/place_sapling
55
66# set up storage to be read from
7+ # mainhand
78data modify storage gm4_trees:temp sapling . type set from entity @s SelectedItem . components . " minecraft:custom_data " . gm4_trees.item.type
89## backwards compatibility with old items
910execute unless data storage gm4_trees:temp sapling run data modify storage gm4_trees:temp sapling . type set from entity @s SelectedItem . components . " minecraft:custom_data " . gm4_fruiting_trees.item.type
1011
12+ # offhand
13+ execute unless data storage gm4_trees:temp sapling run data modify storage gm4_trees:temp sapling . type set from entity @s equipment . offhand . components . " minecraft:custom_data " . gm4_trees.item.type
14+ ## backwards compatibility with old items
15+ execute unless data storage gm4_trees:temp sapling run data modify storage gm4_trees:temp sapling . type set from entity @s equipment . offhand . components . " minecraft:custom_data " . gm4_fruiting_trees.item.type
16+
1117# call initialize function so other modules can add their markers
1218# | NOTE positioned ~.5 ~.5 ~.5 to not break data packs that relied on this behavior of old versions of this library
1319execute positioned ~ .5 ~ .5 ~ .5 run function #gm4_trees:initialize_sapling
You can’t perform that action at this time.
0 commit comments