1
0
Fork 0

Inital commit

This commit is contained in:
abtmtr 2025-08-27 20:49:18 -05:00
commit b5089257c5
1005 changed files with 23476 additions and 0 deletions

View file

@ -0,0 +1,54 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:mushroom_stem"
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:knowledge_book",
"functions": [
{
"function": "minecraft:set_custom_data",
"tag": "{Tags:[timber_location]}"
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "#timber:axes"
}
}
]
}
]
}
]
}

View file

@ -0,0 +1,6 @@
{
"values": [
"timber:init",
"timber:main"
]
}

View file

@ -0,0 +1,31 @@
# resets
scoreboard players set durability_okay timber 1
# keep track of tree size
scoreboard players add tree_size timber 1
# wear out tool
function timber:tool/durability_count
# tool durability check
execute if score stop_chopping timber matches 1.. run function timber:tool/durability_check
##### if on top
execute positioned ~ ~1 ~ unless predicate timber:block/stem run function timber:algorithm/fungus/validate_cap
# mark cap that have been checked
execute positioned ~ ~ ~1 unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~ ~-1 unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~-1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~1 ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~-1 ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
# mark block that will get destroyed
execute if score durability_okay timber matches 1.. if score tree_size timber < max_tree_size timber run summon marker ~ ~ ~ {Tags:["timber_stem"]}
# search for next stem
execute if score durability_okay timber matches 1.. if score tree_size timber < max_tree_size timber run function timber:algorithm/fungus/search
# destroy cap (always)
execute run scoreboard players set leaf_distance timber 0
function timber:algorithm/fungus/leaves/search

View file

@ -0,0 +1,3 @@
execute if score leaf_distance timber <= max_tree_size timber run summon marker ~ ~ ~ {Tags:["timber_cap"]}
execute if score leaf_distance timber <= max_tree_size timber run function timber:algorithm/fungus/leaves/search

View file

@ -0,0 +1,7 @@
# find other stems
execute at @e[type=minecraft:marker,tag=timber_cap] positioned ~ ~ ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] unless entity @e[type=minecraft:marker,tag=timber_other_stem,distance=...1,sort=arbitrary,limit=1] run summon marker ~ ~ ~ {Tags:["timber_other_stem"]}
execute at @e[type=minecraft:marker,tag=timber_cap] positioned ~ ~ ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] unless entity @e[type=minecraft:marker,tag=timber_other_stem,distance=...1,sort=arbitrary,limit=1] run summon marker ~ ~ ~ {Tags:["timber_other_stem"]}
execute at @e[type=minecraft:marker,tag=timber_cap] positioned ~1 ~ ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] unless entity @e[type=minecraft:marker,tag=timber_other_stem,distance=...1,sort=arbitrary,limit=1] run summon marker ~ ~ ~ {Tags:["timber_other_stem"]}
execute at @e[type=minecraft:marker,tag=timber_cap] positioned ~-1 ~ ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] unless entity @e[type=minecraft:marker,tag=timber_other_stem,distance=...1,sort=arbitrary,limit=1] run summon marker ~ ~ ~ {Tags:["timber_other_stem"]}
execute at @e[type=minecraft:marker,tag=timber_cap] positioned ~ ~1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] unless entity @e[type=minecraft:marker,tag=timber_other_stem,distance=...1,sort=arbitrary,limit=1] run summon marker ~ ~ ~ {Tags:["timber_other_stem"]}
execute at @e[type=minecraft:marker,tag=timber_cap] positioned ~ ~-1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] unless entity @e[type=minecraft:marker,tag=timber_other_stem,distance=...1,sort=arbitrary,limit=1] run summon marker ~ ~ ~ {Tags:["timber_other_stem"]}

View file

@ -0,0 +1,18 @@
scoreboard players add leaf_distance timber 1
# search for next cap
execute positioned ~ ~ ~1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~ ~ ~-1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~-1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~ ~1 ~ unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~ ~-1 ~ unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~ ~-1 ~1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~ ~-1 ~-1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~1 ~-1 ~ unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~-1 ~-1 ~ unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~1 ~-1 ~1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~-1 ~-1 ~-1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~1 ~-1 ~-1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy
execute positioned ~-1 ~-1 ~1 unless entity @e[type=minecraft:marker,tag=timber_cap,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/cap run function timber:algorithm/fungus/leaves/destroy

View file

@ -0,0 +1,5 @@
# check if item is a stem
summon minecraft:armor_stand ~ ~ ~ {Silent:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["timber_item_check"]}
data modify entity @e[type=minecraft:armor_stand,tag=timber_item_check,distance=...1,sort=arbitrary,limit=1] HandItems[0] set from entity @e[distance=...1,type=minecraft:item,sort=nearest,limit=1,nbt={Age:0s}] Item
execute if entity @e[type=minecraft:armor_stand,tag=timber_item_check,distance=...1,sort=arbitrary,limit=1,predicate=timber:item/stem] run function timber:algorithm/fungus/chop
kill @e[type=minecraft:armor_stand,tag=timber_item_check,distance=...1,sort=arbitrary,limit=1]

View file

@ -0,0 +1,24 @@
# search for next log
execute positioned ~ ~1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~1 ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~1 ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~1 ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~1 ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~1 ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~1 ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~ ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~ ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~ ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~ ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~ ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~ ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~ ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~ ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~2 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
# search for next log downwards
execute if score chop_down timber matches 1.. run function timber:algorithm/fungus/search_down

View file

@ -0,0 +1,10 @@
# search for next log downwards
execute positioned ~ ~-1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~-1 ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~ ~-1 ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~-1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~-1 ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~1 ~-1 ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~-1 ~ if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~-1 ~1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop
execute positioned ~-1 ~-1 ~-1 if predicate timber:block/stem unless entity @e[type=minecraft:marker,tag=timber_stem,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/fungus/chop

View file

@ -0,0 +1,6 @@
# mark leaf that have been checked
execute positioned ~ ~ ~1 unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~ ~-1 unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~-1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/cap run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}

View file

@ -0,0 +1,29 @@
# resets
scoreboard players set durability_okay timber 1
# keep track of tree size
scoreboard players add tree_size timber 1
# wear out tool
function timber:tool/durability_count
# tool durability check
execute if score stop_chopping timber matches 1.. unless score unbreakable timber matches 1 run function timber:tool/durability_check
# mark leaf that have been checked
execute positioned ~ ~ ~1 unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/leaf run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~ ~-1 unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/leaf run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/leaf run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~-1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/leaf run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~1 ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/leaf run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
execute positioned ~ ~-1 ~ unless entity @e[type=minecraft:marker,tag=timber_leaves_found,distance=...1,sort=nearest,limit=1] if predicate timber:block/leaf run summon marker ~ ~ ~ {Tags:["timber_leaves_found"]}
# mark block that will get destroyed
execute if score durability_okay timber matches 1.. if score tree_size timber < max_tree_size timber run summon marker ~ ~ ~ {Tags:["timber_log"]}
# search for next log
execute if score durability_okay timber matches 1.. if score tree_size timber < max_tree_size timber run function timber:algorithm/tree/search
# destroy leaves
execute if score destroy_leaves timber matches 1.. run scoreboard players set leaf_distance timber 0
execute if score destroy_leaves timber matches 1.. run function timber:algorithm/tree/leaves/search

View file

@ -0,0 +1,8 @@
# get leaf distance (in score leaf_distance timber)
function timber:algorithm/tree/leaves/get_distance
# decide if leaf is closer to the current tree then mark it so that it will get destroyed
execute if score leaf_distance_old timber < leaf_distance timber run summon marker ~ ~ ~ {Tags:["timber_leaf"]}
# search for next leaf
execute if score leaf_distance_old timber < leaf_distance timber run function timber:algorithm/tree/leaves/search

View file

@ -0,0 +1,15 @@
scoreboard players set leaf_distance timber 0
execute if block ~ ~ ~ #minecraft:leaves[distance=1] run scoreboard players set leaf_distance timber 1
execute if block ~ ~ ~ #minecraft:leaves[distance=2] run scoreboard players set leaf_distance timber 2
execute if block ~ ~ ~ #minecraft:leaves[distance=3] run scoreboard players set leaf_distance timber 3
execute if block ~ ~ ~ #minecraft:leaves[distance=4] run scoreboard players set leaf_distance timber 4
execute if block ~ ~ ~ #minecraft:leaves[distance=5] run scoreboard players set leaf_distance timber 5
execute if block ~ ~ ~ #minecraft:leaves[distance=6] run scoreboard players set leaf_distance timber 6
execute if block ~ ~ ~ #minecraft:leaves[distance=7] run scoreboard players set leaf_distance timber 7
execute if block ~ ~ ~ #minecraft:leaves[distance=8] run scoreboard players set leaf_distance timber 8
execute if block ~ ~ ~ #minecraft:leaves[distance=9] run scoreboard players set leaf_distance timber 9
execute if block ~ ~ ~ #minecraft:leaves[distance=10] run scoreboard players set leaf_distance timber 10
execute if block ~ ~ ~ #minecraft:leaves[distance=11] run scoreboard players set leaf_distance timber 11
execute if block ~ ~ ~ #minecraft:leaves[distance=12] run scoreboard players set leaf_distance timber 12
execute if block ~ ~ ~ #minecraft:leaves[distance=13] run scoreboard players set leaf_distance timber 13
execute if block ~ ~ ~ #minecraft:leaves[distance=14] run scoreboard players set leaf_distance timber 14

View file

@ -0,0 +1,17 @@
# save leaves distance tag at its position
summon marker ~ ~ ~ {Tags:["timber_leaf_distance"]}
scoreboard players operation @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber = leaf_distance timber
# load leaves distance tag and search for next leaf
scoreboard players operation leaf_distance_old timber = @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber
execute positioned ~ ~ ~1 unless entity @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/leaf run function timber:algorithm/tree/leaves/destroy
scoreboard players operation leaf_distance_old timber = @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber
execute positioned ~ ~ ~-1 unless entity @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/leaf run function timber:algorithm/tree/leaves/destroy
scoreboard players operation leaf_distance_old timber = @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber
execute positioned ~1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/leaf run function timber:algorithm/tree/leaves/destroy
scoreboard players operation leaf_distance_old timber = @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber
execute positioned ~-1 ~ ~ unless entity @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/leaf run function timber:algorithm/tree/leaves/destroy
scoreboard players operation leaf_distance_old timber = @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber
execute positioned ~ ~1 ~ unless entity @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/leaf run function timber:algorithm/tree/leaves/destroy
scoreboard players operation leaf_distance_old timber = @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] timber
execute positioned ~ ~-1 ~ unless entity @e[type=minecraft:marker,tag=timber_leaf_distance,distance=...1,sort=arbitrary,limit=1] if predicate timber:block/leaf run function timber:algorithm/tree/leaves/destroy

View file

@ -0,0 +1,5 @@
# check if item is in tag #minecraft:logs
summon minecraft:armor_stand ~ ~ ~ {Silent:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["timber_item_check"]}
data modify entity @e[type=minecraft:armor_stand,tag=timber_item_check,distance=...1,sort=arbitrary,limit=1] HandItems[0] set from entity @e[type=minecraft:item,distance=...1,sort=nearest,limit=1,nbt={Age:0s}] Item
execute if entity @e[type=minecraft:armor_stand,tag=timber_item_check,distance=...1,sort=arbitrary,limit=1,predicate=timber:item/log] run function timber:algorithm/tree/chop
kill @e[type=minecraft:armor_stand,tag=timber_item_check,distance=...1,sort=arbitrary,limit=1]

View file

@ -0,0 +1,24 @@
# search for next log
execute positioned ~ ~1 ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~ ~1 ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~ ~1 ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~1 ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~1 ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~1 ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~1 ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~1 ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~1 ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~ ~ ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~ ~ ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~ ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~ ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~ ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~ ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~ ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~ ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
# search for next log downwards
execute if score chop_down timber matches 1.. run function timber:algorithm/tree/search_down

View file

@ -0,0 +1,10 @@
# search for next log downwards
execute positioned ~ ~-1 ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~ ~-1 ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~ ~-1 ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~-1 ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~-1 ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~1 ~-1 ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~-1 ~ if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~-1 ~1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop
execute positioned ~-1 ~-1 ~-1 if predicate timber:block/log unless entity @e[type=minecraft:marker,tag=timber_log,distance=...1,sort=arbitrary,limit=1] run function timber:algorithm/tree/chop

View file

@ -0,0 +1,5 @@
# Loop
execute if score plant_sapling timber matches 1.. run schedule function timber:autoplant/loop 2s replace
# plant sapling process
execute as @e[type=minecraft:item,tag=!timber_checked,tag=!global.ignore,tag=!global.ignore.kill,sort=random,limit=20,predicate=timber:sapling] at @s run function timber:autoplant/validate

View file

@ -0,0 +1,8 @@
# replace item-sapling with block-sapling
summon minecraft:falling_block ~ ~ ~ {BlockState:{Name:"minecraft:barrier"},Time:1,DropItem:0b,Tags:["timber_item_to_block"]}
data modify entity @e[type=minecraft:falling_block,tag=timber_item_to_block,distance=...1,sort=arbitrary,limit=1] BlockState.Name set from entity @s Item.id
item modify entity @s contents {"function": "minecraft:set_count", "count": -1, "add": true}
# sapling will be checked every time
tag @s remove timber_checked

View file

@ -0,0 +1,5 @@
# don't check items twice (except saplings, look in plant.mcfunction)
tag @s add timber_checked
# check if item is in tag #minecraft:sapling
execute if items entity @s contents #minecraft:saplings run function timber:autoplant/plant

View file

@ -0,0 +1,25 @@
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
tellraw @s ["",{"text":" Timber Datapack"}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
tellraw @s ["",{"text":"The Timber Datapack allows you to instantly chop down a tree just by breaking one log with any axe."}]
tellraw @s ["",{"text":"By default, sneaking while breaking will not chop the tree."}]
tellraw @s [""]
tellraw @s ["",{"text":"Every player can use "},{"text":"/trigger TimberToggle","color":"blue","clickEvent":{"action":"suggest_command","value":"/trigger TimberToggle"}},{"text":" to individually turn the datapack on or off."}]
tellraw @s [""]
tellraw @s ["",{"text":"For in-depth description and manual "},{"text":"click here","color":"dark_green","clickEvent":{"action":"open_url","value":"https://www.planetminecraft.com/data-pack/timber-datapack/"}},{"text":"."}]
tellraw @s [""]
tellraw @s [""," ",{"text":"[click here to see the settings]","color":"gold","clickEvent":{"action":"run_command","value":"/function timber:settings/settings1_click"}}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
function timber:settings/end_of_message

View file

@ -0,0 +1,34 @@
# longer maxCommandChainLength
gamerule maxCommandChainLength 1000000000
# create scoreboards
scoreboard objectives add timber_w_axe minecraft.used:minecraft.wooden_axe
scoreboard objectives add timber_s_axe minecraft.used:minecraft.stone_axe
scoreboard objectives add timber_i_axe minecraft.used:minecraft.iron_axe
scoreboard objectives add timber_g_axe minecraft.used:minecraft.golden_axe
scoreboard objectives add timber_d_axe minecraft.used:minecraft.diamond_axe
scoreboard objectives add timber_n_axe minecraft.used:minecraft.netherite_axe
scoreboard objectives add timber dummy
scoreboard objectives add TimberToggle trigger {"text":"Timber Toggle","color":"#724E21"}
scoreboard objectives add timber_disabled dummy
scoreboard objectives add timber_prsistent dummy
# non-overriding default values
function timber:settings/default_values
# start optional loops
execute if score plant_sapling timber matches 1.. run function timber:autoplant/loop
execute if score slow_chop timber matches 1.. run function timber:slow_chop/loop
# check loottable compatibility of mushroom stem
setblock ~ 255 ~ minecraft:chest
setblock ~ 255 ~1 minecraft:mushroom_stem
loot insert ~ 255 ~ mine ~ 255 ~1 minecraft:diamond_axe
execute unless data block ~ 255 ~ Items[{id:"minecraft:knowledge_book"}] run tellraw @a ["",{"text":"Timber Datapack Warning: ","color":"red"},{"text":"Incompatibility with the mushroom_stem loottable of another datapack!"}]
fill ~-1 255 ~-1 ~1 255 ~1 minecraft:air
execute store result score doTileDrops timber run gamerule doTileDrops
execute if score doTileDrops timber matches 0 run tellraw @a ["",{"text":"Timber Datapack Warning: ","color":"red"},{"text":"This datapack only works when gamerule doTileDrops is set to true!"}]
# Getting the game version and checking if it is compatible with the datapack https://minecraft.fandom.com/wiki/Data_version
# execute store result score game_version timber run data get entity @r DataVersion
# execute if score game_version timber matches ..2716 run tellraw @a ["",{"text":"Timber Datapack Warning: ","color":"red"},{"text":"This datapack is not compatible with all the versions before 1.17!"}]

View file

@ -0,0 +1,11 @@
# loop (not in minecraft:tick in order to stop it after uninstall)
schedule function timber:main 1t
# if any kind of axe is used
execute as @a[predicate=timber:used_axe,tag=!global.ignore] at @s run function timber:used_axe
# toggle timber datapack per player
execute as @a[scores={TimberToggle=1..},tag=!global.ignore] run function timber:settings/toggle/timber
# reset
scoreboard players enable @a TimberToggle

View file

@ -0,0 +1,45 @@
# reset
scoreboard players set leaves_found timber 0
scoreboard players set tree_size timber 0
scoreboard players set tree_type timber 0
# load settings to other scoreboard (leaves persistent)
execute unless score persistent timber matches 1.. run scoreboard players set @s timber_prsistent 0
execute if score persistent timber matches 1.. run scoreboard players set @s timber_prsistent 1
# search last broken item (place of tree) and set a marker
execute at @e[type=minecraft:item,distance=..7,limit=1,nbt={Age:0s}] run summon marker ~ ~ ~ {Tags:["timber_tree","global.ignore"]}
# Enchantments randomizer
scoreboard players set unbreaking timber 0
execute if items entity @s weapon.mainhand *[enchantments~[{"enchantments": "minecraft:unbreaking", "levels": 1}]] run scoreboard players set unbreaking timber 1
execute if items entity @s weapon.mainhand *[enchantments~[{"enchantments": "minecraft:unbreaking", "levels": 2}]] run scoreboard players set unbreaking timber 2
execute if items entity @s weapon.mainhand *[enchantments~[{"enchantments": "minecraft:unbreaking", "levels": 3}]] run scoreboard players set unbreaking timber 3
# get durability
function timber:tool/durability_get
# scan through tree
# tree
execute if score chop_trees timber matches 1.. at @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop,distance=..7,sort=arbitrary,limit=1] run function timber:algorithm/tree/run
execute store result score leaves_found timber if entity @e[type=minecraft:marker,tag=timber_leaves_found]
# if tree is valid
execute if score leaves_found timber >= min_leaves_found timber unless score tree_size timber matches 0 run scoreboard players set tree_type timber 1
# fungi (only if not tree already)
execute if score tree_type timber matches 0 if score chop_fungi timber matches 1.. run function timber:run_fungi
# if tree or fungi is valid (tree = 1 | fungus = 2)
execute unless score tree_type timber matches 0 run function timber:validated
# remove markers
execute if score chop_fungi timber matches 1.. run kill @e[type=minecraft:item,nbt={Item:{components:{"minecraft:custom_data":{Tags:[timber_location]}}}}]
execute if score chop_fungi timber matches 1.. run clear @s knowledge_book[custom_data={Tags:[timber_location]}]
kill @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop]
kill @e[type=minecraft:marker,tag=timber_log,tag=!timber_destroy]
kill @e[type=minecraft:marker,tag=timber_leaf,tag=!timber_destroy]
kill @e[type=minecraft:marker,tag=timber_stem,tag=!timber_destroy]
kill @e[type=minecraft:marker,tag=timber_cap,tag=!timber_destroy]
kill @e[type=minecraft:marker,tag=timber_leaves_found]
kill @e[type=minecraft:marker,tag=timber_leaf_distance]
kill @e[type=minecraft:marker,tag=timber_other_stem]

View file

@ -0,0 +1,18 @@
# reset
scoreboard players set tree_size timber 0
kill @e[type=minecraft:marker,tag=timber_leaves_found]
kill @e[type=minecraft:marker,tag=timber_log,tag=!timber_destroy]
kill @e[type=minecraft:marker,tag=timber_leaf,tag=!timber_destroy]
# get durability
function timber:tool/durability_get
# fungi
execute at @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop,distance=..7,sort=arbitrary,limit=1] run function timber:algorithm/fungus/run
execute store result score leaves_found timber if entity @e[type=minecraft:marker,tag=timber_leaves_found]
# if fungi is valid
execute if score leaves_found timber >= min_leaves_found timber unless score tree_size timber matches 0 run scoreboard players set tree_type timber 2
# don't destroy the blocks in a radius of 5 blocks from other stems
execute if score tree_type timber matches 2 run function timber:algorithm/fungus/leaves/find_other_stems
execute if score tree_type timber matches 2 at @e[type=minecraft:marker,tag=timber_other_stem] run kill @e[type=minecraft:marker,tag=timber_cap,distance=..5]

View file

@ -0,0 +1,26 @@
# non-overriding default values
execute unless score standing timber = standing timber run scoreboard players set standing timber 1
execute unless score sneaking timber = sneaking timber run scoreboard players set sneaking timber 0
execute unless score destroy_leaves timber = destroy_leaves timber run scoreboard players set destroy_leaves timber 1
execute unless score plant_sapling timber = plant_sapling timber run scoreboard players set plant_sapling timber 0
execute unless score slow_chop timber = slow_chop timber run scoreboard players set slow_chop timber 0
execute unless score chop_down timber = chop_down timber run scoreboard players set chop_down timber 0
execute unless score stop_chopping timber = stop_chopping timber run scoreboard players set stop_chopping timber 1
execute unless score wear_out timber = wear_out timber run scoreboard players set wear_out timber 1
execute unless score drop_loot timber = drop_loot timber run scoreboard players set drop_loot timber 0
execute unless score hunger timber = hunger timber run scoreboard players set hunger timber 0
execute unless score stopsound timber = stopsound timber run scoreboard players set stopsound timber 0
execute unless score persistent timber = persistent timber run scoreboard players set persistent timber 0
execute unless score wooden_axe timber = wooden_axe timber run scoreboard players set wooden_axe timber 1
execute unless score stone_axe timber = stone_axe timber run scoreboard players set stone_axe timber 1
execute unless score iron_axe timber = iron_axe timber run scoreboard players set iron_axe timber 1
execute unless score golden_axe timber = golden_axe timber run scoreboard players set golden_axe timber 1
execute unless score diamond_axe timber = diamond_axe timber run scoreboard players set diamond_axe timber 1
execute unless score netherite_axe timber = netherite_axe timber run scoreboard players set netherite_axe timber 1
execute unless score chop_trees timber = chop_trees timber run scoreboard players set chop_trees timber 1
execute unless score chop_fungi timber = chop_fungi timber run scoreboard players set chop_fungi timber 0
execute unless score blocks_per_chop timber = blocks_per_chop timber run scoreboard players set blocks_per_chop timber 1
execute unless score time_between_chops timber = time_between_chops timber run scoreboard players set time_between_chops timber 1
execute unless score max_tree_size timber = max_tree_size timber run scoreboard players set max_tree_size timber 555
execute unless score min_leaves_found timber = min_leaves_found timber run scoreboard players set min_leaves_found timber 5

View file

@ -0,0 +1 @@
function timber:settings/settings1

View file

@ -0,0 +1,54 @@
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
tellraw @s ["",{"text":" Timber "},{"text":"/","color":"gray"},{"text":" Global Settings "},{"text":" < ","clickEvent":{"action":"run_command","value":"/function timber:settings/settings1_click"}},{"text":"1/2"},{"text":" > ","clickEvent":{"action":"run_command","value":"/function timber:settings/settings2_click"}}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
execute if score standing timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/standing"}},{"text":" Works When Standing"}]
execute unless score standing timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/standing"}},{"text":" Works When Standing"}]
execute if score sneaking timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/sneaking"}},{"text":" Works When Sneaking"}]
execute unless score sneaking timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/sneaking"}},{"text":" Works When Sneaking"}]
execute if score destroy_leaves timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/destroy_leaves"}},{"text":" Destroy Leaves"}]
execute unless score destroy_leaves timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/destroy_leaves"}},{"text":" Destroy Leaves"}]
execute if score plant_sapling timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/plant_sapling"}},{"text":" Auto Plant Saplings","hoverEvent":{"action":"show_text","value":"All kind of saplings laying on the ground will get planted every 2 seconds."}}]
execute unless score plant_sapling timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/plant_sapling"}},{"text":" Auto Plant Saplings","hoverEvent":{"action":"show_text","value":"All kind of saplings laying on the ground will get planted every 2 seconds."}}]
execute if score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/slow_chop"}},{"text":" Chop Slowly","hoverEvent":{"action":"show_text","value":["",{"text":"The tree won't be chopped instantly anymore. Additional options to change the speed of the chopping process can be changed at the next page."},{"text":"\n\nThis option can increase performance.","color":"gray"}]}}]
execute unless score slow_chop timber matches 1.. unless score drop_loot timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/slow_chop"}},{"text":" Chop Slowly","hoverEvent":{"action":"show_text","value":["",{"text":"The tree won't be chopped instantly anymore. Additional options to change the speed of the chopping process can be changed at the next page."},{"text":"\n\nThis option can increase performance.","color":"gray"}]}}]
execute unless score slow_chop timber matches 1.. if score drop_loot timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"#7F2B2B","hoverEvent":{"action":"show_text","value":"Can't be enabled when \"Drop Loot Straight into Inventory\" is enabled."}},{"text":" Chop Slowly","hoverEvent":{"action":"show_text","value":["",{"text":"The tree won't be chopped instantly anymore. Additional options to change the speed of the chopping process can be changed at the next page."},{"text":"\n\nThis option can increase performance.","color":"gray"}]}}]
execute if score chop_down timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/chop_down"}},{"text":" Enable Chopping Down","hoverEvent":{"action":"show_text","value":"Normally when you cut a tree in the middle only the top part of the tree gets destroyed. But if this option is enabled the bottom part will get destroyed as well."}}]
execute unless score chop_down timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/chop_down"}},{"text":" Enable Chopping Down","hoverEvent":{"action":"show_text","value":"Normally when you cut a tree in the middle only the top part of the tree gets destroyed. But if this option is enabled the bottom part will get destroyed as well."}}]
execute if score stop_chopping timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/stop_chopping"}},{"text":" Stop Chopping Once Axe Breaks","hoverEvent":{"action":"show_text","value":"Stops the process of chopping the tree as soon as your axe doesn't have any durability left for the whole tree. When disabled, the tree will always be chopped finish."}}]
execute unless score stop_chopping timber matches 1.. if score wear_out timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/stop_chopping"}},{"text":" Stop Chopping Once Axe Breaks","hoverEvent":{"action":"show_text","value":"Stops the process of chopping the tree as soon as your axe doesn't have any durability left for the whole tree. When disabled, the tree will always be chopped finish."}}]
execute unless score stop_chopping timber matches 1.. unless score wear_out timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"#7F2B2B","hoverEvent":{"action":"show_text","value":"Can't be enabled when \"Additionally Wear out Tool Depending on Tree Size\" is disabled."}},{"text":" Stop Chopping Once Axe Breaks","hoverEvent":{"action":"show_text","value":"Stops the process of chopping the tree as soon as your axe doesn't have any durability left for the whole tree. When disabled, the tree will always be chopped finish."}}]
execute if score wear_out timber matches 1.. unless score stop_chopping timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/wear_out"}},{"text":" Additionally Wear out Tool Depending on Tree Size","hoverEvent":{"action":"show_text","value":"The tool's durability will get decreased by the amount of destroyed logs (or stems). When disabled, only one durability gets deducted."}}]
execute unless score wear_out timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/wear_out"}},{"text":" Additionally Wear out Tool Depending on Tree Size","hoverEvent":{"action":"show_text","value":"The tool's durability will get decreased by the amount of destroyed logs (or stems). When disabled, only one durability gets deducted."}}]
execute if score wear_out timber matches 1.. if score stop_chopping timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"#2B7F2B","hoverEvent":{"action":"show_text","value":"Can't be disabled when \"Stop Chopping Once Axe Breaks\" is enabled."}},{"text":" Additionally Wear out Tool Depending on Tree Size","hoverEvent":{"action":"show_text","value":"The tool's durability will get decreased by the amount of destroyed logs (or stems). When disabled, only one durability gets deducted."}}]
execute if score drop_loot timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/drop_loot"}},{"text":" Drop Loot Straight into Inventory","hoverEvent":{"action":"show_text","value":["",{"text":"Lets the dropped items of the tree teleport straight into your own inventory. As soon as you have a full inventory the loot gets dropped on the ground."},{"text":"\n\nThis option can increase performance.","color":"gray"}]}}]
execute unless score drop_loot timber matches 1.. unless score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/drop_loot"}},{"text":" Drop Loot Straight into Inventory","hoverEvent":{"action":"show_text","value":["",{"text":"Lets the dropped items of the tree teleport straight into your own inventory. As soon as you have a full inventory the loot gets dropped on the ground."},{"text":"\n\nThis option can increase performance.","color":"gray"}]}}]
execute unless score drop_loot timber matches 1.. if score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"#7F2B2B","hoverEvent":{"action":"show_text","value":"Can't be enabled when \"Chop Slowly\" is enabled."}},{"text":" Drop Loot Straight into Inventory","hoverEvent":{"action":"show_text","value":["",{"text":"Lets the dropped items of the tree teleport straight into your own inventory. As soon as you have a full inventory the loot gets dropped on the ground."},{"text":"\n\nThis option can increase performance.","color":"gray"}]}}]
execute if score hunger timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/hunger"}},{"text":" Give Additional Hunger Effect","hoverEvent":{"action":"show_text","value":"Gives a hunger effect for 1 second with the same level as the size of the chopped tree."}}]
execute unless score hunger timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/hunger"}},{"text":" Give Additional Hunger Effect","hoverEvent":{"action":"show_text","value":"Gives a hunger effect for 1 second with the same level as the size of the chopped tree."}}]
execute if score stopsound timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/stopsound"}},{"text":" Stop Loud Breaking Noises","hoverEvent":{"action":"show_text","value":["",{"text":"Suppresses loud breaking noises when chopping a tree."},{"text":"\n\nThis option is","color":"gray"},{"text":" experimental","color":"dark_red"},{"text":" because sometimes it still sounds loud for a fraction of a second.","color":"gray"}]}}]
execute unless score stopsound timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/stopsound"}},{"text":" Stop Loud Breaking Noises","hoverEvent":{"action":"show_text","value":["",{"text":"Suppresses loud breaking noises when chopping a tree."},{"text":"\n\nThis option is","color":"gray"},{"text":" experimental","color":"dark_red"},{"text":" because sometimes it still sounds loud for a fraction of a second.","color":"gray"}]}}]
execute if score persistent timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/persistent"}},{"text":" Destroy Player-Placed Trees","hoverEvent":{"action":"show_text","value":["",{"text":"Player-placed trees are trees made out of player-placed leaves (Look at leaf block with F3 debug screen: persistent = true)."},{"text":"\n\nUse it on your own risk!\nWhen enabled, this datapack can't differentiate between generated trees and player-placed trees anymore and therefore can potentially destroy your buildings.","color":"dark_red"}]}}]
execute unless score persistent timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/persistent"}},{"text":" Destroy Player-Placed Trees","hoverEvent":{"action":"show_text","value":["",{"text":"Player-placed trees are trees made out of player-placed leaves (Look at leaf block with F3 debug screen: persistent = true)."},{"text":"\n\nUse it on your own risk!\nWhen enabled, this datapack can't differentiate between generated trees and player-placed trees anymore and therefore can potentially destroy your buildings.","color":"dark_red"}]}}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
function timber:settings/end_of_message

View file

@ -0,0 +1,2 @@
function timber:settings/settings
playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.6 .2

View file

@ -0,0 +1,52 @@
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":" "}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
tellraw @s ["",{"text":" Timber "},{"text":"/","color":"gray"},{"text":" Global Settings "},{"text":" < ","clickEvent":{"action":"run_command","value":"/function timber:settings/settings1_click"}},{"text":"2/2"},{"text":" > ","clickEvent":{"action":"run_command","value":"/function timber:settings/settings2_click"}}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
execute if score wooden_axe timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/wooden_axe"}},{"text":" Enable Wooden Axe"}]
execute unless score wooden_axe timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/wooden_axe"}},{"text":" Enable Wooden Axe"}]
execute if score stone_axe timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/stone_axe"}},{"text":" Enable Stone Axe"}]
execute unless score stone_axe timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/stone_axe"}},{"text":" Enable Stone Axe"}]
execute if score iron_axe timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/iron_axe"}},{"text":" Enable Iron Axe"}]
execute unless score iron_axe timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/iron_axe"}},{"text":" Enable Iron Axe"}]
execute if score golden_axe timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/golden_axe"}},{"text":" Enable Golden Axe"}]
execute unless score golden_axe timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/golden_axe"}},{"text":" Enable Golden Axe"}]
execute if score diamond_axe timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/diamond_axe"}},{"text":" Enable Diamond Axe"}]
execute unless score diamond_axe timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/diamond_axe"}},{"text":" Enable Diamond Axe"}]
execute if score netherite_axe timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/netherite_axe"}},{"text":" Enable Netherite Axe"}]
execute unless score netherite_axe timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/netherite_axe"}},{"text":" Enable Netherite Axe"}]
execute if score chop_trees timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/chop_trees"}},{"text":" Chop Trees","hoverEvent":{"action":"show_text","value":"All kind of trees will get chopped."}}]
execute unless score chop_trees timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/chop_trees"}},{"text":" Chop Trees","hoverEvent":{"action":"show_text","value":"All kind of trees will get chopped."}}]
execute if score chop_fungi timber matches 1.. run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/chop_fungi"}},{"text":" Chop Fungi","hoverEvent":{"action":"show_text","value":["",{"text":"Huge fungi (nether trees) as well as huge mushrooms will get chopped."},{"text":"\n\nUse it on your own risk!\nWhen enabled, this datapack can't differentiate between generated fungi and player-placed fungi and therefore can potentially destroy your buildings.","color":"dark_red"}]}}]
execute unless score chop_fungi timber matches 1.. run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/function timber:settings/toggle/chop_fungi"}},{"text":" Chop Fungi","hoverEvent":{"action":"show_text","value":["",{"text":"Huge fungi (nether trees) as well as huge mushrooms will get chopped."},{"text":"\n\nUse it on your own risk!\nWhen enabled, this datapack can't differentiate between generated fungi and player-placed fungi and therefore can potentially destroy your buildings.","color":"dark_red"}]}}]
execute if score blocks_per_chop timber matches 1 if score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set blocks_per_chop timber "},"hoverEvent":{"action":"show_text","value":"Default: 1"}},{"text":" Set Amount of Destroyed Blocks per Chop"},{"text":" (Current: ","color":"gray"},{"score":{"name":"blocks_per_chop","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute unless score blocks_per_chop timber matches 1 if score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set blocks_per_chop timber "},"hoverEvent":{"action":"show_text","value":"Default: 1"}},{"text":" Set Amount of Destroyed Blocks per Chop"},{"text":" (Current: ","color":"gray"},{"score":{"name":"blocks_per_chop","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute unless score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✎ ]","color":"dark_gray","hoverEvent":{"action":"show_text","value":"Not active when \"Chop Slowly\" is disabled."}},{"text":" Set Amount of Destroyed Blocks per Chop"}]
execute if score time_between_chops timber matches 1 if score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set time_between_chops timber "},"hoverEvent":{"action":"show_text","value":"Default: 1"}},{"text":" Set Time in Ticks Between Chops"},{"text":" (Current: ","color":"gray"},{"score":{"name":"time_between_chops","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute unless score time_between_chops timber matches 1 if score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set time_between_chops timber "},"hoverEvent":{"action":"show_text","value":"Default: 1"}},{"text":" Set Time in Ticks Between Chops"},{"text":" (Current: ","color":"gray"},{"score":{"name":"time_between_chops","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute unless score slow_chop timber matches 1.. run tellraw @s ["",{"text":"[ ✎ ]","color":"dark_gray","hoverEvent":{"action":"show_text","value":"Not active when \"Chop Slowly\" is disabled."}},{"text":" Set Time in Ticks Between Chops"}]
execute if score max_tree_size timber matches 555 run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set max_tree_size timber "},"hoverEvent":{"action":"show_text","value":"Default: 555"}},{"text":" Set Max. Tree Size","hoverEvent":{"action":"show_text","value":"Trees bigger than this set value won't get further processed."}},{"text":" (Current: ","color":"gray"},{"score":{"name":"max_tree_size","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute unless score max_tree_size timber matches 555 run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set max_tree_size timber "},"hoverEvent":{"action":"show_text","value":"Default: 555"}},{"text":" Set Max. Tree Size","hoverEvent":{"action":"show_text","value":"Trees bigger than this set value won't get further processed."}},{"text":" (Current: ","color":"gray"},{"score":{"name":"max_tree_size","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute if score min_leaves_found timber matches 5 run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set min_leaves_found timber "},"hoverEvent":{"action":"show_text","value":"Default: 5"}},{"text":" Set Min. Leaves to Valid a Tree","hoverEvent":{"action":"show_text","value":"This datapack considers a tree only if it has this set value amount of naturally generated leaves at its trunk.\nFungi will get checked by the amount of cap blocks and additionally a 3×3 big cross on top of the stem."}},{"text":" (Current: ","color":"gray"},{"score":{"name":"min_leaves_found","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
execute unless score min_leaves_found timber matches 5 run tellraw @s ["",{"text":"[ ✎ ]","color":"gray","clickEvent":{"action":"suggest_command","value":"/scoreboard players set min_leaves_found timber "},"hoverEvent":{"action":"show_text","value":"Default: 5"}},{"text":" Set Min. Leaves to Valid a Tree","hoverEvent":{"action":"show_text","value":"This datapack considers a tree only if it has this set value amount of naturally generated leaves at its trunk.\nFungi will get checked by the amount of cap blocks and additionally a 3×3 big cross on top of the stem."}},{"text":" (Current: ","color":"gray"},{"score":{"name":"min_leaves_found","objective":"timber"},"color":"gray"},{"text": ")","color":"gray"}]
tellraw @s ["",{"text":"\u00A7m ","color":"dark_gray"}]
function timber:settings/end_of_message

View file

@ -0,0 +1,2 @@
function timber:settings/settings2
playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.6 .2

View file

@ -0,0 +1,7 @@
execute if score chop_down timber matches 1.. run scoreboard players set chop_down timber 2
execute unless score chop_down timber matches 1.. run scoreboard players set chop_down timber 1
execute if score chop_down timber matches 2.. run scoreboard players set chop_down timber 0
execute if score chop_down timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score chop_down timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score chop_fungi timber matches 1.. run scoreboard players set chop_fungi timber 2
execute unless score chop_fungi timber matches 1.. run scoreboard players set chop_fungi timber 1
execute if score chop_fungi timber matches 2.. run scoreboard players set chop_fungi timber 0
execute if score chop_fungi timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score chop_fungi timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score chop_trees timber matches 1.. run scoreboard players set chop_trees timber 2
execute unless score chop_trees timber matches 1.. run scoreboard players set chop_trees timber 1
execute if score chop_trees timber matches 2.. run scoreboard players set chop_trees timber 0
execute if score chop_trees timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score chop_trees timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score destroy_leaves timber matches 1.. run scoreboard players set destroy_leaves timber 2
execute unless score destroy_leaves timber matches 1.. run scoreboard players set destroy_leaves timber 1
execute if score destroy_leaves timber matches 2.. run scoreboard players set destroy_leaves timber 0
execute if score destroy_leaves timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score destroy_leaves timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score diamond_axe timber matches 1.. run scoreboard players set diamond_axe timber 2
execute unless score diamond_axe timber matches 1.. run scoreboard players set diamond_axe timber 1
execute if score diamond_axe timber matches 2.. run scoreboard players set diamond_axe timber 0
execute if score diamond_axe timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score diamond_axe timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score drop_loot timber matches 1.. run scoreboard players set drop_loot timber 2
execute unless score drop_loot timber matches 1.. run scoreboard players set drop_loot timber 1
execute if score drop_loot timber matches 2.. run scoreboard players set drop_loot timber 0
execute if score drop_loot timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score drop_loot timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score golden_axe timber matches 1.. run scoreboard players set golden_axe timber 2
execute unless score golden_axe timber matches 1.. run scoreboard players set golden_axe timber 1
execute if score golden_axe timber matches 2.. run scoreboard players set golden_axe timber 0
execute if score golden_axe timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score golden_axe timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score hunger timber matches 1.. run scoreboard players set hunger timber 2
execute unless score hunger timber matches 1.. run scoreboard players set hunger timber 1
execute if score hunger timber matches 2.. run scoreboard players set hunger timber 0
execute if score hunger timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score hunger timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings1
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score interfere timber matches 1.. run scoreboard players set interfere timber 2
execute unless score interfere timber matches 1.. run scoreboard players set interfere timber 1
execute if score interfere timber matches 2.. run scoreboard players set interfere timber 0
execute if score interfere timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score interfere timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score iron_axe timber matches 1.. run scoreboard players set iron_axe timber 2
execute unless score iron_axe timber matches 1.. run scoreboard players set iron_axe timber 1
execute if score iron_axe timber matches 2.. run scoreboard players set iron_axe timber 0
execute if score iron_axe timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score iron_axe timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score netherite_axe timber matches 1.. run scoreboard players set netherite_axe timber 2
execute unless score netherite_axe timber matches 1.. run scoreboard players set netherite_axe timber 1
execute if score netherite_axe timber matches 2.. run scoreboard players set netherite_axe timber 0
execute if score netherite_axe timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score netherite_axe timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score persistent timber matches 1.. run scoreboard players set persistent timber 2
execute unless score persistent timber matches 1.. run scoreboard players set persistent timber 1
execute if score persistent timber matches 2.. run scoreboard players set persistent timber 0
execute if score persistent timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score persistent timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,8 @@
execute if score plant_sapling timber matches 1.. run scoreboard players set plant_sapling timber 2
execute unless score plant_sapling timber matches 1.. run scoreboard players set plant_sapling timber 1
execute if score plant_sapling timber matches 2.. run scoreboard players set plant_sapling timber 0
execute if score plant_sapling timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score plant_sapling timber matches 1 run function timber:autoplant/loop
execute if score plant_sapling timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings1
function timber:settings/end_of_message

View file

@ -0,0 +1,8 @@
execute if score slow_chop timber matches 1.. run scoreboard players set slow_chop timber 2
execute unless score slow_chop timber matches 1.. run scoreboard players set slow_chop timber 1
execute if score slow_chop timber matches 2.. run scoreboard players set slow_chop timber 0
execute if score slow_chop timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score slow_chop timber matches 1 run function timber:slow_chop/loop
execute if score slow_chop timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings1
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score sneaking timber matches 1.. run scoreboard players set sneaking timber 2
execute unless score sneaking timber matches 1.. run scoreboard players set sneaking timber 1
execute if score sneaking timber matches 2.. run scoreboard players set sneaking timber 0
execute if score sneaking timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score sneaking timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score standing timber matches 1.. run scoreboard players set standing timber 2
execute unless score standing timber matches 1.. run scoreboard players set standing timber 1
execute if score standing timber matches 2.. run scoreboard players set standing timber 0
execute if score standing timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score standing timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score stone_axe timber matches 1.. run scoreboard players set stone_axe timber 2
execute unless score stone_axe timber matches 1.. run scoreboard players set stone_axe timber 1
execute if score stone_axe timber matches 2.. run scoreboard players set stone_axe timber 0
execute if score stone_axe timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score stone_axe timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score stop_chopping timber matches 1.. run scoreboard players set stop_chopping timber 2
execute unless score stop_chopping timber matches 1.. run scoreboard players set stop_chopping timber 1
execute if score stop_chopping timber matches 2.. run scoreboard players set stop_chopping timber 0
execute if score stop_chopping timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score stop_chopping timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score stopsound timber matches 1.. run scoreboard players set stopsound timber 2
execute unless score stopsound timber matches 1.. run scoreboard players set stopsound timber 1
execute if score stopsound timber matches 2.. run scoreboard players set stopsound timber 0
execute if score stopsound timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score stopsound timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,9 @@
# reset
scoreboard players set @s TimberToggle 0
# toggle
execute unless score @s timber_disabled matches 1.. run scoreboard players set @s timber_disabled 3
execute if score @s timber_disabled matches 1 run scoreboard players set @s timber_disabled 0
execute if score @s timber_disabled matches 3 run scoreboard players set @s timber_disabled 1
# display on/off status
execute unless score @s[tag=!global.ignore.gui] timber_disabled matches 1.. run tellraw @s ["",{"text":"<< ","color":"dark_gray"},{"text":"","color":"green"},{"text":" Timber is now on"},{"text":" >>","color":"dark_gray"}]
execute if score @s[tag=!global.ignore.gui] timber_disabled matches 1.. run tellraw @s ["",{"text":"<< ","color":"dark_gray"},{"text":"","color":"red"},{"text":" Timber is now off"},{"text":" >>","color":"dark_gray"}]

View file

@ -0,0 +1,7 @@
execute if score wear_out timber matches 1.. run scoreboard players set wear_out timber 2
execute unless score wear_out timber matches 1.. run scoreboard players set wear_out timber 1
execute if score wear_out timber matches 2.. run scoreboard players set wear_out timber 0
execute if score wear_out timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score wear_out timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings
function timber:settings/end_of_message

View file

@ -0,0 +1,7 @@
execute if score wooden_axe timber matches 1.. run scoreboard players set wooden_axe timber 2
execute unless score wooden_axe timber matches 1.. run scoreboard players set wooden_axe timber 1
execute if score wooden_axe timber matches 2.. run scoreboard players set wooden_axe timber 0
execute if score wooden_axe timber matches 1 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.9 .2
execute if score wooden_axe timber matches 0 run playsound minecraft:ui.button.click master @s ~ ~ ~ .2 1.3 .2
function timber:settings/settings2
function timber:settings/end_of_message

View file

@ -0,0 +1,5 @@
# api
execute if entity @s[tag=timber_log] run function #timber:api/break_log
execute if entity @s[tag=timber_leaf] run function #timber:api/break_leaf
execute if entity @s[tag=timber_stem] run function #timber:api/break_stem
execute if entity @s[tag=timber_cap] run function #timber:api/break_cap

View file

@ -0,0 +1,3 @@
# delete tree markers after chopping
kill @e[type=minecraft:marker,tag=timber_slow_chop]
kill @e[type=minecraft:armor_stand,tag=timber_tool]

View file

@ -0,0 +1,21 @@
# api
execute as @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] at @s run function timber:slow_chop/api
# destroy 1 block
execute as @e[type=minecraft:armor_stand,tag=timber_tool,y=0,distance=...1,sort=arbitrary,limit=1] at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] run loot spawn ~ ~ ~ mine ~ ~ ~ mainhand
# destroy animation
gamerule doTileDrops false
execute at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] run setblock ~ ~ ~ minecraft:air destroy
gamerule doTileDrops true
# stop sound
execute if score stopsound timber matches 1.. at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] as @a[distance=..20,tag=!global.ignore.gui] run function timber:utils/stopsound
# delete location item
execute at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] run kill @e[type=minecraft:item,nbt={Item:{components:{"minecraft:custom_data":{Tags:[timber_location]}}}}]
# remove marker of processed blocks
kill @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1]
scoreboard players add b_p_c timber 1

View file

@ -0,0 +1,21 @@
# api
execute as @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] at @s run function timber:slow_chop/api
# destroy 5 block
execute as @e[type=minecraft:armor_stand,tag=timber_tool,y=0,distance=...1,sort=arbitrary,limit=1] at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=5] run loot spawn ~ ~ ~ mine ~ ~ ~ mainhand
# destroy animation
gamerule doTileDrops false
execute at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=5] run setblock ~ ~ ~ minecraft:air destroy
gamerule doTileDrops true
# stop sound
execute if score stopsound timber matches 1.. at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=5] as @a[distance=..20,tag=!global.ignore.gui] run function timber:utils/stopsound
# delete location item
execute at @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=1] run kill @e[type=minecraft:item,nbt={Item:{components:{"minecraft:custom_data":{Tags:[timber_location]}}}}]
# remove marker of processed blocks
kill @e[type=minecraft:marker,tag=timber_destroy,sort=nearest,limit=5]
scoreboard players add b_p_c timber 5

View file

@ -0,0 +1,9 @@
# destroy 5 block
execute unless score b_p_c timber matches ..4 run function timber:slow_chop/destroy5
# destroy 1 block
execute unless score b_p_c timber matches 5.. run function timber:slow_chop/destroy1
# loop
execute if score b_p_c timber < blocks_per_chop timber run function timber:slow_chop/destroy_loop
execute if score b_p_c timber >= blocks_per_chop timber run scoreboard players set b_p_c timber 0

View file

@ -0,0 +1,12 @@
# Loop
execute if score slow_chop timber matches 1.. run schedule function timber:slow_chop/loop 1t replace
scoreboard players add t_b_c timber 1
# chop trees
execute if score t_b_c timber >= time_between_chops timber at @e[type=minecraft:marker,tag=timber_slow_chop] run function timber:slow_chop/destroy_loop
# delete tree markers after chopping
execute if score t_b_c timber >= time_between_chops timber unless entity @e[type=minecraft:marker,tag=timber_destroy] run function timber:slow_chop/delete_markers
execute if score t_b_c timber >= time_between_chops timber run scoreboard players set t_b_c timber 0

View file

@ -0,0 +1,3 @@
# standing or sneaking enabled?
execute if score standing timber matches 1.. unless predicate timber:sneaking run function timber:run
execute if score sneaking timber matches 1.. if predicate timber:sneaking run function timber:run

View file

@ -0,0 +1,7 @@
# check if axe is broken
execute if score @s timber_w_axe matches 1.. unless score durability timber matches ..59 run scoreboard players set durability_okay timber 0
execute if score @s timber_s_axe matches 1.. unless score durability timber matches ..131 run scoreboard players set durability_okay timber 0
execute if score @s timber_i_axe matches 1.. unless score durability timber matches ..250 run scoreboard players set durability_okay timber 0
execute if score @s timber_g_axe matches 1.. unless score durability timber matches ..32 run scoreboard players set durability_okay timber 0
execute if score @s timber_d_axe matches 1.. unless score durability timber matches ..1561 run scoreboard players set durability_okay timber 0
execute if score @s timber_n_axe matches 1.. unless score durability timber matches ..2031 run scoreboard players set durability_okay timber 0

View file

@ -0,0 +1,5 @@
# count wear out of tool depending on enchantment
execute if score unbreaking timber matches 0 run scoreboard players add durability timber 1
execute if score unbreaking timber matches 1 if predicate timber:random_chance/0.5 run scoreboard players add durability timber 1
execute if score unbreaking timber matches 2 if predicate timber:random_chance/0.333 run scoreboard players add durability timber 1
execute if score unbreaking timber matches 3.. if predicate timber:random_chance/0.25 run scoreboard players add durability timber 1

View file

@ -0,0 +1,5 @@
scoreboard players set unbreakable timber 0
execute store result score durability timber run data get entity @s SelectedItem.components."minecraft:damage"
scoreboard players remove durability timber 1
execute unless items entity @s weapon.mainhand * run scoreboard players set durability timber 9999
execute if items entity @s weapon.mainhand *[unbreakable] run scoreboard players set unbreakable timber 1

View file

@ -0,0 +1,3 @@
# wear out tool
execute store result storage timber:temp durability int 1 run scoreboard players get durability timber
item modify entity @s weapon.mainhand timber:wear_out

View file

@ -0,0 +1,13 @@
# break axe if worn out
execute if score @s timber_w_axe matches 1.. if score durability timber matches 59.. run item replace entity @s weapon.mainhand with minecraft:air
execute if score @s timber_w_axe matches 1.. if score durability timber matches 59.. run playsound minecraft:entity.item.break player @a ~ ~ ~
execute if score @s timber_s_axe matches 1.. if score durability timber matches 131.. run item replace entity @s weapon.mainhand with minecraft:air
execute if score @s timber_s_axe matches 1.. if score durability timber matches 131.. run playsound minecraft:entity.item.break player @a ~ ~ ~
execute if score @s timber_i_axe matches 1.. if score durability timber matches 250.. run item replace entity @s weapon.mainhand with minecraft:air
execute if score @s timber_i_axe matches 1.. if score durability timber matches 250.. run playsound minecraft:entity.item.break player @a ~ ~ ~
execute if score @s timber_g_axe matches 1.. if score durability timber matches 32.. run item replace entity @s weapon.mainhand with minecraft:air
execute if score @s timber_g_axe matches 1.. if score durability timber matches 32.. run playsound minecraft:entity.item.break player @a ~ ~ ~
execute if score @s timber_d_axe matches 1.. if score durability timber matches 1561.. run item replace entity @s weapon.mainhand with minecraft:air
execute if score @s timber_d_axe matches 1.. if score durability timber matches 1561.. run playsound minecraft:entity.item.break player @a ~ ~ ~
execute if score @s timber_n_axe matches 1.. if score durability timber matches 2031.. run item replace entity @s weapon.mainhand with minecraft:air
execute if score @s timber_n_axe matches 1.. if score durability timber matches 2031.. run playsound minecraft:entity.item.break player @a ~ ~ ~

View file

@ -0,0 +1,19 @@
# stop main functions
schedule clear timber:main
# remove scoreboards
scoreboard objectives remove timber_w_axe
scoreboard objectives remove timber_s_axe
scoreboard objectives remove timber_i_axe
scoreboard objectives remove timber_g_axe
scoreboard objectives remove timber_d_axe
scoreboard objectives remove timber_n_axe
scoreboard objectives remove timber
scoreboard objectives remove TimberToggle
scoreboard objectives remove timber_disabled
scoreboard objectives remove timber_prsistent
# remove markers
kill @e[type=minecraft:marker,tag=timber_slow_chop]
kill @e[type=minecraft:marker,tag=timber_destroy]
kill @e[type=minecraft:armor_stand,tag=timber_tool]

View file

@ -0,0 +1,18 @@
# is this axe enabled?
execute unless score @s timber_disabled matches 1.. if score @s timber_w_axe matches 1.. if score wooden_axe timber matches 1.. run function timber:sneaking
execute unless score @s timber_disabled matches 1.. if score @s timber_s_axe matches 1.. if score stone_axe timber matches 1.. run function timber:sneaking
execute unless score @s timber_disabled matches 1.. if score @s timber_i_axe matches 1.. if score iron_axe timber matches 1.. run function timber:sneaking
execute unless score @s timber_disabled matches 1.. if score @s timber_g_axe matches 1.. if score golden_axe timber matches 1.. run function timber:sneaking
execute unless score @s timber_disabled matches 1.. if score @s timber_d_axe matches 1.. if score diamond_axe timber matches 1.. run function timber:sneaking
execute unless score @s timber_disabled matches 1.. if score @s timber_n_axe matches 1.. if score netherite_axe timber matches 1.. run function timber:sneaking
# remove mushroom_stem marker
kill @e[type=minecraft:item,nbt={Item:{components:{"minecraft:custom_data":{Tags:[timber_location]}}}}]
# reset scores
scoreboard players set @s timber_w_axe 0
scoreboard players set @s timber_s_axe 0
scoreboard players set @s timber_i_axe 0
scoreboard players set @s timber_g_axe 0
scoreboard players set @s timber_d_axe 0
scoreboard players set @s timber_n_axe 0

View file

@ -0,0 +1,255 @@
execute if score tree_size timber matches 1 run effect give @s minecraft:hunger 1 1 true
execute if score tree_size timber matches 2 run effect give @s minecraft:hunger 1 2 true
execute if score tree_size timber matches 3 run effect give @s minecraft:hunger 1 3 true
execute if score tree_size timber matches 4 run effect give @s minecraft:hunger 1 4 true
execute if score tree_size timber matches 5 run effect give @s minecraft:hunger 1 5 true
execute if score tree_size timber matches 6 run effect give @s minecraft:hunger 1 6 true
execute if score tree_size timber matches 7 run effect give @s minecraft:hunger 1 7 true
execute if score tree_size timber matches 8 run effect give @s minecraft:hunger 1 8 true
execute if score tree_size timber matches 9 run effect give @s minecraft:hunger 1 9 true
execute if score tree_size timber matches 10 run effect give @s minecraft:hunger 1 10 true
execute if score tree_size timber matches 11 run effect give @s minecraft:hunger 1 11 true
execute if score tree_size timber matches 12 run effect give @s minecraft:hunger 1 12 true
execute if score tree_size timber matches 13 run effect give @s minecraft:hunger 1 13 true
execute if score tree_size timber matches 14 run effect give @s minecraft:hunger 1 14 true
execute if score tree_size timber matches 15 run effect give @s minecraft:hunger 1 15 true
execute if score tree_size timber matches 16 run effect give @s minecraft:hunger 1 16 true
execute if score tree_size timber matches 17 run effect give @s minecraft:hunger 1 17 true
execute if score tree_size timber matches 18 run effect give @s minecraft:hunger 1 18 true
execute if score tree_size timber matches 19 run effect give @s minecraft:hunger 1 19 true
execute if score tree_size timber matches 20 run effect give @s minecraft:hunger 1 20 true
execute if score tree_size timber matches 21 run effect give @s minecraft:hunger 1 21 true
execute if score tree_size timber matches 22 run effect give @s minecraft:hunger 1 22 true
execute if score tree_size timber matches 23 run effect give @s minecraft:hunger 1 23 true
execute if score tree_size timber matches 24 run effect give @s minecraft:hunger 1 24 true
execute if score tree_size timber matches 25 run effect give @s minecraft:hunger 1 25 true
execute if score tree_size timber matches 26 run effect give @s minecraft:hunger 1 26 true
execute if score tree_size timber matches 27 run effect give @s minecraft:hunger 1 27 true
execute if score tree_size timber matches 28 run effect give @s minecraft:hunger 1 28 true
execute if score tree_size timber matches 29 run effect give @s minecraft:hunger 1 29 true
execute if score tree_size timber matches 30 run effect give @s minecraft:hunger 1 30 true
execute if score tree_size timber matches 31 run effect give @s minecraft:hunger 1 31 true
execute if score tree_size timber matches 32 run effect give @s minecraft:hunger 1 32 true
execute if score tree_size timber matches 33 run effect give @s minecraft:hunger 1 33 true
execute if score tree_size timber matches 34 run effect give @s minecraft:hunger 1 34 true
execute if score tree_size timber matches 35 run effect give @s minecraft:hunger 1 35 true
execute if score tree_size timber matches 36 run effect give @s minecraft:hunger 1 36 true
execute if score tree_size timber matches 37 run effect give @s minecraft:hunger 1 37 true
execute if score tree_size timber matches 38 run effect give @s minecraft:hunger 1 38 true
execute if score tree_size timber matches 39 run effect give @s minecraft:hunger 1 39 true
execute if score tree_size timber matches 40 run effect give @s minecraft:hunger 1 40 true
execute if score tree_size timber matches 41 run effect give @s minecraft:hunger 1 41 true
execute if score tree_size timber matches 42 run effect give @s minecraft:hunger 1 42 true
execute if score tree_size timber matches 43 run effect give @s minecraft:hunger 1 43 true
execute if score tree_size timber matches 44 run effect give @s minecraft:hunger 1 44 true
execute if score tree_size timber matches 45 run effect give @s minecraft:hunger 1 45 true
execute if score tree_size timber matches 46 run effect give @s minecraft:hunger 1 46 true
execute if score tree_size timber matches 47 run effect give @s minecraft:hunger 1 47 true
execute if score tree_size timber matches 48 run effect give @s minecraft:hunger 1 48 true
execute if score tree_size timber matches 49 run effect give @s minecraft:hunger 1 49 true
execute if score tree_size timber matches 50 run effect give @s minecraft:hunger 1 50 true
execute if score tree_size timber matches 51 run effect give @s minecraft:hunger 1 51 true
execute if score tree_size timber matches 52 run effect give @s minecraft:hunger 1 52 true
execute if score tree_size timber matches 53 run effect give @s minecraft:hunger 1 53 true
execute if score tree_size timber matches 54 run effect give @s minecraft:hunger 1 54 true
execute if score tree_size timber matches 55 run effect give @s minecraft:hunger 1 55 true
execute if score tree_size timber matches 56 run effect give @s minecraft:hunger 1 56 true
execute if score tree_size timber matches 57 run effect give @s minecraft:hunger 1 57 true
execute if score tree_size timber matches 58 run effect give @s minecraft:hunger 1 58 true
execute if score tree_size timber matches 59 run effect give @s minecraft:hunger 1 59 true
execute if score tree_size timber matches 60 run effect give @s minecraft:hunger 1 60 true
execute if score tree_size timber matches 61 run effect give @s minecraft:hunger 1 61 true
execute if score tree_size timber matches 62 run effect give @s minecraft:hunger 1 62 true
execute if score tree_size timber matches 63 run effect give @s minecraft:hunger 1 63 true
execute if score tree_size timber matches 64 run effect give @s minecraft:hunger 1 64 true
execute if score tree_size timber matches 65 run effect give @s minecraft:hunger 1 65 true
execute if score tree_size timber matches 66 run effect give @s minecraft:hunger 1 66 true
execute if score tree_size timber matches 67 run effect give @s minecraft:hunger 1 67 true
execute if score tree_size timber matches 68 run effect give @s minecraft:hunger 1 68 true
execute if score tree_size timber matches 69 run effect give @s minecraft:hunger 1 69 true
execute if score tree_size timber matches 70 run effect give @s minecraft:hunger 1 70 true
execute if score tree_size timber matches 71 run effect give @s minecraft:hunger 1 71 true
execute if score tree_size timber matches 72 run effect give @s minecraft:hunger 1 72 true
execute if score tree_size timber matches 73 run effect give @s minecraft:hunger 1 73 true
execute if score tree_size timber matches 74 run effect give @s minecraft:hunger 1 74 true
execute if score tree_size timber matches 75 run effect give @s minecraft:hunger 1 75 true
execute if score tree_size timber matches 76 run effect give @s minecraft:hunger 1 76 true
execute if score tree_size timber matches 77 run effect give @s minecraft:hunger 1 77 true
execute if score tree_size timber matches 78 run effect give @s minecraft:hunger 1 78 true
execute if score tree_size timber matches 79 run effect give @s minecraft:hunger 1 79 true
execute if score tree_size timber matches 80 run effect give @s minecraft:hunger 1 80 true
execute if score tree_size timber matches 81 run effect give @s minecraft:hunger 1 81 true
execute if score tree_size timber matches 82 run effect give @s minecraft:hunger 1 82 true
execute if score tree_size timber matches 83 run effect give @s minecraft:hunger 1 83 true
execute if score tree_size timber matches 84 run effect give @s minecraft:hunger 1 84 true
execute if score tree_size timber matches 85 run effect give @s minecraft:hunger 1 85 true
execute if score tree_size timber matches 86 run effect give @s minecraft:hunger 1 86 true
execute if score tree_size timber matches 87 run effect give @s minecraft:hunger 1 87 true
execute if score tree_size timber matches 88 run effect give @s minecraft:hunger 1 88 true
execute if score tree_size timber matches 89 run effect give @s minecraft:hunger 1 89 true
execute if score tree_size timber matches 90 run effect give @s minecraft:hunger 1 90 true
execute if score tree_size timber matches 91 run effect give @s minecraft:hunger 1 91 true
execute if score tree_size timber matches 92 run effect give @s minecraft:hunger 1 92 true
execute if score tree_size timber matches 93 run effect give @s minecraft:hunger 1 93 true
execute if score tree_size timber matches 94 run effect give @s minecraft:hunger 1 94 true
execute if score tree_size timber matches 95 run effect give @s minecraft:hunger 1 95 true
execute if score tree_size timber matches 96 run effect give @s minecraft:hunger 1 96 true
execute if score tree_size timber matches 97 run effect give @s minecraft:hunger 1 97 true
execute if score tree_size timber matches 98 run effect give @s minecraft:hunger 1 98 true
execute if score tree_size timber matches 99 run effect give @s minecraft:hunger 1 99 true
execute if score tree_size timber matches 100 run effect give @s minecraft:hunger 1 100 true
execute if score tree_size timber matches 101 run effect give @s minecraft:hunger 1 101 true
execute if score tree_size timber matches 102 run effect give @s minecraft:hunger 1 102 true
execute if score tree_size timber matches 103 run effect give @s minecraft:hunger 1 103 true
execute if score tree_size timber matches 104 run effect give @s minecraft:hunger 1 104 true
execute if score tree_size timber matches 105 run effect give @s minecraft:hunger 1 105 true
execute if score tree_size timber matches 106 run effect give @s minecraft:hunger 1 106 true
execute if score tree_size timber matches 107 run effect give @s minecraft:hunger 1 107 true
execute if score tree_size timber matches 108 run effect give @s minecraft:hunger 1 108 true
execute if score tree_size timber matches 109 run effect give @s minecraft:hunger 1 109 true
execute if score tree_size timber matches 110 run effect give @s minecraft:hunger 1 110 true
execute if score tree_size timber matches 111 run effect give @s minecraft:hunger 1 111 true
execute if score tree_size timber matches 112 run effect give @s minecraft:hunger 1 112 true
execute if score tree_size timber matches 113 run effect give @s minecraft:hunger 1 113 true
execute if score tree_size timber matches 114 run effect give @s minecraft:hunger 1 114 true
execute if score tree_size timber matches 115 run effect give @s minecraft:hunger 1 115 true
execute if score tree_size timber matches 116 run effect give @s minecraft:hunger 1 116 true
execute if score tree_size timber matches 117 run effect give @s minecraft:hunger 1 117 true
execute if score tree_size timber matches 118 run effect give @s minecraft:hunger 1 118 true
execute if score tree_size timber matches 119 run effect give @s minecraft:hunger 1 119 true
execute if score tree_size timber matches 120 run effect give @s minecraft:hunger 1 120 true
execute if score tree_size timber matches 121 run effect give @s minecraft:hunger 1 121 true
execute if score tree_size timber matches 122 run effect give @s minecraft:hunger 1 122 true
execute if score tree_size timber matches 123 run effect give @s minecraft:hunger 1 123 true
execute if score tree_size timber matches 124 run effect give @s minecraft:hunger 1 124 true
execute if score tree_size timber matches 125 run effect give @s minecraft:hunger 1 125 true
execute if score tree_size timber matches 126 run effect give @s minecraft:hunger 1 126 true
execute if score tree_size timber matches 127 run effect give @s minecraft:hunger 1 127 true
execute if score tree_size timber matches 128 run effect give @s minecraft:hunger 1 128 true
execute if score tree_size timber matches 129 run effect give @s minecraft:hunger 1 129 true
execute if score tree_size timber matches 130 run effect give @s minecraft:hunger 1 130 true
execute if score tree_size timber matches 131 run effect give @s minecraft:hunger 1 131 true
execute if score tree_size timber matches 132 run effect give @s minecraft:hunger 1 132 true
execute if score tree_size timber matches 133 run effect give @s minecraft:hunger 1 133 true
execute if score tree_size timber matches 134 run effect give @s minecraft:hunger 1 134 true
execute if score tree_size timber matches 135 run effect give @s minecraft:hunger 1 135 true
execute if score tree_size timber matches 136 run effect give @s minecraft:hunger 1 136 true
execute if score tree_size timber matches 137 run effect give @s minecraft:hunger 1 137 true
execute if score tree_size timber matches 138 run effect give @s minecraft:hunger 1 138 true
execute if score tree_size timber matches 139 run effect give @s minecraft:hunger 1 139 true
execute if score tree_size timber matches 140 run effect give @s minecraft:hunger 1 140 true
execute if score tree_size timber matches 141 run effect give @s minecraft:hunger 1 141 true
execute if score tree_size timber matches 142 run effect give @s minecraft:hunger 1 142 true
execute if score tree_size timber matches 143 run effect give @s minecraft:hunger 1 143 true
execute if score tree_size timber matches 144 run effect give @s minecraft:hunger 1 144 true
execute if score tree_size timber matches 145 run effect give @s minecraft:hunger 1 145 true
execute if score tree_size timber matches 146 run effect give @s minecraft:hunger 1 146 true
execute if score tree_size timber matches 147 run effect give @s minecraft:hunger 1 147 true
execute if score tree_size timber matches 148 run effect give @s minecraft:hunger 1 148 true
execute if score tree_size timber matches 149 run effect give @s minecraft:hunger 1 149 true
execute if score tree_size timber matches 150 run effect give @s minecraft:hunger 1 150 true
execute if score tree_size timber matches 151 run effect give @s minecraft:hunger 1 151 true
execute if score tree_size timber matches 152 run effect give @s minecraft:hunger 1 152 true
execute if score tree_size timber matches 153 run effect give @s minecraft:hunger 1 153 true
execute if score tree_size timber matches 154 run effect give @s minecraft:hunger 1 154 true
execute if score tree_size timber matches 155 run effect give @s minecraft:hunger 1 155 true
execute if score tree_size timber matches 156 run effect give @s minecraft:hunger 1 156 true
execute if score tree_size timber matches 157 run effect give @s minecraft:hunger 1 157 true
execute if score tree_size timber matches 158 run effect give @s minecraft:hunger 1 158 true
execute if score tree_size timber matches 159 run effect give @s minecraft:hunger 1 159 true
execute if score tree_size timber matches 160 run effect give @s minecraft:hunger 1 160 true
execute if score tree_size timber matches 161 run effect give @s minecraft:hunger 1 161 true
execute if score tree_size timber matches 162 run effect give @s minecraft:hunger 1 162 true
execute if score tree_size timber matches 163 run effect give @s minecraft:hunger 1 163 true
execute if score tree_size timber matches 164 run effect give @s minecraft:hunger 1 164 true
execute if score tree_size timber matches 165 run effect give @s minecraft:hunger 1 165 true
execute if score tree_size timber matches 166 run effect give @s minecraft:hunger 1 166 true
execute if score tree_size timber matches 167 run effect give @s minecraft:hunger 1 167 true
execute if score tree_size timber matches 168 run effect give @s minecraft:hunger 1 168 true
execute if score tree_size timber matches 169 run effect give @s minecraft:hunger 1 169 true
execute if score tree_size timber matches 170 run effect give @s minecraft:hunger 1 170 true
execute if score tree_size timber matches 171 run effect give @s minecraft:hunger 1 171 true
execute if score tree_size timber matches 172 run effect give @s minecraft:hunger 1 172 true
execute if score tree_size timber matches 173 run effect give @s minecraft:hunger 1 173 true
execute if score tree_size timber matches 174 run effect give @s minecraft:hunger 1 174 true
execute if score tree_size timber matches 175 run effect give @s minecraft:hunger 1 175 true
execute if score tree_size timber matches 176 run effect give @s minecraft:hunger 1 176 true
execute if score tree_size timber matches 177 run effect give @s minecraft:hunger 1 177 true
execute if score tree_size timber matches 178 run effect give @s minecraft:hunger 1 178 true
execute if score tree_size timber matches 179 run effect give @s minecraft:hunger 1 179 true
execute if score tree_size timber matches 180 run effect give @s minecraft:hunger 1 180 true
execute if score tree_size timber matches 181 run effect give @s minecraft:hunger 1 181 true
execute if score tree_size timber matches 182 run effect give @s minecraft:hunger 1 182 true
execute if score tree_size timber matches 183 run effect give @s minecraft:hunger 1 183 true
execute if score tree_size timber matches 184 run effect give @s minecraft:hunger 1 184 true
execute if score tree_size timber matches 185 run effect give @s minecraft:hunger 1 185 true
execute if score tree_size timber matches 186 run effect give @s minecraft:hunger 1 186 true
execute if score tree_size timber matches 187 run effect give @s minecraft:hunger 1 187 true
execute if score tree_size timber matches 188 run effect give @s minecraft:hunger 1 188 true
execute if score tree_size timber matches 189 run effect give @s minecraft:hunger 1 189 true
execute if score tree_size timber matches 190 run effect give @s minecraft:hunger 1 190 true
execute if score tree_size timber matches 191 run effect give @s minecraft:hunger 1 191 true
execute if score tree_size timber matches 192 run effect give @s minecraft:hunger 1 192 true
execute if score tree_size timber matches 193 run effect give @s minecraft:hunger 1 193 true
execute if score tree_size timber matches 194 run effect give @s minecraft:hunger 1 194 true
execute if score tree_size timber matches 195 run effect give @s minecraft:hunger 1 195 true
execute if score tree_size timber matches 196 run effect give @s minecraft:hunger 1 196 true
execute if score tree_size timber matches 197 run effect give @s minecraft:hunger 1 197 true
execute if score tree_size timber matches 198 run effect give @s minecraft:hunger 1 198 true
execute if score tree_size timber matches 199 run effect give @s minecraft:hunger 1 199 true
execute if score tree_size timber matches 200 run effect give @s minecraft:hunger 1 200 true
execute if score tree_size timber matches 201 run effect give @s minecraft:hunger 1 201 true
execute if score tree_size timber matches 202 run effect give @s minecraft:hunger 1 202 true
execute if score tree_size timber matches 203 run effect give @s minecraft:hunger 1 203 true
execute if score tree_size timber matches 204 run effect give @s minecraft:hunger 1 204 true
execute if score tree_size timber matches 205 run effect give @s minecraft:hunger 1 205 true
execute if score tree_size timber matches 206 run effect give @s minecraft:hunger 1 206 true
execute if score tree_size timber matches 207 run effect give @s minecraft:hunger 1 207 true
execute if score tree_size timber matches 208 run effect give @s minecraft:hunger 1 208 true
execute if score tree_size timber matches 209 run effect give @s minecraft:hunger 1 209 true
execute if score tree_size timber matches 210 run effect give @s minecraft:hunger 1 210 true
execute if score tree_size timber matches 211 run effect give @s minecraft:hunger 1 211 true
execute if score tree_size timber matches 212 run effect give @s minecraft:hunger 1 212 true
execute if score tree_size timber matches 213 run effect give @s minecraft:hunger 1 213 true
execute if score tree_size timber matches 214 run effect give @s minecraft:hunger 1 214 true
execute if score tree_size timber matches 215 run effect give @s minecraft:hunger 1 215 true
execute if score tree_size timber matches 216 run effect give @s minecraft:hunger 1 216 true
execute if score tree_size timber matches 217 run effect give @s minecraft:hunger 1 217 true
execute if score tree_size timber matches 218 run effect give @s minecraft:hunger 1 218 true
execute if score tree_size timber matches 219 run effect give @s minecraft:hunger 1 219 true
execute if score tree_size timber matches 220 run effect give @s minecraft:hunger 1 220 true
execute if score tree_size timber matches 221 run effect give @s minecraft:hunger 1 221 true
execute if score tree_size timber matches 222 run effect give @s minecraft:hunger 1 222 true
execute if score tree_size timber matches 223 run effect give @s minecraft:hunger 1 223 true
execute if score tree_size timber matches 224 run effect give @s minecraft:hunger 1 224 true
execute if score tree_size timber matches 225 run effect give @s minecraft:hunger 1 225 true
execute if score tree_size timber matches 226 run effect give @s minecraft:hunger 1 226 true
execute if score tree_size timber matches 227 run effect give @s minecraft:hunger 1 227 true
execute if score tree_size timber matches 228 run effect give @s minecraft:hunger 1 228 true
execute if score tree_size timber matches 229 run effect give @s minecraft:hunger 1 229 true
execute if score tree_size timber matches 230 run effect give @s minecraft:hunger 1 230 true
execute if score tree_size timber matches 231 run effect give @s minecraft:hunger 1 231 true
execute if score tree_size timber matches 232 run effect give @s minecraft:hunger 1 232 true
execute if score tree_size timber matches 233 run effect give @s minecraft:hunger 1 233 true
execute if score tree_size timber matches 234 run effect give @s minecraft:hunger 1 234 true
execute if score tree_size timber matches 235 run effect give @s minecraft:hunger 1 235 true
execute if score tree_size timber matches 236 run effect give @s minecraft:hunger 1 236 true
execute if score tree_size timber matches 237 run effect give @s minecraft:hunger 1 237 true
execute if score tree_size timber matches 238 run effect give @s minecraft:hunger 1 238 true
execute if score tree_size timber matches 239 run effect give @s minecraft:hunger 1 239 true
execute if score tree_size timber matches 240 run effect give @s minecraft:hunger 1 240 true
execute if score tree_size timber matches 241 run effect give @s minecraft:hunger 1 241 true
execute if score tree_size timber matches 242 run effect give @s minecraft:hunger 1 242 true
execute if score tree_size timber matches 243 run effect give @s minecraft:hunger 1 243 true
execute if score tree_size timber matches 244 run effect give @s minecraft:hunger 1 244 true
execute if score tree_size timber matches 245 run effect give @s minecraft:hunger 1 245 true
execute if score tree_size timber matches 246 run effect give @s minecraft:hunger 1 246 true
execute if score tree_size timber matches 247 run effect give @s minecraft:hunger 1 247 true
execute if score tree_size timber matches 248 run effect give @s minecraft:hunger 1 248 true
execute if score tree_size timber matches 249 run effect give @s minecraft:hunger 1 249 true
execute if score tree_size timber matches 250 run effect give @s minecraft:hunger 1 250 true
execute if score tree_size timber matches 251 run effect give @s minecraft:hunger 1 251 true
execute if score tree_size timber matches 252 run effect give @s minecraft:hunger 1 252 true
execute if score tree_size timber matches 253 run effect give @s minecraft:hunger 1 253 true
execute if score tree_size timber matches 254 run effect give @s minecraft:hunger 1 254 true
execute if score tree_size timber matches 255.. run effect give @s minecraft:hunger 1 255 true

View file

@ -0,0 +1,6 @@
stopsound @s block minecraft:block.grass.break
stopsound @s block minecraft:block.wood.break
stopsound @s block minecraft:block.wart_block.break
stopsound @s block minecraft:block.shroomlight.break
stopsound @s block minecraft:block.nether_wart.break
stopsound @s block minecraft:block.stem.break

View file

@ -0,0 +1,9 @@
# tp hand-broken loot into inventory
tp @e[type=minecraft:item,sort=nearest,limit=1] @s
#setblock ~ 255 ~ minecraft:yellow_shulker_box
#data modify block ~ 255 ~ Items append from entity @e[type=minecraft:item,sort=nearest,limit=1] Item
#kill @e[type=minecraft:item,sort=nearest,limit=1]
#loot give @s mine ~ 255 ~ minecraft:air{drop_contents:1b}
#setblock ~ 255 ~ minecraft:air

View file

@ -0,0 +1,49 @@
# when full inventory fix
execute if score drop_loot timber matches 1.. store result score inventory timber run data get entity @s Inventory
execute if score drop_loot timber matches 1.. if entity @s[nbt={Inventory:[{Slot:100b}]}] run scoreboard players remove inventory timber 1
execute if score drop_loot timber matches 1.. if entity @s[nbt={Inventory:[{Slot:101b}]}] run scoreboard players remove inventory timber 1
execute if score drop_loot timber matches 1.. if entity @s[nbt={Inventory:[{Slot:102b}]}] run scoreboard players remove inventory timber 1
execute if score drop_loot timber matches 1.. if entity @s[nbt={Inventory:[{Slot:103b}]}] run scoreboard players remove inventory timber 1
execute if score drop_loot timber matches 1.. if entity @s[nbt={Inventory:[{Slot:-106b}]}] run scoreboard players remove inventory timber 1
# destroy blocks
# mark blocks that need to be destroyed
tag @e[type=minecraft:marker,tag=timber_log] add timber_destroy
tag @e[type=minecraft:marker,tag=timber_leaf] add timber_destroy
tag @e[type=minecraft:marker,tag=timber_stem] add timber_destroy
tag @e[type=minecraft:marker,tag=timber_cap] add timber_destroy
# api
execute unless score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_log] run function #timber:api/break_log
execute unless score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_leaf] run function #timber:api/break_leaf
execute unless score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_stem] run function #timber:api/break_stem
execute unless score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_cap] run function #timber:api/break_cap
# loot
execute unless score slow_chop timber matches 1.. unless score drop_loot timber matches 1.. at @e[type=minecraft:marker,tag=timber_destroy] run loot spawn ~ ~ ~ mine ~ ~ ~ mainhand
execute unless score slow_chop timber matches 1.. if score drop_loot timber matches 1.. unless score inventory timber matches 36.. at @e[type=minecraft:marker,tag=timber_destroy] run loot give @s mine ~ ~ ~ mainhand
execute unless score slow_chop timber matches 1.. if score drop_loot timber matches 1.. if score inventory timber matches 36.. at @e[type=minecraft:marker,tag=timber_destroy] run loot spawn ~ ~ ~ mine ~ ~ ~ mainhand
# destroy animation
gamerule doTileDrops false
execute unless score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_destroy] run setblock ~ ~ ~ minecraft:air destroy
gamerule doTileDrops true
# remove destroy marker
execute unless score slow_chop timber matches 1.. run kill @e[type=minecraft:marker,tag=timber_destroy]
# stop sound
execute if score stopsound timber matches 1.. as @a[distance=..20,tag=!global.ignore.gui] run function timber:utils/stopsound
# save tool for slow chopping process
execute if score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop,distance=..7,sort=arbitrary,limit=1] run summon minecraft:armor_stand ~ 0 ~ {Silent:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["timber_tool"],Rotation:[45f],Pose:{RightArm:[0f,270f,0f]}}
execute if score slow_chop timber matches 1.. at @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop,distance=..7,sort=arbitrary,limit=1] run data modify entity @e[type=minecraft:armor_stand,tag=timber_tool,y=0,distance=...1,sort=arbitrary,limit=1] HandItems[0] merge from entity @s SelectedItem
execute if score slow_chop timber matches 1.. run tag @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop,distance=..7,sort=arbitrary,limit=1] add timber_slow_chop
# tp hand-broken loot into inventory
execute if score drop_loot timber matches 1.. unless score inventory timber matches 36.. at @e[type=minecraft:marker,tag=timber_tree,tag=!timber_slow_chop,distance=..7,sort=arbitrary,limit=1] run function timber:utils/tp_item
# wear out tool
execute if score wear_out timber matches 1.. unless score unbreakable timber matches 1 run function timber:tool/wear_out
# break axe if worn out
execute if score wear_out timber matches 1.. unless score unbreakable timber matches 1 run function timber:tool/worn_out
# give hunger effect
execute if score hunger timber matches 1.. run function timber:utils/hunger

View file

@ -0,0 +1,11 @@
{
"function": "minecraft:copy_custom_data",
"source": "this",
"ops": [
{
"source": "durability",
"target": "Damage",
"op": "replace"
}
]
}

View file

@ -0,0 +1,43 @@
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "#minecraft:wart_blocks"
}
}
},
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": [
"minecraft:shroomlight"
]
}
}
},
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": [
"minecraft:brown_mushroom_block"
]
}
}
},
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": [
"minecraft:red_mushroom_block"
]
}
}
}
]
}

View file

@ -0,0 +1,69 @@
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "#minecraft:leaves",
"state": {
"persistent": "false"
}
}
}
}
},
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_prsistent": {
"min": 1,
"max": 2147483647
}
}
}
]
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "#minecraft:leaves"
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_prsistent": {
"min": 1,
"max": 2147483647
}
}
}
}
]
}
}
]
}

View file

@ -0,0 +1,8 @@
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "#minecraft:logs"
}
}
}

View file

@ -0,0 +1,23 @@
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "#minecraft:logs"
}
}
},
{
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": [
"minecraft:mushroom_stem"
]
}
}
}
]
}

View file

@ -0,0 +1,11 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": "#minecraft:logs"
}
}
}
}

View file

@ -0,0 +1,49 @@
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": "#minecraft:logs"
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": [
"minecraft:mushroom_stem"
]
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": [
"minecraft:knowledge_book"
],
"components": {
"minecraft:custom_data": {
"Tags": [
"timber_location"
]
}
}
}
}
}
}
]
}

View file

@ -0,0 +1,4 @@
{
"condition": "minecraft:random_chance",
"chance": 0.25
}

View file

@ -0,0 +1,4 @@
{
"condition": "minecraft:random_chance",
"chance": 0.333
}

View file

@ -0,0 +1,4 @@
{
"condition": "minecraft:random_chance",
"chance": 0.5
}

View file

@ -0,0 +1,43 @@
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": [
"minecraft:air"
]
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:location_check",
"offsetY": -1,
"predicate": {
"block": {
"blocks": "#timber:grow"
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"nbt": "{OnGround:1b}"
}
}
}
]
}
}

View file

@ -0,0 +1,9 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"flags": {
"is_sneaking": true
}
}
}

View file

@ -0,0 +1,65 @@
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_w_axe": {
"min": 1,
"max": 2147483647
}
}
},
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_s_axe": {
"min": 1,
"max": 2147483647
}
}
},
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_i_axe": {
"min": 1,
"max": 2147483647
}
}
},
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_g_axe": {
"min": 1,
"max": 2147483647
}
}
},
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_d_axe": {
"min": 1,
"max": 2147483647
}
}
},
{
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"timber_n_axe": {
"min": 1,
"max": 2147483647
}
}
}
]
}

View file

@ -0,0 +1,8 @@
{
"values":[
"minecraft:grass_block",
"minecraft:dirt",
"minecraft:coarse_dirt",
"minecraft:podzol"
]
}

View file

@ -0,0 +1,4 @@
{
"values":[
]
}

View file

@ -0,0 +1,4 @@
{
"values":[
]
}

View file

@ -0,0 +1,4 @@
{
"values":[
]
}

View file

@ -0,0 +1,4 @@
{
"values":[
]
}

View file

@ -0,0 +1,5 @@
{
"values":[
"timber:help"
]
}

View file

@ -0,0 +1,10 @@
{
"values":[
"minecraft:wooden_axe",
"minecraft:stone_axe",
"minecraft:iron_axe",
"minecraft:golden_axe",
"minecraft:diamond_axe",
"minecraft:netherite_axe"
]
}

View file

@ -0,0 +1,38 @@
{
"display": {
"icon": {
"id": "minecraft:player_head",
"components": {
"minecraft:profile": {
"properties": [
{
"name": "textures",
"value": "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTg1YzMzNWM1MjVjZGFkY2Q4MmU4MDA4MzU1N2M2OTYzMGRmYjlhMWVkZjU5OTc0YzdmNjU4ZGI1MWEwYTFkOSJ9fX0="
}
]
}
}
},
"title": "Vanilla Tweaks",
"frame": "challenge",
"description": [
"",
{
"text": "All loaded Vanilla Tweaks data packs\n",
"color": "gold"
},
{
"text": "vanillatweaks.net",
"color": "yellow"
}
],
"background": "minecraft:textures/block/black_concrete.png",
"show_toast": false,
"announce_to_chat": false
},
"criteria": {
"tick": {
"trigger": "minecraft:tick"
}
}
}

View file

@ -0,0 +1,55 @@
{
"display": {
"icon": {
"id": "minecraft:iron_axe"
},
"title": "Timber ",
"description": [
"",
{
"text": "Trees can be instantly chopped with any axe in survival mode.\n",
"color": "gold"
},
{
"text": "Enter",
"color": "green"
},
{
"text": " ",
"color": "gold"
},
{
"text": "/trigger TimberToggle",
"color": "yellow"
},
{
"text": " to toggle the datapack on or off.\n",
"color": "gold"
},
{
"text": "Enter",
"color": "green"
},
{
"text": " ",
"color": "gold"
},
{
"text": "/function timber:help",
"color": "yellow"
},
{
"text": " for config options.",
"color": "gold"
}
],
"show_toast": false,
"announce_to_chat": false
},
"parent": "vanillatweaks:root",
"criteria": {
"tick": {
"trigger": "minecraft:tick"
}
}
}

View file

@ -0,0 +1,5 @@
{
"values": [
"timber:uninstall"
]
}