-
-
Notifications
You must be signed in to change notification settings - Fork 67
Towering Trees #1228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,274
−1
Merged
Towering Trees #1228
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
6d78df7
add module
TheThanathor c498f5e
build for guidebook
TheThanathor bcd7ac1
Merge remote-tracking branch 'upstream/master' into towering-trees
TheThanathor dc4e346
add support for all mega trees
TheThanathor 9279dfa
ah but use roots instead of glass
TheThanathor c4a8570
add all the trees \0oO/
TheThanathor 19a114f
add credits
TheThanathor c015dd8
update contributor credits
TheThanathor 2b1f8ab
finish final changes
TheThanathor acf6a7f
undo Thanathor > Djones in other modules / contributors.json
TheThanathor 0c0f302
runcow comments
TheThanathor c2f1b61
use as_integer method
TheThanathor cbb2fe6
Merge remote-tracking branch 'upstream/master' into towering-trees
TheThanathor ca3e67a
unchange the formatting of contributors.json
TheThanathor 6e0b754
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
misode 07e9d2c
Update guidebook triggers
misode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Towering Trees<!--$headerTitle--><!--$pmc:delete--> | ||
|
|
||
| Adds mega and small tree variants to any sapling that is missing one! <!--$pmc:headerSize--> | ||
|
|
||
| <!--$localAssetToURL--><!--$modrinth:replaceWithVideo--><!--$pmc:delete--> | ||
|
|
||
| ### Features | ||
| - Adds mega and small tree variants to any vanilla sapling that is missing one. | ||
| - Grow a mega mangrove tree and admire it! Or chop it down, your choice! | ||
| - Works with natural growth or bonemeal, no special interaction required, just plant a 2x2 of saplings! |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| key,en_us,de_de,en_ws | ||
| text.gm4.guidebook.towering_trees.description,"Oak, Birch, Acacia, Cherry and Mangrove trees have mega (2x2) variants.\n\nDark Oak and Pale Oak have small variants." | ||
| text.gm4.guidebook.module_desc.towering_trees,"Adds mega and small tree variants to any sapling that is missing one!" |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| id: gm4_towering_trees | ||
| name: Towering Trees | ||
| version: 1.0.X | ||
|
|
||
| data_pack: | ||
| load: . | ||
|
|
||
| pipeline: | ||
| - gm4_towering_trees.generate | ||
| - gm4.plugins.extend.module | ||
| - gm4.plugins.include.lib_trees | ||
|
|
||
| meta: | ||
| gm4: | ||
| versioning: | ||
| required: | ||
| lib_trees: 1.4.0 | ||
| website: | ||
| description: Adds mega and small tree variants to any sapling that is missing one! | ||
| recommended: | ||
| - gm4_metallurgy | ||
| wiki: https://wiki.gm4.co/wiki/Towering_Trees | ||
| credits: | ||
| Creator: | ||
| - Djones | ||
| - Kyrius | ||
| Tree Structures: | ||
| - BPR | ||
| - rednls | ||
| - Dinoguin_Jess | ||
| - Lune6 |
20 changes: 20 additions & 0 deletions
20
gm4_towering_trees/data/gm4_towering_trees/advancement/place_sapling.json
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "criteria": { | ||
| "place_sapling": { | ||
| "trigger": "minecraft:placed_block", | ||
| "conditions": { | ||
| "location": [ | ||
| { | ||
| "condition": "minecraft:match_tool", | ||
| "predicate": { | ||
| "items": "#gm4_towering_trees:supported_sapling" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "rewards": { | ||
| "function": "gm4_towering_trees:place_sapling" | ||
| } | ||
| } |
15 changes: 15 additions & 0 deletions
15
gm4_towering_trees/data/gm4_towering_trees/function/check_for_mega_tree.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # check what orientation this big tree has (if it is a big tree) | ||
| # @s = sapling marker | ||
| # located at @s | ||
| # run from generate_tree | ||
|
|
||
| # SE = 1 | ||
| execute if blocks ~1 ~ ~ ~1 ~ ~ ~ ~ ~ all if blocks ~1 ~ ~1 ~1 ~ ~1 ~ ~ ~ all if blocks ~ ~ ~1 ~ ~ ~1 ~ ~ ~ all run return 1 | ||
| # NE = 2 | ||
| execute if blocks ~1 ~ ~ ~1 ~ ~ ~ ~ ~ all if blocks ~1 ~ ~-1 ~1 ~ ~-1 ~ ~ ~ all if blocks ~ ~ ~-1 ~ ~ ~-1 ~ ~ ~ all run return 2 | ||
| # SW = 3 | ||
| execute if blocks ~-1 ~ ~ ~-1 ~ ~ ~ ~ ~ all if blocks ~-1 ~ ~1 ~-1 ~ ~1 ~ ~ ~ all if blocks ~ ~ ~1 ~ ~ ~1 ~ ~ ~ all run return 3 | ||
| # NW = 4 | ||
| execute if blocks ~-1 ~ ~ ~-1 ~ ~ ~ ~ ~ all if blocks ~-1 ~ ~-1 ~-1 ~ ~-1 ~ ~ ~ all if blocks ~ ~ ~-1 ~ ~ ~-1 ~ ~ ~ all run return 4 | ||
|
|
||
| return 0 |
9 changes: 9 additions & 0 deletions
9
gm4_towering_trees/data/gm4_towering_trees/function/clear_sapling.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # removes this sapling so features can be placed | ||
| # @s = sapling marker | ||
| # at @s | ||
| # run from generate_mega_tree | ||
| # run from generate_small_tree | ||
|
|
||
| execute if block ~ ~ ~ mangrove_propagule[waterlogged=true] run tag @s add gm4_mangrove_tree_sapling.waterlogged | ||
| execute unless entity @s[tag=gm4_mangrove_tree_sapling.waterlogged] run fill ~ ~ ~ ~ ~ ~ air replace #gm4_towering_trees:supported_sapling | ||
| execute if entity @s[tag=gm4_mangrove_tree_sapling.waterlogged] run setblock ~ ~ ~ water |
20 changes: 20 additions & 0 deletions
20
gm4_towering_trees/data/gm4_towering_trees/function/generate_mega_tree.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # generates the tree - mega | ||
| # @s = sapling marker | ||
| # located at @s (offset to be at the negative corner of the 2x2) | ||
| # run from generate_tree | ||
|
|
||
| # towering | ||
| execute if entity @s[tag=gm4_oak_tree_sapling] run return run function gm4_towering_trees:generate_tree_type/oak/pick_variant | ||
| execute if entity @s[tag=gm4_acacia_tree_sapling] run return run function gm4_towering_trees:generate_tree_type/acacia/pick_variant | ||
| execute if entity @s[tag=gm4_cherry_tree_sapling] run return run function gm4_towering_trees:generate_tree_type/cherry/pick_variant | ||
| execute if entity @s[tag=gm4_mangrove_tree_sapling] run return run function gm4_towering_trees:generate_tree_type/mangrove/pick_variant | ||
| execute if entity @s[tag=gm4_birch_tree_sapling] run return run function gm4_towering_trees:generate_tree_type/birch/pick_variant | ||
|
|
||
| # vanilla - needs to remove the saplings first so they can be placed | ||
| execute align xyz as @e[type=marker,tag=gm4_towering_trees_sapling,dx=1,dy=0,dz=1] at @s run function gm4_towering_trees:clear_sapling | ||
|
|
||
| execute if entity @s[tag=gm4_pale_oak_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:pale_oak_bonemeal | ||
| execute if entity @s[tag=gm4_dark_oak_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:dark_oak | ||
|
|
||
| # replace sapling if placement failed | ||
| execute if score $tree_placed gm4_towering_trees_data matches 0 align xyz as @e[type=marker,tag=gm4_towering_trees_sapling,dx=1,dy=0,dz=1] at @s run function gm4_towering_trees:replace_sapling |
21 changes: 21 additions & 0 deletions
21
gm4_towering_trees/data/gm4_towering_trees/function/generate_small_tree.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # generates the tree - small | ||
| # @s = sapling marker | ||
| # located at @s | ||
| # run from generate_tree | ||
|
|
||
| # remove sapling to clear the space | ||
| function gm4_towering_trees:clear_sapling | ||
|
|
||
| # vanilla | ||
| execute if entity @s[tag=gm4_oak_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:oak | ||
| execute if entity @s[tag=gm4_acacia_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:acacia | ||
| execute if entity @s[tag=gm4_cherry_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:cherry | ||
| execute if entity @s[tag=gm4_mangrove_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:mangrove | ||
| execute if entity @s[tag=gm4_birch_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:birch | ||
|
|
||
| # towering | ||
| execute if entity @s[tag=gm4_pale_oak_tree_sapling] store success score $tree_placed gm4_towering_trees_data run function gm4_towering_trees:generate_tree_type/pale_oak/pick_variant | ||
| execute if entity @s[tag=gm4_dark_oak_tree_sapling] store success score $tree_placed gm4_towering_trees_data run function gm4_towering_trees:generate_tree_type/dark_oak/pick_variant | ||
|
|
||
| # replace sapling if placement failed | ||
| execute if score $tree_placed gm4_towering_trees_data matches 0 run function gm4_towering_trees:replace_sapling |
20 changes: 20 additions & 0 deletions
20
gm4_towering_trees/data/gm4_towering_trees/function/generate_tree.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # generates the tree | ||
| # @s = sapling marker | ||
| # located at @s | ||
| # run from gm4_towering_trees:verify/generate_tree | ||
|
|
||
| scoreboard players set $tree_placed gm4_towering_trees_data 0 | ||
|
|
||
| # check if this is a big tree | ||
| execute store result score $big_tree gm4_towering_trees_data run function gm4_towering_trees:check_for_mega_tree | ||
|
|
||
| # generate mega tree positionionally based on which sapling grew | ||
| execute if score $big_tree gm4_towering_trees_data matches 1 run function gm4_towering_trees:generate_mega_tree | ||
| execute if score $big_tree gm4_towering_trees_data matches 2 positioned ~ ~ ~-1 run function gm4_towering_trees:generate_mega_tree | ||
| execute if score $big_tree gm4_towering_trees_data matches 3 positioned ~-1 ~ ~ run function gm4_towering_trees:generate_mega_tree | ||
| execute if score $big_tree gm4_towering_trees_data matches 4 positioned ~-1 ~ ~-1 run function gm4_towering_trees:generate_mega_tree | ||
| # small trees | ||
| execute if score $big_tree gm4_towering_trees_data matches 0 run function gm4_towering_trees:generate_small_tree | ||
|
|
||
| # remove the saplings | ||
| execute if score $tree_placed gm4_towering_trees_data matches 1 run kill @e[type=marker,tag=gm4_towering_trees_sapling.target,limit=4,distance=..3] |
11 changes: 11 additions & 0 deletions
11
...ering_trees/data/gm4_towering_trees/function/generate_tree_type/mangrove/extra.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # extra function for mangrove trees | ||
| # @s = sapling marker | ||
| # located at @s | ||
| # run from generate_tree_type/mangrove/place_tree | ||
|
|
||
| # remove the saplings, this doesn't always happen for mangrove trees | ||
| fill ~ ~ ~ ~1 ~ ~1 air replace mangrove_propagule[waterlogged=false] | ||
| fill ~ ~ ~ ~1 ~ ~1 water replace mangrove_propagule[waterlogged=true] | ||
|
|
||
| # place the roots after 1 tick to allow markers to load in | ||
| schedule function gm4_towering_trees:generate_tree_type/mangrove/roots/schedule 1t |
32 changes: 32 additions & 0 deletions
32
..._trees/data/gm4_towering_trees/function/generate_tree_type/mangrove/roots/loop.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # build mangrove tree roots | ||
| # @s = mangrove tree root marker | ||
| # at @s positioned ^ ^-y ^z, randomly offset | ||
| # run from generate_tree_type/mangrove/roots/start | ||
| # run from here | ||
|
|
||
| # if block cannot be replaced with root or max length was reached return | ||
| execute unless block ~ ~ ~ #gm4_towering_trees:mangrove_root_replaceable run return fail | ||
| scoreboard players remove $max_length gm4_towering_trees_data 1 | ||
| execute unless score $max_length gm4_towering_trees_data matches 1.. run return fail | ||
|
|
||
| # fill with muddy / waterlogged / normal roots | ||
| fill ~ ~ ~ ~ ~ ~ muddy_mangrove_roots replace mud | ||
| fill ~ ~ ~ ~ ~ ~ mangrove_roots[waterlogged=true] replace #gm4:water | ||
| execute unless block ~ ~ ~ mangrove_roots unless block ~ ~ ~ muddy_mangrove_roots run setblock ~ ~ ~ mangrove_roots | ||
|
|
||
| # random carpets | ||
| execute if predicate {condition:"random_chance",chance:0.5} run fill ~ ~1 ~ ~ ~1 ~ moss_carpet replace #air | ||
|
|
||
| # small chance to skew to ground from now on | ||
| execute if predicate {condition:"random_chance",chance:0.02} run tag @s add gm4_towering_trees.mangrove_root_skewed | ||
|
|
||
| # pick direction | ||
| execute if predicate {condition:"random_chance",chance:0.8} positioned ~ ~-1 ~ run return run function gm4_towering_trees:generate_tree_type/mangrove/roots/loop | ||
| execute if score $max_distance_from_tree gm4_towering_trees_data matches 0 positioned ~ ~-1 ~ run return run function gm4_towering_trees:generate_tree_type/mangrove/roots/loop | ||
|
|
||
| # if skewed to ground start a loop down if the root is going forward | ||
| scoreboard players set $max_skew_length gm4_towering_trees_data 5 | ||
| execute if entity @s[tag=gm4_towering_trees.mangrove_root_skewed] positioned ~ ~-1 ~ run function gm4_towering_trees:generate_tree_type/mangrove/roots/loop_to_ground | ||
|
|
||
| scoreboard players remove $max_distance_from_tree gm4_towering_trees_data 1 | ||
| execute positioned ^ ^ ^1 run function gm4_towering_trees:generate_tree_type/mangrove/roots/loop |
18 changes: 18 additions & 0 deletions
18
...a/gm4_towering_trees/function/generate_tree_type/mangrove/roots/loop_to_ground.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # build mangrove tree roots | ||
| # @s = mangrove tree root marker | ||
| # at @s positioned ^ ^-y ^z, randomly offset, then positioned ~ ~-n ~ | ||
| # run from generate_tree_type/mangrove/roots/loop | ||
| # run from here | ||
|
|
||
| # if block cannot be replaced with root return | ||
| execute unless block ~ ~ ~ #gm4_towering_trees:mangrove_root_replaceable run return fail | ||
| scoreboard players remove $max_skew_length gm4_towering_trees_data 1 | ||
| execute unless score $max_skew_length gm4_towering_trees_data matches 1.. run return fail | ||
|
|
||
| # fill with (muddy) roots | ||
| fill ~ ~ ~ ~ ~ ~ muddy_mangrove_roots replace mud | ||
| fill ~ ~ ~ ~ ~ ~ mangrove_roots[waterlogged=true] replace #gm4:water | ||
| execute unless block ~ ~ ~ mangrove_roots unless block ~ ~ ~ muddy_mangrove_roots run setblock ~ ~ ~ mangrove_roots | ||
|
|
||
| # go down to ground | ||
| execute positioned ~ ~-1 ~ run function gm4_towering_trees:generate_tree_type/mangrove/roots/loop_to_ground |
6 changes: 6 additions & 0 deletions
6
...es/data/gm4_towering_trees/function/generate_tree_type/mangrove/roots/schedule.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # look for mangrove tree root markers | ||
| # @s = unspecified | ||
| # at unspecified | ||
| # run from generate_tree_type/mangrove/extra | ||
|
|
||
| execute as @e[type=marker,tag=gm4_towering_trees.mangrove_root] at @s run function gm4_towering_trees:generate_tree_type/mangrove/roots/start |
9 changes: 9 additions & 0 deletions
9
...trees/data/gm4_towering_trees/function/generate_tree_type/mangrove/roots/start.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # build mangrove tree roots | ||
| # @s = mangrove tree root marker | ||
| # at @s | ||
| # run from generate_tree_type/mangrove/roots/schedule | ||
|
|
||
| scoreboard players set $max_distance_from_tree gm4_towering_trees_data 7 | ||
| scoreboard players set $max_length gm4_towering_trees_data 16 | ||
| function gm4_towering_trees:generate_tree_type/mangrove/roots/loop | ||
| kill @s |
10 changes: 10 additions & 0 deletions
10
gm4_towering_trees/data/gm4_towering_trees/function/init.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| execute unless score towering_trees gm4_modules matches 1 run data modify storage gm4:log queue append value {type:"install",module:"Towering Trees"} | ||
| execute unless score towering_trees gm4_earliest_version < towering_trees gm4_modules run scoreboard players operation towering_trees gm4_earliest_version = towering_trees gm4_modules | ||
| scoreboard players set towering_trees gm4_modules 1 | ||
|
|
||
| # to tree or not to tree | ||
|
|
||
| # scoreboards and constants | ||
| scoreboard objectives add gm4_towering_trees_data dummy | ||
|
|
||
| #$moduleUpdateList |
16 changes: 16 additions & 0 deletions
16
gm4_towering_trees/data/gm4_towering_trees/function/initialize_sapling.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # initializes the vanilla tree's marker | ||
| # @s = player who placed down the vanilla tree sapling | ||
| # located at the center of the placed sapling | ||
| # run from verify/initialize_sapling | ||
|
|
||
| # summon marker | ||
| # spruce and jungle are not included as they already have both variants of tree | ||
| execute if block ~ ~ ~ oak_sapling run summon marker ~ ~ ~ {CustomName:"gm4_oak_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_oak_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| execute if block ~ ~ ~ birch_sapling run summon marker ~ ~ ~ {CustomName:"gm4_birch_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_birch_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| execute if block ~ ~ ~ acacia_sapling run summon marker ~ ~ ~ {CustomName:"gm4_acacia_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_acacia_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| execute if block ~ ~ ~ dark_oak_sapling run summon marker ~ ~ ~ {CustomName:"gm4_dark_oak_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_dark_oak_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| execute if block ~ ~ ~ cherry_sapling run summon marker ~ ~ ~ {CustomName:"gm4_cherry_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_cherry_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| execute if block ~ ~ ~ pale_oak_sapling run summon marker ~ ~ ~ {CustomName:"gm4_pale_oak_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_pale_oak_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| execute if block ~ ~ ~ mangrove_propagule run summon marker ~ ~ ~ {CustomName:"gm4_mangrove_tree_sapling",Tags:["gm4_tree_sapling","gm4_towering_trees_sapling","gm4_mangrove_tree_sapling","smithed.entity","smithed.strict","smithed.block"]} | ||
| # set stage requirement (higher = longer to grow) | ||
| scoreboard players set @e[type=marker,tag=gm4_towering_trees_sapling,distance=..0.1] gm4_sap_growth 2 | ||
7 changes: 7 additions & 0 deletions
7
gm4_towering_trees/data/gm4_towering_trees/function/place_sapling.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Initiates the search for the placed sapling | ||
| # @s = player that just placed a custom sapling | ||
| # at @s | ||
| advancement revoke @s only gm4_towering_trees:place_sapling | ||
|
|
||
| # have to engage lib_trees from here since this module works with vanilla saplings | ||
| function #gm4_trees:place_sapling |
14 changes: 14 additions & 0 deletions
14
gm4_towering_trees/data/gm4_towering_trees/function/replace_sapling.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # replaces this sapling if the tree could not be placed | ||
| # @s = sapling marker | ||
| # at @s | ||
| # run from generate_mega_tree | ||
| # run from generate_small_tree | ||
|
|
||
| execute if entity @s[tag=gm4_oak_tree_sapling] run setblock ~ ~ ~ oak_sapling[stage=0] | ||
| execute if entity @s[tag=gm4_acacia_tree_sapling] run setblock ~ ~ ~ acacia_sapling[stage=0] | ||
| execute if entity @s[tag=gm4_cherry_tree_sapling] run setblock ~ ~ ~ cherry_sapling[stage=0] | ||
| execute if entity @s[tag=gm4_mangrove_tree_sapling.waterlogged] run setblock ~ ~ ~ mangrove_propagule[stage=0,age=4,waterlogged=true] | ||
| execute if entity @s[tag=!gm4_mangrove_tree_sapling.waterlogged,tag=gm4_mangrove_tree_sapling] run setblock ~ ~ ~ mangrove_propagule[stage=0,age=4,waterlogged=false] | ||
| execute if entity @s[tag=gm4_birch_tree_sapling] run setblock ~ ~ ~ birch_sapling[stage=0] | ||
| execute if entity @s[tag=gm4_pale_oak_tree_sapling] run setblock ~ ~ ~ pale_oak_sapling[stage=0] | ||
| execute if entity @s[tag=gm4_dark_oak_tree_sapling] run setblock ~ ~ ~ dark_oak_sapling[stage=0] |
6 changes: 6 additions & 0 deletions
6
gm4_towering_trees/data/gm4_towering_trees/function/verify/generate_tree.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # verifies that the sapling type is from this module | ||
| # @s = gm4_tree_sapling marker | ||
| # located at @s | ||
| # run from gm4_trees:advance_stage via #gm4_trees:generate_tree | ||
|
|
||
| execute if entity @s[tag=gm4_towering_trees_sapling] run function gm4_towering_trees:generate_tree |
7 changes: 7 additions & 0 deletions
7
gm4_towering_trees/data/gm4_towering_trees/function/verify/initialize_sapling.mcfunction
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # verifies that the sapling type is from this module | ||
| # @s = player who just placed down a custom sapling | ||
| # located at the center sapling block | ||
| # run from gm4_trees:sapling/summon marker via #gm4_trees:initialize_sapling | ||
|
|
||
| # this module runs on vanilla saplings, so we want to check for no specific type | ||
| execute unless data storage gm4_trees:temp sapling{} align xyz unless entity @e[tag=smithed.block,dx=0,dy=0,dz=0,limit=1] positioned ~.5 ~.5 ~.5 run function gm4_towering_trees:initialize_sapling | ||
TheThanathor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
42 changes: 42 additions & 0 deletions
42
gm4_towering_trees/data/gm4_towering_trees/guidebook/towering_trees.json
TheThanathor marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "id": "towering_trees", | ||
| "name": "Towering Trees", | ||
| "module_type": "module", | ||
| "icon": { | ||
| "id": "minecraft:oak_sapling" | ||
| }, | ||
| "criteria": { | ||
| "obtain_sapling": { | ||
| "trigger": "minecraft:inventory_changed", | ||
| "conditions": { | ||
| "items": [ | ||
| { | ||
| "items": "#gm4_towering_trees:supported_sapling" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "sections": [ | ||
| { | ||
| "name": "towering_trees", | ||
| "enable": [], | ||
| "requirements": [ | ||
| [ | ||
| "obtain_sapling" | ||
| ] | ||
| ], | ||
| "pages": [ | ||
| [ | ||
| { | ||
| "insert": "title" | ||
| }, | ||
| { | ||
| "translate": "text.gm4.guidebook.towering_trees.description", | ||
| "fallback": "Oak, Birch, Acacia, Cherry and Mangrove trees have mega (2x2) variants.\n\nDark Oak and Pale Oak have small variants." | ||
| } | ||
| ] | ||
| ] | ||
| } | ||
| ] | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+511 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/a.nbt
Binary file not shown.
Binary file added
BIN
+498 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/b.nbt
Binary file not shown.
Binary file added
BIN
+563 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/c.nbt
Binary file not shown.
Binary file added
BIN
+568 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/d.nbt
Binary file not shown.
Binary file added
BIN
+586 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/e.nbt
Binary file not shown.
Binary file added
BIN
+506 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/f.nbt
Binary file not shown.
Binary file added
BIN
+514 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/g.nbt
Binary file not shown.
Binary file added
BIN
+565 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/h.nbt
Binary file not shown.
Binary file added
BIN
+580 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/i.nbt
Binary file not shown.
Binary file added
BIN
+576 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/dark_oak/j.nbt
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+509 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/a.nbt
Binary file not shown.
Binary file added
BIN
+497 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/b.nbt
Binary file not shown.
Binary file added
BIN
+562 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/c.nbt
Binary file not shown.
Binary file added
BIN
+567 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/d.nbt
Binary file not shown.
Binary file added
BIN
+585 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/e.nbt
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+513 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/g.nbt
Binary file not shown.
Binary file added
BIN
+564 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/h.nbt
Binary file not shown.
Binary file added
BIN
+579 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/i.nbt
Binary file not shown.
Binary file added
BIN
+575 Bytes
gm4_towering_trees/data/gm4_towering_trees/structure/pale_oak/j.nbt
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could a
limit=1be inserted here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most likely, but technically it might break if there's already a marker there? Apple trees doesn't use a
limit=1, not sure if that's because it was decided not to or because it was missed