Skip to content

Commit

Permalink
crimson settings not working fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HielkeMaps committed Apr 24, 2024
1 parent 6409b58 commit f4508e8
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ execute if score @s TreeCapitator matches 111 run function tc:config/axe_types/d
execute if score @s TreeCapitator matches 112 run function tc:config/axe_types/diamond_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 113 run function tc:config/axe_types/diamond_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 114 run function tc:config/axe_types/diamond_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 115 run function tc:config/axe_types/diamond_axe/edit/logs/nether/enable
execute if score @s TreeCapitator matches 116 run function tc:config/axe_types/diamond_axe/edit/logs/nether/disable
execute if score @s TreeCapitator matches 115 run function tc:config/axe_types/diamond_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 116 run function tc:config/axe_types/diamond_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 117 run function tc:config/axe_types/diamond_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 118 run function tc:config/axe_types/diamond_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 119 run function tc:config/axe_types/diamond_axe/edit/logs/mangrove/enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function tc:config/axe_types/diamond_axe/edit/logs/jungle/main
function tc:config/axe_types/diamond_axe/edit/logs/birch/main
function tc:config/axe_types/diamond_axe/edit/logs/mangrove/main
function tc:config/axe_types/diamond_axe/edit/logs/cherry/main
function tc:config/axe_types/diamond_axe/edit/logs/nether/main
function tc:config/axe_types/diamond_axe/edit/logs/crimson/main
function tc:config/axe_types/diamond_axe/edit/logs/warped/main
tellraw @s {"text":""}
tellraw @s {"text":""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ execute if score @s TreeCapitator matches 211 run function tc:config/axe_types/g
execute if score @s TreeCapitator matches 212 run function tc:config/axe_types/golden_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 213 run function tc:config/axe_types/golden_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 214 run function tc:config/axe_types/golden_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 215 run function tc:config/axe_types/golden_axe/edit/logs/nether/enable
execute if score @s TreeCapitator matches 216 run function tc:config/axe_types/golden_axe/edit/logs/nether/disable
execute if score @s TreeCapitator matches 215 run function tc:config/axe_types/golden_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 216 run function tc:config/axe_types/golden_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 217 run function tc:config/axe_types/golden_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 218 run function tc:config/axe_types/golden_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 219 run function tc:config/axe_types/golden_axe/edit/logs/mangrove/enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function tc:config/axe_types/golden_axe/edit/logs/jungle/main
function tc:config/axe_types/golden_axe/edit/logs/birch/main
function tc:config/axe_types/golden_axe/edit/logs/mangrove/main
function tc:config/axe_types/golden_axe/edit/logs/cherry/main
function tc:config/axe_types/golden_axe/edit/logs/nether/main
function tc:config/axe_types/golden_axe/edit/logs/crimson/main
function tc:config/axe_types/golden_axe/edit/logs/warped/main
tellraw @s {"text":""}
tellraw @s {"text":""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ execute if score @s TreeCapitator matches 311 run function tc:config/axe_types/i
execute if score @s TreeCapitator matches 312 run function tc:config/axe_types/iron_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 313 run function tc:config/axe_types/iron_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 314 run function tc:config/axe_types/iron_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 315 run function tc:config/axe_types/iron_axe/edit/logs/nether/enable
execute if score @s TreeCapitator matches 316 run function tc:config/axe_types/iron_axe/edit/logs/nether/disable
execute if score @s TreeCapitator matches 315 run function tc:config/axe_types/iron_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 316 run function tc:config/axe_types/iron_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 317 run function tc:config/axe_types/iron_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 318 run function tc:config/axe_types/iron_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 319 run function tc:config/axe_types/iron_axe/edit/logs/mangrove/enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function tc:config/axe_types/iron_axe/edit/logs/jungle/main
function tc:config/axe_types/iron_axe/edit/logs/birch/main
function tc:config/axe_types/iron_axe/edit/logs/mangrove/main
function tc:config/axe_types/iron_axe/edit/logs/cherry/main
function tc:config/axe_types/iron_axe/edit/logs/nether/main
function tc:config/axe_types/iron_axe/edit/logs/crimson/main
function tc:config/axe_types/iron_axe/edit/logs/warped/main
tellraw @s {"text":""}
tellraw @s {"text":""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ execute if score @s TreeCapitator matches 1311 run function tc:config/axe_types/
execute if score @s TreeCapitator matches 1312 run function tc:config/axe_types/netherite_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 1313 run function tc:config/axe_types/netherite_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 1314 run function tc:config/axe_types/netherite_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 1315 run function tc:config/axe_types/netherite_axe/edit/logs/nether/enable
execute if score @s TreeCapitator matches 1316 run function tc:config/axe_types/netherite_axe/edit/logs/nether/disable
execute if score @s TreeCapitator matches 1315 run function tc:config/axe_types/netherite_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 1316 run function tc:config/axe_types/netherite_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 1317 run function tc:config/axe_types/netherite_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 1318 run function tc:config/axe_types/netherite_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 1319 run function tc:config/axe_types/netherite_axe/edit/logs/mangrove/enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function tc:config/axe_types/netherite_axe/edit/logs/jungle/main
function tc:config/axe_types/netherite_axe/edit/logs/birch/main
function tc:config/axe_types/netherite_axe/edit/logs/mangrove/main
function tc:config/axe_types/netherite_axe/edit/logs/cherry/main
function tc:config/axe_types/netherite_axe/edit/logs/nether/main
function tc:config/axe_types/netherite_axe/edit/logs/crimson/main
function tc:config/axe_types/netherite_axe/edit/logs/warped/main
tellraw @s {"text":""}
tellraw @s {"text":""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ execute if score @s TreeCapitator matches 411 run function tc:config/axe_types/s
execute if score @s TreeCapitator matches 412 run function tc:config/axe_types/stone_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 413 run function tc:config/axe_types/stone_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 414 run function tc:config/axe_types/stone_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 415 run function tc:config/axe_types/stone_axe/edit/logs/nether/enable
execute if score @s TreeCapitator matches 416 run function tc:config/axe_types/stone_axe/edit/logs/nether/disable
execute if score @s TreeCapitator matches 415 run function tc:config/axe_types/stone_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 416 run function tc:config/axe_types/stone_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 417 run function tc:config/axe_types/stone_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 418 run function tc:config/axe_types/stone_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 419 run function tc:config/axe_types/stone_axe/edit/logs/mangrove/enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function tc:config/axe_types/stone_axe/edit/logs/jungle/main
function tc:config/axe_types/stone_axe/edit/logs/birch/main
function tc:config/axe_types/stone_axe/edit/logs/mangrove/main
function tc:config/axe_types/stone_axe/edit/logs/cherry/main
function tc:config/axe_types/stone_axe/edit/logs/nether/main
function tc:config/axe_types/stone_axe/edit/logs/crimson/main
function tc:config/axe_types/stone_axe/edit/logs/warped/main
tellraw @s {"text":""}
tellraw @s {"text":""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ execute if score @s TreeCapitator matches 511 run function tc:config/axe_types/w
execute if score @s TreeCapitator matches 512 run function tc:config/axe_types/wooden_axe/edit/logs/jungle/disable
execute if score @s TreeCapitator matches 513 run function tc:config/axe_types/wooden_axe/edit/logs/birch/enable
execute if score @s TreeCapitator matches 514 run function tc:config/axe_types/wooden_axe/edit/logs/birch/disable
execute if score @s TreeCapitator matches 515 run function tc:config/axe_types/wooden_axe/edit/logs/nether/enable
execute if score @s TreeCapitator matches 516 run function tc:config/axe_types/wooden_axe/edit/logs/nether/disable
execute if score @s TreeCapitator matches 515 run function tc:config/axe_types/wooden_axe/edit/logs/crimson/enable
execute if score @s TreeCapitator matches 516 run function tc:config/axe_types/wooden_axe/edit/logs/crimson/disable
execute if score @s TreeCapitator matches 517 run function tc:config/axe_types/wooden_axe/edit/logs/warped/enable
execute if score @s TreeCapitator matches 518 run function tc:config/axe_types/wooden_axe/edit/logs/warped/disable
execute if score @s TreeCapitator matches 519 run function tc:config/axe_types/wooden_axe/edit/logs/mangrove/enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function tc:config/axe_types/wooden_axe/edit/logs/jungle/main
function tc:config/axe_types/wooden_axe/edit/logs/birch/main
function tc:config/axe_types/wooden_axe/edit/logs/mangrove/main
function tc:config/axe_types/wooden_axe/edit/logs/cherry/main
function tc:config/axe_types/wooden_axe/edit/logs/nether/main
function tc:config/axe_types/wooden_axe/edit/logs/crimson/main
function tc:config/axe_types/wooden_axe/edit/logs/warped/main
tellraw @s {"text":""}
tellraw @s {"text":""}
Expand Down
18 changes: 9 additions & 9 deletions TreeCapitator/data/tc/functions/player/set_durability.mcfunction
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#if setting disabled, just break the tree
#If setting disabled, just break the tree
execute if score tc.take_durability tc.value matches 0 run return run function tc:tree/break

#if axe broke, there obviously isn't enough to cut the tree
#If axe broke, there obviously isn't enough to cut the tree
execute unless data entity @s SelectedItem.components.minecraft:damage run return fail

#get how much damage item already took
#Get how much damage item already took
execute store result score tc.current_damage tc.value run data get entity @s SelectedItem.components.minecraft:damage
#tellraw @a ["",{"text":"Item damage: "},{"score":{"name":"tc.current_damage","objective":"tc.value"}}]

#calculate how much it will take from logs
#Calculate how much it will take from logs
#tellraw @a ["",{"text":"Logs: "},{"score":{"name":"tc.damage","objective":"tc.value"}}]

#take unbreaking into account
#Take unbreaking into account
execute if predicate tc:unbreaking/1 run scoreboard players operation tc.damage tc.value /= 2 tc.value
execute if predicate tc:unbreaking/2 run scoreboard players operation tc.damage tc.value /= 3 tc.value
execute if predicate tc:unbreaking/3 run scoreboard players operation tc.damage tc.value /= 4 tc.value

#tellraw @a ["",{"text":"Damage to take: "},{"score":{"name":"tc.damage","objective":"tc.value"}}]

#add current damage on axe
#Add current damage on axe
scoreboard players operation tc.resulting_damage tc.value = tc.damage tc.value
scoreboard players operation tc.resulting_damage tc.value += tc.current_damage tc.value

#tellraw @a ["",{"text":"Resulting item damage: "},{"score":{"name":"tc.resulting_damage","objective":"tc.value"}}]

#check axe and set damage limit
#Check axe and set damage limit
execute if entity @s[nbt={SelectedItem:{id:"minecraft:netherite_axe"}}] run scoreboard players set tc.max_damage tc.value 2031
execute if entity @s[nbt={SelectedItem:{id:"minecraft:diamond_axe"}}] run scoreboard players set tc.max_damage tc.value 1561
execute if entity @s[nbt={SelectedItem:{id:"minecraft:iron_axe"}}] run scoreboard players set tc.max_damage tc.value 250
Expand All @@ -43,8 +43,8 @@ scoreboard players operation tc.damage_percentage tc.value /= tc.max_damage tc.v

#tellraw @a ["",{"text":"Damage percentage: "},{"score":{"name":"tc.damage_percentage","objective":"tc.value"}}]

#edit item damage
#Edit item damage
execute if score tc.damage tc.value matches 1.. run item modify entity @s weapon.mainhand tc:edit_durability

#break tree
#Break tree
function tc:tree/break

0 comments on commit f4508e8

Please sign in to comment.