-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modular chestplate with elytra damages elytra instead of plates
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
data/mechanization/functions/gadgets/player/modular_armor/damage_elytra.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,15 @@ | ||
|
||
#store data | ||
scoreboard players set #broken mechanization.data 0 | ||
data modify storage mechanization:temp list set from block -30000000 0 3201 Items[0].tag.mechanization.upgrades.items | ||
|
||
#add damage | ||
execute store result score #durability mechanization.data run data get storage mechanization:temp list[{id:"minecraft:elytra"}].tag.Damage | ||
execute if score #durability mechanization.data matches ..431 run scoreboard players add #durability mechanization.data 1 | ||
execute unless data storage mechanization:temp list[{id:"minecraft:elytra"}].tag{Unbreakable:1b} store result storage mechanization:temp list[{id:"minecraft:elytra"}].tag.Damage int 1 run scoreboard players get #durability mechanization.data | ||
execute if score #durability mechanization.data matches 432.. run scoreboard players set #broken mechanization.data 1 | ||
|
||
#set data | ||
data modify block -30000000 0 3201 Items[0].tag.mechanization.upgrades.items set from storage mechanization:temp list | ||
execute if score #broken mechanization.data matches 1 run playsound minecraft:entity.item.break player @s | ||
execute if score #broken mechanization.data matches 1 run data modify block -30000000 0 3201 Items[0].id set value "minecraft:leather_chestplate" |