diff --git a/base/data/gm4/tags/block/waterloggable.json b/base/data/gm4/tags/block/waterloggable.json index f0fc5f6291..937852cbff 100644 --- a/base/data/gm4/tags/block/waterloggable.json +++ b/base/data/gm4/tags/block/waterloggable.json @@ -1,6 +1,7 @@ { "values": [ "#minecraft:all_signs", + "minecraft:amethyst_cluster", {"id": "#minecraft:bars", "required": false}, "#minecraft:campfires", "#minecraft:candles", @@ -20,7 +21,6 @@ "#minecraft:wall_signs", "#minecraft:walls", {"id": "#minecraft:wooden_shelves", "required": false}, - "minecraft:amethyst_cluster", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:black_stained_glass_pane", diff --git a/gm4/modeldata_registry.json b/gm4/modeldata_registry.json index 430a974d53..1e059a1d76 100644 --- a/gm4/modeldata_registry.json +++ b/gm4/modeldata_registry.json @@ -1296,6 +1296,8 @@ "gm4_desire_lines:gui/advancement/desire_lines_8000": 1 }, "oak_sapling": { + "gm4_expanded_trees:guidebook_icon/expanded_trees": 1, + "gm4_towering_trees:guidebook_icon/towering_trees": 2, "gm4_apple_trees:item/apple_tree_sapling": 4 }, "oak_sign": { diff --git a/gm4/plugins/manifest.py b/gm4/plugins/manifest.py index 1fd56e3a54..5574c24a2d 100644 --- a/gm4/plugins/manifest.py +++ b/gm4/plugins/manifest.py @@ -21,7 +21,7 @@ parent_logger = logging.getLogger("gm4.manifest") -SUPPORTED_GAME_VERSIONS = ["1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9", "1.21.10"] +SUPPORTED_GAME_VERSIONS = ["1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9"] # config models for beet.yaml metas CreditsModel = dict[str, list[str]] diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction index 844f3d744f..f968a8f2c7 100644 --- a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction @@ -3,8 +3,8 @@ # at @s # run from projectile/copper_torch/check -execute positioned ~.1 ~ ~ if predicate gm4_crossbow_cartridges:check_block/east run setblock ~-.15 ~ ~ minecraft:copper_wall_torch[facing=west] -execute positioned ~ ~ ~.1 if predicate gm4_crossbow_cartridges:check_block/south run setblock ~ ~ ~-.15 minecraft:copper_wall_torch[facing=north] -execute positioned ~-.1 ~ ~ if predicate gm4_crossbow_cartridges:check_block/west run setblock ~.15 ~ ~ minecraft:copper_wall_torch[facing=east] -execute positioned ~ ~ ~-.1 if predicate gm4_crossbow_cartridges:check_block/north run setblock ~ ~ ~.15 minecraft:copper_wall_torch[facing=south] -execute positioned ~ ~-.1 ~ if predicate gm4_crossbow_cartridges:check_block/below run setblock ~ ~.15 ~ minecraft:copper_torch +execute positioned ~.05 ~ ~ if predicate gm4_crossbow_cartridges:check_block/east run setblock ~-.1 ~ ~ minecraft:copper_wall_torch[facing=west] +execute positioned ~ ~ ~.05 if predicate gm4_crossbow_cartridges:check_block/south run setblock ~ ~ ~-.1 minecraft:copper_wall_torch[facing=north] +execute positioned ~-.05 ~ ~ if predicate gm4_crossbow_cartridges:check_block/west run setblock ~.1 ~ ~ minecraft:copper_wall_torch[facing=east] +execute positioned ~ ~ ~-.05 if predicate gm4_crossbow_cartridges:check_block/north run setblock ~ ~ ~.1 minecraft:copper_wall_torch[facing=south] +execute positioned ~ ~-.05 ~ if predicate gm4_crossbow_cartridges:check_block/below run setblock ~ ~.1 ~ minecraft:copper_torch diff --git a/gm4_disassemblers/beet.yaml b/gm4_disassemblers/beet.yaml index 95e6b309d8..b67d3c7e8c 100644 --- a/gm4_disassemblers/beet.yaml +++ b/gm4_disassemblers/beet.yaml @@ -11,12 +11,6 @@ data_pack: min_format: 88 max_format: 88 directory: since_88 - - formats: - min_inclusive: 81 - max_inclusive: 88 - min_format: 81 - max_format: 88 - directory: empty resource_pack: load: . diff --git a/gm4_guidebook/triggers.json b/gm4_guidebook/triggers.json index 9d8930384d..aea53d8d83 100644 --- a/gm4_guidebook/triggers.json +++ b/gm4_guidebook/triggers.json @@ -1,6 +1,6 @@ { "__important__": "Generated by generate_guidebooks.py. Don't manually update this", - "__next__": 122, + "__next__": 124, "animi_shamir": 91, "apple_trees": 83, "arborenda_shamir": 20, @@ -41,6 +41,7 @@ "enderman_support_class": 80, "enlarging_phantoms": 101, "everstone": 75, + "expanded_trees": 122, "falling_stars": 43, "forming_press": 16, "forterra_shamir": 19, @@ -108,6 +109,7 @@ "tinkering_compressors": 52, "tipped_skeletons": 44, "tower_structures": 89, + "towering_trees": 123, "tunnel_bores": 59, "undead_players": 67, "vecto_shamir": 95, diff --git a/gm4_standard_crafting/beet.yaml b/gm4_standard_crafting/beet.yaml index e24d1dc75a..50c337c977 100644 --- a/gm4_standard_crafting/beet.yaml +++ b/gm4_standard_crafting/beet.yaml @@ -11,12 +11,6 @@ data_pack: min_format: 88 max_format: 88 directory: since_88 - - formats: - min_inclusive: 81 - max_inclusive: 88 - min_format: 81 - max_format: 88 - directory: empty pipeline: - generate_recipes diff --git a/gm4_towering_trees/README.md b/gm4_towering_trees/README.md new file mode 100644 index 0000000000..52c8dc9699 --- /dev/null +++ b/gm4_towering_trees/README.md @@ -0,0 +1,8 @@ +# Towering Trees + +Adds mega and small tree variants to any sapling that is missing one! + +### Features +- Adds mega and small tree variants to any sapling that is missing one. +- That's it! 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! diff --git a/gm4_towering_trees/assets/translations.csv b/gm4_towering_trees/assets/translations.csv new file mode 100644 index 0000000000..ce4fe4fce1 --- /dev/null +++ b/gm4_towering_trees/assets/translations.csv @@ -0,0 +1,3 @@ +key,en_us,de_de,en_ws +text.gm4.guidebook.towering_trees.description,"Oak, Birch, Acacia, Cheery 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!" diff --git a/gm4_towering_trees/beet.yaml b/gm4_towering_trees/beet.yaml new file mode 100644 index 0000000000..3585ce8c82 --- /dev/null +++ b/gm4_towering_trees/beet.yaml @@ -0,0 +1,24 @@ +id: gm4_towering_trees +name: Towering Trees +version: 1.0.X + +data_pack: + load: . + +pipeline: + - 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: + - Djoness diff --git a/gm4_towering_trees/data/gm4_towering_trees/advancement/place_sapling.json b/gm4_towering_trees/data/gm4_towering_trees/advancement/place_sapling.json new file mode 100644 index 0000000000..6751e86b4e --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/advancement/place_sapling.json @@ -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" + } +} diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/check_for_mega_tree.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/check_for_mega_tree.mcfunction new file mode 100644 index 0000000000..ff22a3858a --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/check_for_mega_tree.mcfunction @@ -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 diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/generate_mega_tree.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/generate_mega_tree.mcfunction new file mode 100644 index 0000000000..15f75227d1 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/generate_mega_tree.mcfunction @@ -0,0 +1,15 @@ +# generates the tree - mega +# @s = sapling marker +# located at @s (offset to be at the negative corner of the 2x2) +# run from generate_tree + +# vanilla +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 + +# towering +execute if entity @s[tag=gm4_oak_tree_sapling] run function gm4_towering_trees:generate_tree_type/oak/pick_variant +execute if entity @s[tag=gm4_acacia_tree_sapling] run function gm4_towering_trees:generate_tree_type/oak/pick_variant +execute if entity @s[tag=gm4_cherry_tree_sapling] run function gm4_towering_trees:generate_tree_type/oak/pick_variant +execute if entity @s[tag=gm4_mangrove_tree_sapling] run function gm4_towering_trees:generate_tree_type/oak/pick_variant +execute if entity @s[tag=gm4_birch_tree_sapling] run function gm4_towering_trees:generate_tree_type/oak/pick_variant diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/generate_small_tree.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/generate_small_tree.mcfunction new file mode 100644 index 0000000000..c6ca2b5041 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/generate_small_tree.mcfunction @@ -0,0 +1,18 @@ +# generates the tree - small +# @s = sapling marker +# located at @s +# run from generate_tree + +# mark sapling and clear the space +function gm4_towering_trees:mark_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 place feature minecraft:fancy_oak +execute if entity @s[tag=gm4_dark_oak_tree_sapling] store success score $tree_placed gm4_towering_trees_data run place feature minecraft:fancy_oak diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree.mcfunction new file mode 100644 index 0000000000..6955bac9c5 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree.mcfunction @@ -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] diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree_type/oak/1.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree_type/oak/1.mcfunction new file mode 100644 index 0000000000..d23b4141cb --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree_type/oak/1.mcfunction @@ -0,0 +1,20 @@ +# generates the tree - mega oak +# @s = sapling marker +# located at @s (offset to be at the negative corner of the 2x2) +# run from generate_tree_type/oak/pick_variant + +execute store result score $blocks_moved gm4_towering_trees_data positioned ~-1 ~ ~-1 run clone ~ ~ ~ ~4 ~14 ~4 ~ ~ ~ filtered #gm4_towering_trees:tree_placeable move +execute unless score $blocks_moved gm4_towering_trees_data matches 375 run return fail + +execute store result score $blocks_moved gm4_towering_trees_data positioned ~-8 ~3 ~-9 run clone ~ ~ ~ ~19 ~11 ~18 ~ ~ ~ filtered #gm4_towering_trees:tree_placeable move +execute unless score $blocks_moved gm4_towering_trees_data matches 4560 run return fail + +place feature gm4_towering_trees:leaf_litter ~ ~1 ~ + +execute store result score $tree_rotation gm4_towering_trees_data run random value 1..4 +execute if score $tree_rotation gm4_towering_trees_data matches 1 run place template gm4_towering_trees:oak/1 ~-8 ~ ~-9 +execute if score $tree_rotation gm4_towering_trees_data matches 2 run place template gm4_towering_trees:oak/1 ~9 ~ ~10 180 +execute if score $tree_rotation gm4_towering_trees_data matches 3 run place template gm4_towering_trees:oak/1 ~10 ~ ~-8 clockwise_90 +execute if score $tree_rotation gm4_towering_trees_data matches 4 run place template gm4_towering_trees:oak/1 ~-9 ~ ~9 counterclockwise_90 + +scoreboard players set $tree_placed gm4_towering_trees_data 1 diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree_type/oak/pick_variant.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree_type/oak/pick_variant.mcfunction new file mode 100644 index 0000000000..1d57b8d7ed --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/generate_tree_type/oak/pick_variant.mcfunction @@ -0,0 +1,11 @@ +# generates the tree - mega oak +# @s = sapling marker +# located at @s (offset to be at the negative corner of the 2x2) +# run from generate_mega_tree + +execute store result score $tree_variant gm4_towering_trees_data run random value 1..2 + +execute if score $tree_variant gm4_towering_trees_data matches 1 run function gm4_towering_trees:generate_tree_type/oak/1 +execute if score $tree_variant gm4_towering_trees_data matches 2 run function gm4_towering_trees:generate_tree_type/oak/1 + +execute if score $tree_placed gm4_towering_trees_data matches 1 run fill ~ ~-1 ~ ~1 ~-1 ~1 dirt replace grass_block diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/init.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/init.mcfunction new file mode 100644 index 0000000000..3537001bf4 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/init.mcfunction @@ -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 diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/initialize_sapling.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/initialize_sapling.mcfunction new file mode 100644 index 0000000000..ec9bf1891c --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/initialize_sapling.mcfunction @@ -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 diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/place_sapling.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/place_sapling.mcfunction new file mode 100644 index 0000000000..e85517ac7b --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/place_sapling.mcfunction @@ -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 diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/verify/generate_tree.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/verify/generate_tree.mcfunction new file mode 100644 index 0000000000..037da2a3ef --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/verify/generate_tree.mcfunction @@ -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 diff --git a/gm4_towering_trees/data/gm4_towering_trees/function/verify/initialize_sapling.mcfunction b/gm4_towering_trees/data/gm4_towering_trees/function/verify/initialize_sapling.mcfunction new file mode 100644 index 0000000000..243196ca15 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/function/verify/initialize_sapling.mcfunction @@ -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 diff --git a/gm4_towering_trees/data/gm4_towering_trees/guidebook/expanded_trees.json b/gm4_towering_trees/data/gm4_towering_trees/guidebook/expanded_trees.json new file mode 100644 index 0000000000..4e254f6aab --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/guidebook/expanded_trees.json @@ -0,0 +1,50 @@ +{ + "id": "towering_trees", + "name": "Towering Trees", + "module_type": "module", + "icon": { + "id": "minecraft:oak_sapling" + }, + "criteria": { + "obtain_sapling": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "oak_sapling", + "birch_sapling", + "acacia_sapling", + "dark_oak_sapling", + "cherry_sapling", + "pale_oak_sapling", + "mangrove_propagule" + ] + } + ] + } + } + }, + "sections": [ + { + "name": "towering_trees", + "enable": [], + "requirements": [ + [ + "obtain_sapling" + ] + ], + "pages": [ + [ + { + "insert": "title" + }, + { + "translate": "text.gm4.guidebook.towering_trees.description", + "fallback": "Oak, Birch, Acacia, Cheery and Mangrove trees have mega (2x2) variants.\n\nDark Oak and Pale Oak have small variants." + } + ] + ] + } + ] +} diff --git a/gm4_towering_trees/data/gm4_towering_trees/structure/oak/1.nbt b/gm4_towering_trees/data/gm4_towering_trees/structure/oak/1.nbt new file mode 100644 index 0000000000..cdfa86f3df Binary files /dev/null and b/gm4_towering_trees/data/gm4_towering_trees/structure/oak/1.nbt differ diff --git a/gm4_towering_trees/data/gm4_towering_trees/tags/block/supported_sapling.json b/gm4_towering_trees/data/gm4_towering_trees/tags/block/supported_sapling.json new file mode 100644 index 0000000000..42bcd05931 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/tags/block/supported_sapling.json @@ -0,0 +1,11 @@ +{ + "values": [ + "oak_sapling", + "birch_sapling", + "acacia_sapling", + "dark_oak_sapling", + "cherry_sapling", + "pale_oak_sapling", + "mangrove_propagule" + ] +} diff --git a/gm4_towering_trees/data/gm4_towering_trees/tags/block/tree_placeable.json b/gm4_towering_trees/data/gm4_towering_trees/tags/block/tree_placeable.json new file mode 100644 index 0000000000..e9b106993a --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/tags/block/tree_placeable.json @@ -0,0 +1,8 @@ +{ + "values": [ + "#minecraft:replaceable_by_trees", + "#air", + "#minecraft:logs", + "#gm4_towering_trees:supported_sapling" + ] +} diff --git a/gm4_towering_trees/data/gm4_towering_trees/tags/item/supported_sapling.json b/gm4_towering_trees/data/gm4_towering_trees/tags/item/supported_sapling.json new file mode 100644 index 0000000000..42bcd05931 --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/tags/item/supported_sapling.json @@ -0,0 +1,11 @@ +{ + "values": [ + "oak_sapling", + "birch_sapling", + "acacia_sapling", + "dark_oak_sapling", + "cherry_sapling", + "pale_oak_sapling", + "mangrove_propagule" + ] +} diff --git a/gm4_towering_trees/data/gm4_towering_trees/worldgen/configured_feature/leaf_litter.json b/gm4_towering_trees/data/gm4_towering_trees/worldgen/configured_feature/leaf_litter.json new file mode 100644 index 0000000000..6009e00a0f --- /dev/null +++ b/gm4_towering_trees/data/gm4_towering_trees/worldgen/configured_feature/leaf_litter.json @@ -0,0 +1,347 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 3, + "radius": 7, + "tries": 150 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 3, + "radius": 3, + "tries": 300 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:air" + } + }, + "foliage_placer": { + "type": "minecraft:bush_foliage_placer", + "height": 0, + "offset": 0, + "radius": 0 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:air" + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:dark_oak_trunk_placer", + "base_height": 0, + "height_rand_a": 0, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:air" + } + } + } +} diff --git a/gm4_towering_trees/data/gm4_trees/tags/functions/generate_tree.json b/gm4_towering_trees/data/gm4_trees/tags/functions/generate_tree.json new file mode 100644 index 0000000000..bd8bc90d56 --- /dev/null +++ b/gm4_towering_trees/data/gm4_trees/tags/functions/generate_tree.json @@ -0,0 +1,5 @@ +{ + "values": [ + "gm4_towering_trees:verify/generate_tree" + ] +} diff --git a/gm4_towering_trees/data/gm4_trees/tags/functions/initialize_sapling.json b/gm4_towering_trees/data/gm4_trees/tags/functions/initialize_sapling.json new file mode 100644 index 0000000000..cc71747598 --- /dev/null +++ b/gm4_towering_trees/data/gm4_trees/tags/functions/initialize_sapling.json @@ -0,0 +1,5 @@ +{ + "values": [ + "gm4_towering_trees:verify/initialize_sapling" + ] +} diff --git a/gm4_towering_trees/pack.png b/gm4_towering_trees/pack.png new file mode 100644 index 0000000000..a6d4975dbe Binary files /dev/null and b/gm4_towering_trees/pack.png differ diff --git a/lib_trees/beet.yaml b/lib_trees/beet.yaml index 61c50fe2e0..d80045ffc1 100644 --- a/lib_trees/beet.yaml +++ b/lib_trees/beet.yaml @@ -1,6 +1,6 @@ id: gm4_trees name: Gamemode 4 Trees -version: 1.3.X +version: 1.4.X description: A mcfunction library that facilites the creation of custom trees. data_pack: diff --git a/lib_trees/data/gm4_trees/function/sapling/advance_stage.mcfunction b/lib_trees/data/gm4_trees/function/sapling/advance_stage.mcfunction index 73ea58f507..5413703c49 100644 --- a/lib_trees/data/gm4_trees/function/sapling/advance_stage.mcfunction +++ b/lib_trees/data/gm4_trees/function/sapling/advance_stage.mcfunction @@ -10,8 +10,9 @@ execute if block ~ ~ ~ minecraft:spruce_sapling run setblock ~ ~ ~ minecraft:spr execute if block ~ ~ ~ minecraft:jungle_sapling run setblock ~ ~ ~ minecraft:jungle_sapling[stage=0] execute if block ~ ~ ~ minecraft:acacia_sapling run setblock ~ ~ ~ minecraft:acacia_sapling[stage=0] execute if block ~ ~ ~ minecraft:dark_oak_sapling run setblock ~ ~ ~ minecraft:dark_oak_sapling[stage=0] -execute if block ~ ~ ~ minecraft:mangrove_propagule[waterlogged=false] run setblock ~ ~ ~ minecraft:mangrove_propagule[stage=0,waterlogged=false] -execute if block ~ ~ ~ minecraft:mangrove_propagule[waterlogged=true] run setblock ~ ~ ~ minecraft:mangrove_propagule[stage=0,waterlogged=true] +execute if block ~ ~ ~ minecraft:pale_oak_sapling run setblock ~ ~ ~ minecraft:pale_oak_sapling[stage=0] +execute if block ~ ~ ~ minecraft:mangrove_propagule[waterlogged=false,hanging=false,age=4] run setblock ~ ~ ~ minecraft:mangrove_propagule[stage=0,age=4,waterlogged=false] +execute if block ~ ~ ~ minecraft:mangrove_propagule[waterlogged=true,hanging=false,age=4] run setblock ~ ~ ~ minecraft:mangrove_propagule[stage=0,age=4,waterlogged=true] execute if block ~ ~ ~ minecraft:cherry_sapling run setblock ~ ~ ~ minecraft:cherry_sapling[stage=0] # advance stage of custom sapling, if stage is large enough, grow the tree diff --git a/lib_trees/data/gm4_trees/function/sapling/place_sapling.mcfunction b/lib_trees/data/gm4_trees/function/sapling/place_sapling.mcfunction index 50c94f4cf9..59daf83779 100644 --- a/lib_trees/data/gm4_trees/function/sapling/place_sapling.mcfunction +++ b/lib_trees/data/gm4_trees/function/sapling/place_sapling.mcfunction @@ -2,6 +2,7 @@ # @s = player that just placed a custom sapling # at @s # run from advancement gm4_trees:place_sapling +# run from sapling/resolve_place_sapling advancement revoke @s only gm4_trees:place_sapling diff --git a/lib_trees/data/gm4_trees/function/sapling/resolve_place_sapling.mcfunction b/lib_trees/data/gm4_trees/function/sapling/resolve_place_sapling.mcfunction new file mode 100644 index 0000000000..7a914864cf --- /dev/null +++ b/lib_trees/data/gm4_trees/function/sapling/resolve_place_sapling.mcfunction @@ -0,0 +1,4 @@ +# Datapack hook-in point. Validates the library version in case multiple versions are installed. +# run from function tag gm4_trees:place_sapling + +execute if score gm4_trees load.status matches 1 if score gm4_trees_minor load.status matches 4 run function gm4_trees:sapling/place_sapling diff --git a/lib_trees/data/gm4_trees/tags/function/place_sapling.json b/lib_trees/data/gm4_trees/tags/function/place_sapling.json new file mode 100644 index 0000000000..52de1762be --- /dev/null +++ b/lib_trees/data/gm4_trees/tags/function/place_sapling.json @@ -0,0 +1,5 @@ +{ + "values": [ + "gm4_trees:sapling/resolve_place_sapling" + ] +} diff --git a/pyproject.toml b/pyproject.toml index a1f7e92060..eda8c5188a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,11 @@ authors = [ ] requires-python = ">= 3.10, < 4.0" dependencies = [ +<<<<<<< HEAD "beet >= 0.112.1", +======= + "beet @ git+https://github.com/edayot/beet.git@update_1_21_9", +>>>>>>> 74df3a8ff (Revert "Merge branch 'update-1.21.9' of https://github.com/Gamemode4Dev/GM4_Datapacks into update-1.21.9") "mecha >= 0.99.0", "bolt >= 0.49.2", "PyYAML >= 6.0, < 7.0", diff --git a/uv.lock b/uv.lock index b00a0edd94..0f028dbb94 100644 --- a/uv.lock +++ b/uv.lock @@ -12,8 +12,13 @@ wheels = [ [[package]] name = "beet" +<<<<<<< HEAD version = "0.112.1" source = { registry = "https://pypi.org/simple" } +======= +version = "0.111.0" +source = { git = "https://github.com/edayot/beet.git?rev=update_1_21_9#4304c0f7f37f6b7d268a6c96dd83dc96bfaa9bdb" } +>>>>>>> 74df3a8ff (Revert "Merge branch 'update-1.21.9' of https://github.com/Gamemode4Dev/GM4_Datapacks into update-1.21.9") dependencies = [ { name = "click" }, { name = "click-help-colors" }, @@ -26,10 +31,13 @@ dependencies = [ { name = "toml" }, { name = "typing-extensions" }, ] +<<<<<<< HEAD sdist = { url = "https://files.pythonhosted.org/packages/b4/51/03ced57f81dd2be86a6d55ec99359eabcf017d5cf8929ef81731f87cef78/beet-0.112.1.tar.gz", hash = "sha256:9014049b804c3ca2766b7cdfea7e64120df952e92b67d22210c70000fe1b36a6", size = 93478 } wheels = [ { url = "https://files.pythonhosted.org/packages/dd/fb/11619fd28c1c923a5237fbaf9bbbf8d35b5b6edbee9608698160c07de458/beet-0.112.1-py3-none-any.whl", hash = "sha256:c3085af65aacc88d2811b772e3c377c023dcc5a864eaa45ec739c2f71ce82cf2", size = 118280 }, ] +======= +>>>>>>> 74df3a8ff (Revert "Merge branch 'update-1.21.9' of https://github.com/Gamemode4Dev/GM4_Datapacks into update-1.21.9") [[package]] name = "black" @@ -199,7 +207,11 @@ dev = [ [package.metadata] requires-dist = [ +<<<<<<< HEAD { name = "beet", specifier = ">=0.112.1" }, +======= + { name = "beet", git = "https://github.com/edayot/beet.git?rev=update_1_21_9" }, +>>>>>>> 74df3a8ff (Revert "Merge branch 'update-1.21.9' of https://github.com/Gamemode4Dev/GM4_Datapacks into update-1.21.9") { name = "bolt", specifier = ">=0.49.2" }, { name = "mecha", specifier = ">=0.99.0" }, { name = "pillow", specifier = ">=10.0.0,<11.0.0" },