-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #2: Orb of servitude exploit.
- Loading branch information
1 parent
9fa93bb
commit 1fc1091
Showing
2 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
datapacks/Chosen/data/praise/functions/accept_sacrifice.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Show particles | ||
|
||
execute at @e[tag=Main] run particle happy_villager ~ ~-0.2 ~ 0.2 0.75 0.2 0 5 | ||
execute at @e[tag=Main] run particle smoke ~ ~-0.2 ~ 0.4 0.5 0.4 0 10 | ||
|
||
# Reduce the number of sacrifices remaining | ||
scoreboard players operation @e[tag=CurrentTeam] Sacrifice -= @s Sacrifice | ||
execute if entity @e[tag=CurrentTeam,scores={Sacrifice=0..}] run kill @s | ||
|
||
# Manage remaining items on altar | ||
scoreboard players operation @s Sacrifice = @e[tag=CurrentTeam] Sacrifice | ||
scoreboard players operation @s Sacrifice *= -1 Const | ||
|
||
execute store result entity @s Item.Count byte 1 run scoreboard players get @s Sacrifice | ||
|
||
execute if entity @e[tag=CurrentTeam,scores={Sacrifice=..0}] run summon minecraft:item ~ ~2 ~ {"Item":{"id":"minecraft:ender_pearl","Count":1b,tag:{display:{Name:"{\"text\":\"Orb of Servitude\",\"color\":\"blue\"}",Lore:["A token of recognition"]}}}} | ||
execute if entity @e[tag=CurrentTeam,scores={Sacrifice=..0}] run title @a[tag=OnTeam] title [{"text":"The Gods are pleased"}] | ||
execute if entity @e[tag=CurrentTeam,scores={Sacrifice=..0}] run title @a[tag=OnTeam] subtitle [{"text":"... for now"}] | ||
execute if entity @e[tag=CurrentTeam,scores={Sacrifice=..0}] run title @a[tag=OnTeam] actionbar [{"text":""}] | ||
execute if entity @e[tag=CurrentTeam,scores={Sacrifice=..0}] run tellraw @a [{"text":"The Gods have accepted the sacrifices of "},{"selector":"@e[tag=CurrentTeam]"},{"text":"."}] | ||
|
||
scoreboard players reset @e[scores={Sacrifice=..0}] Sacrifice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters