Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading