diff --git a/lib_trees/data/gm4_trees/function/sapling/summon_marker.mcfunction b/lib_trees/data/gm4_trees/function/sapling/summon_marker.mcfunction index 868da2da74..edac2d751d 100644 --- a/lib_trees/data/gm4_trees/function/sapling/summon_marker.mcfunction +++ b/lib_trees/data/gm4_trees/function/sapling/summon_marker.mcfunction @@ -4,10 +4,16 @@ # run from gm4_trees:sapling/place_sapling # set up storage to be read from +# mainhand data modify storage gm4_trees:temp sapling.type set from entity @s SelectedItem.components."minecraft:custom_data".gm4_trees.item.type ## backwards compatibility with old items execute 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 +# offhand +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 +## backwards compatibility with old items +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 + # call initialize function so other modules can add their markers # | NOTE positioned ~.5 ~.5 ~.5 to not break data packs that relied on this behavior of old versions of this library execute positioned ~.5 ~.5 ~.5 run function #gm4_trees:initialize_sapling