Skip to content

Commit

Permalink
#215 TUSBメモリーのスキルを外せるバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yabane committed Apr 23, 2024
1 parent bf0b124 commit 238e4fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data/skill/functions/trigger/.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ execute if score @s ChangeSkill matches 1000..9000 in area:control_area run func
execute if score @s ChangeSkill matches 10000 anchored eyes positioned ^ ^-0.85 ^5 run function skill:shortcut/edit/show
execute if score @s ChangeSkill matches 10001 anchored eyes positioned ^ ^-0.85 ^5 run function skill:shortcut/reset
execute if score @s ChangeSkill matches 10001 run function makeup:skill/shortcut/sound
execute if score @s ChangeSkill matches 10010 run function skill:trigger/set/delete
execute if score @s ChangeSkill matches 10010 run function skill:trigger/delete/detection

#スコアリセット
scoreboard players reset @s ChangeSkill
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#> skill:trigger/set/delete
#> skill:trigger/delete/delete
#
# 手に持っているアイテムのスキル情報を削除する
#
# @within function skill:trigger/

# メインハンドのアイテム情報取得
data remove storage item: Item
data modify storage item: Item set from entity @s SelectedItem
# @within function skill:trigger/delete/detection

# Lore削除
function skill:trigger/set/remove_lore
Expand Down
9 changes: 9 additions & 0 deletions data/skill/functions/trigger/delete/detection.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @within function skill:trigger/

# メインハンドのアイテム情報取得
data remove storage item: Item
data modify storage item: Item set from entity @s SelectedItem

# TUSBメモリーかどうかで分岐
execute if data storage item: Item{tag:{Skill:{Type:"TUSBMemory"}}} run tellraw @s {"translate":"TUSBメモリーのスキルは削除できません。","color":"red"}
execute unless data storage item: Item{tag:{Skill:{Type:"TUSBMemory"}}} run function skill:trigger/delete/delete

0 comments on commit 238e4fb

Please sign in to comment.