Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
Donʼt blow old creepers on first loadded tick
Browse files Browse the repository at this point in the history
  • Loading branch information
dhouck committed Aug 2, 2020
1 parent 0118a32 commit 691a15f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/danielrh/functions/acg/defuse.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ data modify entity @s ActiveEffects append value {Duration: 2147483637, Id: 27b,
# Shorten fuse by 1 tick, since we delay the actual explosion
execute store result score @s drh_acg_fuse run data get entity @s Fuse
scoreboard players remove @s drh_acg_fuse 1
execute store result entity @s Fuse byte 1 run scoreboard players get @s drh_acg_fuse

# The if clause is because on the first tick of the datapack being loaded, the
# scoreboard wonʼt exist yet. Old creepers wonʼt have shortened fuses.
execute if score @s drh_acg_fuse matches 1.. store result entity @s Fuse byte 1 run scoreboard players get @s drh_acg_fuse
scoreboard players reset @s drh_acg_fuse

tag @s add acg_defused

0 comments on commit 691a15f

Please sign in to comment.