-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d68c492
commit 1da80df
Showing
63 changed files
with
855 additions
and
4 deletions.
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
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
13 changes: 13 additions & 0 deletions
13
...ing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/.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,13 @@ | ||
#> asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/*sneak*/ | ||
|
||
execute if data storage asset:artifact TargetItem{Slot:"mainhand"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Mainhand | ||
execute if data storage asset:artifact TargetItem{Slot:"offhand"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Offhand | ||
execute if data storage asset:artifact TargetItem{Slot:"feet"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Feet | ||
execute if data storage asset:artifact TargetItem{Slot:"legs"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Legs | ||
execute if data storage asset:artifact TargetItem{Slot:"chest"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Chest | ||
execute if data storage asset:artifact TargetItem{Slot:"head"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Head | ||
execute if data storage asset:artifact TargetItem{Slot:"hotbar"} store result storage asset:context SneakTime int 1 run function asset_manager:artifact/triggers/event/sneak/get_sneak_time/hotbar.m with storage asset:artifact TargetItem |
8 changes: 8 additions & 0 deletions
8
.../asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/hotbar.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/event/sneak/get_sneak_time/hotbar.m | ||
# | ||
# | ||
# | ||
# @input args InvSlot : int | ||
# @within function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
|
||
$return run scoreboard players get @s Sneak.Hotbar$(InvSlot) |
23 changes: 23 additions & 0 deletions
23
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset.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,23 @@ | ||
#> asset_manager:artifact/triggers/event/sneak/reset | ||
# | ||
# | ||
# | ||
# @within function | ||
# core:tick/player/post | ||
# asset_manager:artifact/triggers/ | ||
|
||
scoreboard players reset @s Sneak.Mainhand | ||
scoreboard players reset @s Sneak.Offhand | ||
scoreboard players reset @s Sneak.Head | ||
scoreboard players reset @s Sneak.Chest | ||
scoreboard players reset @s Sneak.Legs | ||
scoreboard players reset @s Sneak.Feet | ||
scoreboard players reset @s Sneak.Hotbar0 | ||
scoreboard players reset @s Sneak.Hotbar1 | ||
scoreboard players reset @s Sneak.Hotbar2 | ||
scoreboard players reset @s Sneak.Hotbar3 | ||
scoreboard players reset @s Sneak.Hotbar4 | ||
scoreboard players reset @s Sneak.Hotbar5 | ||
scoreboard players reset @s Sneak.Hotbar6 | ||
scoreboard players reset @s Sneak.Hotbar7 | ||
scoreboard players reset @s Sneak.Hotbar8 |
21 changes: 21 additions & 0 deletions
21
...a/asset_manager/functions/artifact/triggers/event/sneak/reset_when_change_item.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,21 @@ | ||
#> asset_manager:artifact/triggers/event/sneak/reset_when_change_item | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
execute if data storage asset:artifact EquipmentChanges[00]._{_:false} run scoreboard players set @s Sneak.Mainhand 1 | ||
execute if data storage asset:artifact EquipmentChanges[01]._{_:false} run scoreboard players set @s Sneak.Offhand 1 | ||
execute if data storage asset:artifact EquipmentChanges[02]._{_:false} run scoreboard players set @s Sneak.Head 1 | ||
execute if data storage asset:artifact EquipmentChanges[03]._{_:false} run scoreboard players set @s Sneak.Chest 1 | ||
execute if data storage asset:artifact EquipmentChanges[04]._{_:false} run scoreboard players set @s Sneak.Legs 1 | ||
execute if data storage asset:artifact EquipmentChanges[05]._{_:false} run scoreboard players set @s Sneak.Feet 1 | ||
execute if data storage asset:artifact EquipmentChanges[06]._{_:false} run scoreboard players set @s Sneak.Hotbar0 1 | ||
execute if data storage asset:artifact EquipmentChanges[07]._{_:false} run scoreboard players set @s Sneak.Hotbar1 1 | ||
execute if data storage asset:artifact EquipmentChanges[08]._{_:false} run scoreboard players set @s Sneak.Hotbar2 1 | ||
execute if data storage asset:artifact EquipmentChanges[09]._{_:false} run scoreboard players set @s Sneak.Hotbar3 1 | ||
execute if data storage asset:artifact EquipmentChanges[10]._{_:false} run scoreboard players set @s Sneak.Hotbar4 1 | ||
execute if data storage asset:artifact EquipmentChanges[11]._{_:false} run scoreboard players set @s Sneak.Hotbar5 1 | ||
execute if data storage asset:artifact EquipmentChanges[12]._{_:false} run scoreboard players set @s Sneak.Hotbar6 1 | ||
execute if data storage asset:artifact EquipmentChanges[13]._{_:false} run scoreboard players set @s Sneak.Hotbar7 1 | ||
execute if data storage asset:artifact EquipmentChanges[14]._{_:false} run scoreboard players set @s Sneak.Hotbar8 1 |
21 changes: 21 additions & 0 deletions
21
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/.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,21 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak/ | ||
# | ||
# 各神器処理へデータ受け渡し | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
# フラグが存在しているか確認する | ||
execute if entity @s[tag=!TriggerFlag.Sneak] run return fail | ||
# スニークしている時間を取得する | ||
function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
execute store result score $SneakTime Temporary run data get storage asset:context SneakTime | ||
# 使用条件を満たしているか確認する | ||
execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/check/ | ||
execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/triggers/keep_sneak/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak/use | ||
|
||
# リセット | ||
scoreboard players reset $SneakTime Temporary | ||
tag @s remove CanUsed | ||
data remove storage asset:context SneakTime |
8 changes: 8 additions & 0 deletions
8
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/check.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak/ | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak/check |
8 changes: 8 additions & 0 deletions
8
...lessing/data/asset_manager/functions/artifact/triggers/keep_sneak/keep_sneak.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak/keep_sneak.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak/use | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak/ |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/use.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,19 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/keep_sneak/ | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/keep_sneak/keep_sneak.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
21 changes: 21 additions & 0 deletions
21
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/.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,21 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_10s/ | ||
# | ||
# 各神器処理へデータ受け渡し | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
# フラグが存在しているか確認する | ||
execute if entity @s[tag=!TriggerFlag.Sneak] run return fail | ||
# スニークしている時間を取得する | ||
function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
execute store result score $SneakTime Temporary run data get storage asset:context SneakTime | ||
# 使用条件を満たしているか確認する | ||
execute if score $SneakTime Temporary matches 200.. run function asset_manager:artifact/check/ | ||
execute if score $SneakTime Temporary matches 200.. run function asset_manager:artifact/triggers/keep_sneak_10s/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_10s/use | ||
|
||
# リセット | ||
scoreboard players reset $SneakTime Temporary | ||
tag @s remove CanUsed | ||
data remove storage asset:context SneakTime |
8 changes: 8 additions & 0 deletions
8
...Blessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/check.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_10s/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_10s/ | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_10s/check |
8 changes: 8 additions & 0 deletions
8
...data/asset_manager/functions/artifact/triggers/keep_sneak_10s/keep_sneak_10s.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_10s/keep_sneak_10s.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_10s/use | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_10s/ |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/use.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,19 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_10s/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/keep_sneak_10s/ | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/keep_sneak_10s/keep_sneak_10s.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
21 changes: 21 additions & 0 deletions
21
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/.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,21 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_1s/ | ||
# | ||
# 各神器処理へデータ受け渡し | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
# フラグが存在しているか確認する | ||
execute if entity @s[tag=!TriggerFlag.Sneak] run return fail | ||
# スニークしている時間を取得する | ||
function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
execute store result score $SneakTime Temporary run data get storage asset:context SneakTime | ||
# 使用条件を満たしているか確認する | ||
execute if score $SneakTime Temporary matches 20.. run function asset_manager:artifact/check/ | ||
execute if score $SneakTime Temporary matches 20.. run function asset_manager:artifact/triggers/keep_sneak_1s/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_1s/use | ||
|
||
# リセット | ||
scoreboard players reset $SneakTime Temporary | ||
tag @s remove CanUsed | ||
data remove storage asset:context SneakTime |
8 changes: 8 additions & 0 deletions
8
...yBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/check.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_1s/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_1s/ | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_1s/check |
8 changes: 8 additions & 0 deletions
8
...g/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/keep_sneak_1s.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_1s/keep_sneak_1s.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_1s/use | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_1s/ |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/use.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,19 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_1s/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/keep_sneak_1s/ | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/keep_sneak_1s/keep_sneak_1s.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
21 changes: 21 additions & 0 deletions
21
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/.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,21 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_2s/ | ||
# | ||
# 各神器処理へデータ受け渡し | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
# フラグが存在しているか確認する | ||
execute if entity @s[tag=!TriggerFlag.Sneak] run return fail | ||
# スニークしている時間を取得する | ||
function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
execute store result score $SneakTime Temporary run data get storage asset:context SneakTime | ||
# 使用条件を満たしているか確認する | ||
execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/check/ | ||
execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/triggers/keep_sneak_2s/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_2s/use | ||
|
||
# リセット | ||
scoreboard players reset $SneakTime Temporary | ||
tag @s remove CanUsed | ||
data remove storage asset:context SneakTime |
8 changes: 8 additions & 0 deletions
8
...yBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/check.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_2s/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_2s/ | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_2s/check |
8 changes: 8 additions & 0 deletions
8
...g/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/keep_sneak_2s.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_2s/keep_sneak_2s.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_2s/use | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_2s/ |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/use.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,19 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_2s/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/keep_sneak_2s/ | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/keep_sneak_2s/keep_sneak_2s.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
21 changes: 21 additions & 0 deletions
21
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/.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,21 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_3s/ | ||
# | ||
# 各神器処理へデータ受け渡し | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
# フラグが存在しているか確認する | ||
execute if entity @s[tag=!TriggerFlag.Sneak] run return fail | ||
# スニークしている時間を取得する | ||
function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ | ||
execute store result score $SneakTime Temporary run data get storage asset:context SneakTime | ||
# 使用条件を満たしているか確認する | ||
execute if score $SneakTime Temporary matches 60.. run function asset_manager:artifact/check/ | ||
execute if score $SneakTime Temporary matches 60.. run function asset_manager:artifact/triggers/keep_sneak_3s/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_3s/use | ||
|
||
# リセット | ||
scoreboard players reset $SneakTime Temporary | ||
tag @s remove CanUsed | ||
data remove storage asset:context SneakTime |
8 changes: 8 additions & 0 deletions
8
...yBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/check.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_3s/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_3s/ | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_3s/check |
8 changes: 8 additions & 0 deletions
8
...g/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/keep_sneak_3s.m.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,8 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_3s/keep_sneak_3s.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/keep_sneak_3s/use | ||
|
||
$function asset:artifact/alias/$(id)/keep_sneak_3s/ |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/use.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,19 @@ | ||
#> asset_manager:artifact/triggers/keep_sneak_3s/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/keep_sneak_3s/ | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/keep_sneak_3s/keep_sneak_3s.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
Oops, something went wrong.