Skip to content

Commit

Permalink
Add scaling host function
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Nov 22, 2024
1 parent c4b46dd commit b02bf53
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data/lt/donation_trigger/scale/scale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

[
{
"predicate": {
"amount": {
"min": 1
}
},
"action": {
"type": "run_function",
"function": "lt:donation_effects/scale/run"
}
}
]
3 changes: 3 additions & 0 deletions data/lt/function/donation_effects/scale/run.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute if score Enable events.hosts matches 1.. run scoreboard players add Scale events.hosts 1
execute if score Enable events.hosts matches 2.. run scoreboard players remove Scale events.hosts 1
function lt:donation_effects/scale/set
3 changes: 3 additions & 0 deletions data/lt/function/donation_effects/scale/set.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute store result storage lt:hosts scale double 0.1 run scoreboard players get Scale events.hosts
execute as @a[role=host] run function lt:donation_effects/scale/set2 with storage lt:hosts
execute as @a[tag=fake_host] run function lt:donation_effects/scale/set2 with storage lt:hosts
1 change: 1 addition & 0 deletions data/lt/function/donation_effects/scale/set2.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$attribute @ minecraft:scale base set $(scale)

0 comments on commit b02bf53

Please sign in to comment.