Skip to content

Commit

Permalink
Github yay!
Browse files Browse the repository at this point in the history
  • Loading branch information
HielkeMaps committed Feb 25, 2024
1 parent 42d5be7 commit d48b1f9
Show file tree
Hide file tree
Showing 343 changed files with 2,318 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# TreeCapitator
TreeCapitator Data Pack for Minecraft

**Build for development:**

(be sure to have npm installed)

1. Open a terminal in this repository.
2. First of all, make sure to run `npm i` to install dependencies.
3. Edit `watch-changes.js`. Change `datapacksFolder` variable to your world's datapack folder.
4. Finally, run `npm start` to sync repository files to your Minecraft world. Any changes made will automatically be updated :D
1 change: 1 addition & 0 deletions TreeCapitator/data/minecraft/tags/functions/load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"values":["treecapitator:install"]}
1 change: 1 addition & 0 deletions TreeCapitator/data/minecraft/tags/functions/tick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"values":["treecapitator:z_tick"]}
113 changes: 113 additions & 0 deletions TreeCapitator/data/treecapitator/functions/install.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
scoreboard objectives add tc.break_oak minecraft.mined:minecraft.oak_log
scoreboard objectives add tc.break_d_oak minecraft.mined:minecraft.dark_oak_log
scoreboard objectives add tc.break_acacia minecraft.mined:minecraft.acacia_log
scoreboard objectives add tc.break_spruce minecraft.mined:minecraft.spruce_log
scoreboard objectives add tc.break_jungle minecraft.mined:minecraft.jungle_log
scoreboard objectives add tc.break_birch minecraft.mined:minecraft.birch_log
scoreboard objectives add tc.break_crimson minecraft.mined:minecraft.crimson_stem
scoreboard objectives add tc.break_warped minecraft.mined:minecraft.warped_stem
scoreboard objectives add tc.break_mangrove minecraft.mined:minecraft.mangrove_log
scoreboard objectives add tc.break_cherry minecraft.mined:minecraft.cherry_log

scoreboard objectives add tc.use_wood minecraft.used:minecraft.wooden_axe
scoreboard objectives add tc.use_stone minecraft.used:minecraft.stone_axe
scoreboard objectives add tc.use_iron minecraft.used:minecraft.iron_axe
scoreboard objectives add tc.use_gold minecraft.used:minecraft.golden_axe
scoreboard objectives add tc.use_diamond minecraft.used:minecraft.diamond_axe
scoreboard objectives add tc.use_netherite minecraft.used:minecraft.netherite_axe

scoreboard objectives add tc.sneak minecraft.custom:minecraft.sneak_time

scoreboard objectives add tc.disabled dummy
scoreboard objectives add tc.temp dummy
scoreboard objectives add tc.value dummy
scoreboard objectives add tc.valid dummy
scoreboard objectives add tc.damage dummy

scoreboard players set 2 tc.value 2
scoreboard players set 3 tc.value 3
scoreboard players set 4 tc.value 4

execute unless score netherite_axe tc.value = netherite_axe tc.value run scoreboard players set netherite_axe tc.value 1
execute unless score diamond_axe tc.value = diamond_axe tc.value run scoreboard players set diamond_axe tc.value 1
execute unless score golden_axe tc.value = golden_axe tc.value run scoreboard players set golden_axe tc.value 1
execute unless score iron_axe tc.value = iron_axe tc.value run scoreboard players set iron_axe tc.value 1
execute unless score stone_axe tc.value = stone_axe tc.value run scoreboard players set stone_axe tc.value 1
execute unless score wooden_axe tc.value = wooden_axe tc.value run scoreboard players set wooden_axe tc.value 1
execute unless score sneaking_enabled tc.value = sneaking_enabled tc.value run scoreboard players set sneaking_enabled tc.value 0
execute unless score standing_enabled tc.value = standing_enabled tc.value run scoreboard players set standing_enabled tc.value 1
execute unless score take_durability tc.value = take_durability tc.value run scoreboard players set take_durability tc.value 1
execute unless score break_leaves tc.value = break_leaves tc.value run scoreboard players set break_leaves tc.value 1
execute unless score silent_leaves tc.value = silent_leaves tc.value run scoreboard players set silent_leaves tc.value 1
execute unless score lock_options tc.value = lock_options tc.value run scoreboard players set lock_options tc.value 0

execute unless score diamond_axe tc.break_oak = diamond_axe tc.break_oak run scoreboard players set diamond_axe tc.break_oak 1
execute unless score diamond_axe tc.break_cherry = diamond_axe tc.break_cherry run scoreboard players set diamond_axe tc.break_cherry 1
execute unless score diamond_axe tc.break_d_oak = diamond_axe tc.break_d_oak run scoreboard players set diamond_axe tc.break_d_oak 1
execute unless score diamond_axe tc.break_acacia = diamond_axe tc.break_acacia run scoreboard players set diamond_axe tc.break_acacia 1
execute unless score diamond_axe tc.break_jungle = diamond_axe tc.break_jungle run scoreboard players set diamond_axe tc.break_jungle 1
execute unless score diamond_axe tc.break_birch = diamond_axe tc.break_birch run scoreboard players set diamond_axe tc.break_birch 1
execute unless score diamond_axe tc.break_spruce = diamond_axe tc.break_spruce run scoreboard players set diamond_axe tc.break_spruce 1
execute unless score diamond_axe tc.break_crimson = diamond_axe tc.break_crimson run scoreboard players set diamond_axe tc.break_crimson 0
execute unless score diamond_axe tc.break_warped = diamond_axe tc.break_warped run scoreboard players set diamond_axe tc.break_warped 0
execute unless score diamond_axe tc.break_mangrove = diamond_axe tc.break_mangrove run scoreboard players set diamond_axe tc.break_mangrove 1

execute unless score netherite_axe tc.break_oak = netherite_axe tc.break_oak run scoreboard players set netherite_axe tc.break_oak 1
execute unless score netherite_axe tc.break_cherry = netherite_axe tc.break_cherry run scoreboard players set netherite_axe tc.break_cherry 1
execute unless score netherite_axe tc.break_d_oak = netherite_axe tc.break_d_oak run scoreboard players set netherite_axe tc.break_d_oak 1
execute unless score netherite_axe tc.break_acacia = netherite_axe tc.break_acacia run scoreboard players set netherite_axe tc.break_acacia 1
execute unless score netherite_axe tc.break_jungle = netherite_axe tc.break_jungle run scoreboard players set netherite_axe tc.break_jungle 1
execute unless score netherite_axe tc.break_birch = netherite_axe tc.break_birch run scoreboard players set netherite_axe tc.break_birch 1
execute unless score netherite_axe tc.break_spruce = netherite_axe tc.break_spruce run scoreboard players set netherite_axe tc.break_spruce 1
execute unless score netherite_axe tc.break_crimson = netherite_axe tc.break_crimson run scoreboard players set netherite_axe tc.break_crimson 0
execute unless score netherite_axe tc.break_warped = netherite_axe tc.break_warped run scoreboard players set netherite_axe tc.break_warped 0
execute unless score netherite_axe tc.break_mangrove = netherite_axe tc.break_mangrove run scoreboard players set netherite_axe tc.break_mangrove 1

execute unless score iron_axe tc.break_oak = iron_axe tc.break_oak run scoreboard players set iron_axe tc.break_oak 1
execute unless score iron_axe tc.break_cherry = iron_axe tc.break_cherry run scoreboard players set iron_axe tc.break_cherry 1
execute unless score iron_axe tc.break_d_oak = iron_axe tc.break_d_oak run scoreboard players set iron_axe tc.break_d_oak 1
execute unless score iron_axe tc.break_acacia = iron_axe tc.break_acacia run scoreboard players set iron_axe tc.break_acacia 1
execute unless score iron_axe tc.break_jungle = iron_axe tc.break_jungle run scoreboard players set iron_axe tc.break_jungle 1
execute unless score iron_axe tc.break_birch = iron_axe tc.break_birch run scoreboard players set iron_axe tc.break_birch 1
execute unless score iron_axe tc.break_spruce = iron_axe tc.break_spruce run scoreboard players set iron_axe tc.break_spruce 1
execute unless score iron_axe tc.break_crimson = iron_axe tc.break_crimson run scoreboard players set iron_axe tc.break_crimson 1
execute unless score iron_axe tc.break_warped = iron_axe tc.break_warped run scoreboard players set iron_axe tc.break_warped 1
execute unless score iron_axe tc.break_mangrove = iron_axe tc.break_mangrove run scoreboard players set iron_axe tc.break_mangrove 1

execute unless score golden_axe tc.break_oak = golden_axe tc.break_oak run scoreboard players set golden_axe tc.break_oak 1
execute unless score golden_axe tc.break_cherry = golden_axe tc.break_oak run scoreboard players set golden_axe tc.break_cherry 1
execute unless score golden_axe tc.break_d_oak = golden_axe tc.break_d_oak run scoreboard players set golden_axe tc.break_d_oak 1
execute unless score golden_axe tc.break_acacia = golden_axe tc.break_acacia run scoreboard players set golden_axe tc.break_acacia 1
execute unless score golden_axe tc.break_jungle = golden_axe tc.break_jungle run scoreboard players set golden_axe tc.break_jungle 1
execute unless score golden_axe tc.break_birch = golden_axe tc.break_birch run scoreboard players set golden_axe tc.break_birch 1
execute unless score golden_axe tc.break_spruce = golden_axe tc.break_spruce run scoreboard players set golden_axe tc.break_spruce 1
execute unless score golden_axe tc.break_crimson = golden_axe tc.break_crimson run scoreboard players set golden_axe tc.break_crimson 0
execute unless score golden_axe tc.break_warped = golden_axe tc.break_warped run scoreboard players set golden_axe tc.break_warped 0
execute unless score golden_axe tc.break_mangrove = golden_axe tc.break_mangrove run scoreboard players set golden_axe tc.break_mangrove 1

execute unless score stone_axe tc.break_oak = stone_axe tc.break_oak run scoreboard players set stone_axe tc.break_oak 1
execute unless score stone_axe tc.break_cherry = stone_axe tc.break_cherry run scoreboard players set stone_axe tc.break_cherry 1
execute unless score stone_axe tc.break_d_oak = stone_axe tc.break_d_oak run scoreboard players set stone_axe tc.break_d_oak 1
execute unless score stone_axe tc.break_acacia = stone_axe tc.break_acacia run scoreboard players set stone_axe tc.break_acacia 1
execute unless score stone_axe tc.break_jungle = stone_axe tc.break_jungle run scoreboard players set stone_axe tc.break_jungle 1
execute unless score stone_axe tc.break_birch = stone_axe tc.break_birch run scoreboard players set stone_axe tc.break_birch 1
execute unless score stone_axe tc.break_spruce = stone_axe tc.break_spruce run scoreboard players set stone_axe tc.break_spruce 1
execute unless score stone_axe tc.break_crimson = stone_axe tc.break_crimson run scoreboard players set stone_axe tc.break_crimson 0
execute unless score stone_axe tc.break_warped = stone_axe tc.break_warped run scoreboard players set stone_axe tc.break_warped 0
execute unless score stone_axe tc.break_mangrove = stone_axe tc.break_mangrove run scoreboard players set stone_axe tc.break_mangrove 0


execute unless score wooden_axe tc.break_oak = wooden_axe tc.break_oak run scoreboard players set wooden_axe tc.break_oak 1
execute unless score wooden_axe tc.break_cherry = wooden_axe tc.break_cherry run scoreboard players set wooden_axe tc.break_cherry 1
execute unless score wooden_axe tc.break_d_oak = wooden_axe tc.break_d_oak run scoreboard players set wooden_axe tc.break_d_oak 1
execute unless score wooden_axe tc.break_acacia = wooden_axe tc.break_acacia run scoreboard players set wooden_axe tc.break_acacia 1
execute unless score wooden_axe tc.break_jungle = wooden_axe tc.break_jungle run scoreboard players set wooden_axe tc.break_jungle 1
execute unless score wooden_axe tc.break_birch = wooden_axe tc.break_birch run scoreboard players set wooden_axe tc.break_birch 1
execute unless score wooden_axe tc.break_spruce = wooden_axe tc.break_spruce run scoreboard players set wooden_axe tc.break_spruce 1
execute unless score wooden_axe tc.break_crimson = wooden_axe tc.break_crimson run scoreboard players set wooden_axe tc.break_crimson 0
execute unless score wooden_axe tc.break_warped = wooden_axe tc.break_warped run scoreboard players set wooden_axe tc.break_warped 0
execute unless score wooden_axe tc.break_mangrove = wooden_axe tc.break_mangrove run scoreboard players set wooden_axe tc.break_mangrove 1

scoreboard objectives add TreeCapitator trigger

tellraw @a [{"text":"[Datapack]"},{"text":" TreeCapitator v2.8 has been enabled","color":"green"}]
8 changes: 8 additions & 0 deletions TreeCapitator/data/treecapitator/functions/options.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tellraw @s [{"text":" ","strikethrough":true},{"text":" TreeCapitator Settings ","color":"gold","strikethrough":false,"bold":true},{"text":" ","strikethrough":true}]
tellraw @s {"text":""}
execute if score @s tc.disabled matches 0 run function treecapitator:z_options/if_enabled
execute if score @s tc.disabled matches 1 run function treecapitator:z_options/if_disabled
function treecapitator:z_options/treecapitator/main
function treecapitator:z_options/lock/main
tellraw @s {"text":" ","strikethrough":true}
scoreboard players reset @s TC_Options
30 changes: 30 additions & 0 deletions TreeCapitator/data/treecapitator/functions/uninstall.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
scoreboard objectives remove tc.disabled

scoreboard objectives remove tc.break_oak
scoreboard objectives remove tc.break_d_oak
scoreboard objectives remove tc.break_acacia
scoreboard objectives remove tc.break_spruce
scoreboard objectives remove tc.break_jungle
scoreboard objectives remove tc.break_birch
scoreboard objectives remove tc.break_crimson
scoreboard objectives remove tc.break_warped
scoreboard objectives remove tc.break_mangrove
scoreboard objectives remove tc.break_cherry

scoreboard objectives remove tc.use_wood
scoreboard objectives remove tc.use_stone
scoreboard objectives remove tc.use_iron
scoreboard objectives remove tc.use_gold
scoreboard objectives remove tc.use_diamond
scoreboard objectives remove tc.use_netherite

scoreboard objectives remove tc.sneak

scoreboard objectives remove tc.temp
scoreboard objectives remove tc.value
scoreboard objectives remove tc.valid
scoreboard objectives remove tc.damage

scoreboard objectives remove TreeCapitator

tellraw @a [{"text":"[Datapack]"},{"text":" TreeCapitator v2.8 has been uninstalled","color":"green"}]
3 changes: 3 additions & 0 deletions TreeCapitator/data/treecapitator/functions/unlock.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set lock_options tc.value 0
playsound minecraft:entity.player.levelup master @s ~ ~ ~ 0.2 0.1
tellraw @s [{"text":"[TreeCapitator]"},{"text":" Settings unlocked! ","color":"green"}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
execute if score @s TreeCapitator matches 100 run function treecapitator:z_options/axe_types/diamond_axe/enable
execute if score @s TreeCapitator matches 101 run function treecapitator:z_options/axe_types/diamond_axe/disable
execute if score @s TreeCapitator matches 102 run function treecapitator:z_options/axe_types/diamond_axe/edit/view
execute if score @s TreeCapitator matches 103 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/oak/enable
execute if score @s TreeCapitator matches 104 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/oak/disable
execute if score @s TreeCapitator matches 105 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/spruce/enable
execute if score @s TreeCapitator matches 106 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/spruce/disable
execute if score @s TreeCapitator matches 107 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/dark_oak/enable
execute if score @s TreeCapitator matches 108 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/dark_oak/disable
execute if score @s TreeCapitator matches 109 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/acacia/enable
execute if score @s TreeCapitator matches 110 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/acacia/disable
execute if score @s TreeCapitator matches 111 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/jungle/enable
execute if score @s TreeCapitator matches 112 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 113 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 114 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 115 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 116 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 117 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 118 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 119 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/mangrove/enable
execute if score @s TreeCapitator matches 120 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/mangrove/disable
execute if score @s TreeCapitator matches 121 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/cherry/enable
execute if score @s TreeCapitator matches 122 run function treecapitator:z_options/axe_types/diamond_axe/edit/logs/cherry/disable
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.value 0
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 0.5
function treecapitator:options
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.break_acacia 0
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 0.5
function treecapitator:z_options/axe_types/diamond_axe/edit/view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.break_acacia 1
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 2
function treecapitator:z_options/axe_types/diamond_axe/edit/view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute if score diamond_axe tc.break_acacia matches 0 run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/trigger TreeCapitator set 109"}},{"text":" Acacia","hoverEvent":{"action":"show_text","value":"Whether acacia trees can be cut with diamond axe"}}]
execute if score diamond_axe tc.break_acacia matches 1 run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/trigger TreeCapitator set 110"}},{"text":" Acacia","hoverEvent":{"action":"show_text","value":"Whether acacia trees can be cut with diamond axe"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.break_birch 0
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 0.5
function treecapitator:z_options/axe_types/diamond_axe/edit/view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.break_birch 1
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 2
function treecapitator:z_options/axe_types/diamond_axe/edit/view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute if score diamond_axe tc.break_birch matches 0 run tellraw @s ["",{"text":"[ ❌ ]","color":"red","clickEvent":{"action":"run_command","value":"/trigger TreeCapitator set 113"}},{"text":" Birch","hoverEvent":{"action":"show_text","value":"Whether birch trees can be cut with diamond axe"}}]
execute if score diamond_axe tc.break_birch matches 1 run tellraw @s ["",{"text":"[ ✔ ]","color":"green","clickEvent":{"action":"run_command","value":"/trigger TreeCapitator set 114"}},{"text":" Birch","hoverEvent":{"action":"show_text","value":"Whether birch trees can be cut with diamond axe"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.break_cherry 0
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 0.5
function treecapitator:z_options/axe_types/diamond_axe/edit/view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard players set diamond_axe tc.break_cherry 1
playsound minecraft:block.note_block.hat master @s ~ ~ ~ 0.1 2
function treecapitator:z_options/axe_types/diamond_axe/edit/view
Loading

0 comments on commit d48b1f9

Please sign in to comment.