Skip to content

Commit dffdfd9

Browse files
committed
make apple trees check a region before being placed
1 parent 9e594dc commit dffdfd9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

gm4_apple_trees/data/gm4_apple_trees/function/sapling/generate_tree.mcfunction

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
# place jigsaw gm4_apple_trees:apple_trees gm4_apple_trees:trunk 2 ~ ~1 ~
77
# jigsaw generation not usable after world-gen due to inherent position-based randomizaton
8+
execute store result score $blocks_moved gm4_apple_data run clone ~-4 ~1 ~-4 ~4 ~7 ~4 ~-4 ~1 ~-4 filtered #gm4_apple_trees:tree_placeable force
9+
execute unless score $blocks_moved gm4_apple_data matches 567 run return fail
810
function gm4_apple_trees:sapling/grow/generate_random_tree
911
execute if block ~ ~-1 ~ grass_block run setblock ~ ~-1 ~ dirt
1012
execute positioned ~ ~1 ~ as @e[type=armor_stand,tag=gm4_apple_uninitialized,distance=..6] run function gm4_apple_trees:leaf/initialize
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"values": [
3+
"#minecraft:replaceable_by_trees",
4+
"#air",
5+
"#minecraft:logs",
6+
"#minecraft:saplings"
7+
]
8+
}

0 commit comments

Comments
 (0)