diff --git a/Asset/data/asset/functions/object/2075.thunder_magic/tick/thunder.mcfunction b/Asset/data/asset/functions/object/2075.thunder_magic/tick/thunder.mcfunction index 020f035f2f..4daa5973b8 100644 --- a/Asset/data/asset/functions/object/2075.thunder_magic/tick/thunder.mcfunction +++ b/Asset/data/asset/functions/object/2075.thunder_magic/tick/thunder.mcfunction @@ -8,12 +8,15 @@ # @private #declare tag Hit +# 演出用Object召喚 + data modify storage api: Argument.ID set value 2257 + data modify storage api: Argument.FieldOverride.Scale set value 4f + function api:object/summon + # 演出 - particle dust 1 1 0 1 ~ ~3 ~ 0.7 3 0.7 0 150 - particle dust 1 1 0 1 ~ ~5 ~ 0.1 5 0.1 0 150 + particle dust 1 1 0 1 ~ ~3.5 ~ 0.4 3 0.4 0 100 particle minecraft:explosion ~ ~ ~ 0.3 0 0.3 0 5 particle minecraft:large_smoke ~ ~ ~ 0 0 0 0.4 50 - playsound entity.lightning_bolt.thunder hostile @a ~ ~ ~ 0.7 2 0 playsound entity.lightning_bolt.thunder hostile @a ~ ~ ~ 0.7 2 0 playsound entity.lightning_bolt.impact hostile @a ~ ~ ~ 0.7 0 0 diff --git a/Asset/data/asset/functions/object/2257.thunder_object/init/.mcfunction b/Asset/data/asset/functions/object/2257.thunder_object/init/.mcfunction new file mode 100644 index 0000000000..b1c833523f --- /dev/null +++ b/Asset/data/asset/functions/object/2257.thunder_object/init/.mcfunction @@ -0,0 +1,15 @@ +#> asset:object/2257.thunder_object/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/2257/init + +# Scaleを適用 + data modify storage asset:temp Scale set value [0f,0f,0f] + data modify storage asset:temp Scale[0] set from storage asset:context this.Scale + data modify storage asset:temp Scale[1] set from storage asset:context this.Scale + data modify entity @s transformation.scale set from storage asset:temp Scale + data remove storage asset:temp Scale + +# translation + execute store result entity @s transformation.translation[1] float -0.0008 run data get storage asset:context this.Scale 100 diff --git a/Asset/data/asset/functions/object/2257.thunder_object/register.mcfunction b/Asset/data/asset/functions/object/2257.thunder_object/register.mcfunction new file mode 100644 index 0000000000..b6ea99573f --- /dev/null +++ b/Asset/data/asset/functions/object/2257.thunder_object/register.mcfunction @@ -0,0 +1,20 @@ +#> asset:object/2257.thunder_object/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/2257/register + +# 継承(オプション) + # data modify storage asset:object Extends append value + # function asset:object/extends +# 他のObjectに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false +# Tickするかどうか(boolean) (オプション) + # data modify storage asset:object IsTicking set value + +# ID (int) + data modify storage asset:object ID set value 2257 +# フィールド(オプション) + data modify storage asset:object Field.Scale set value 3f diff --git a/Asset/data/asset/functions/object/2257.thunder_object/summon/.mcfunction b/Asset/data/asset/functions/object/2257.thunder_object/summon/.mcfunction new file mode 100644 index 0000000000..9b635f9d1b --- /dev/null +++ b/Asset/data/asset/functions/object/2257.thunder_object/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2257.thunder_object/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/2257/summon + +# 元となるEntityを召喚する + summon text_display ~ ~ ~ {Tags:["ObjectInit"],text:'{"text":"0","font":"object/2257"}',billboard:"vertical",background:16711680,brightness:{sky:15,block:15}} diff --git a/Asset/data/asset/functions/object/2257.thunder_object/tick/.mcfunction b/Asset/data/asset/functions/object/2257.thunder_object/tick/.mcfunction new file mode 100644 index 0000000000..ae8468449f --- /dev/null +++ b/Asset/data/asset/functions/object/2257.thunder_object/tick/.mcfunction @@ -0,0 +1,18 @@ +#> asset:object/2257.thunder_object/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/2257/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# モデル適用 + execute if score @s General.Object.Tick matches 2 run data modify entity @s text set value '{"text":"1","font":"object/2257"}' + execute if score @s General.Object.Tick matches 3 run data modify entity @s text set value '{"text":"2","font":"object/2257"}' + execute if score @s General.Object.Tick matches 4 run data modify entity @s text set value '{"text":"3","font":"object/2257"}' + execute if score @s General.Object.Tick matches 5 run data modify entity @s text set value '{"text":"4","font":"object/2257"}' + execute if score @s General.Object.Tick matches 6 run data modify entity @s text set value '{"text":"5","font":"object/2257"}' + +# 消滅処理 + kill @s[scores={General.Object.Tick=7..}] diff --git a/Asset/data/asset/functions/object/alias/2257/init.mcfunction b/Asset/data/asset/functions/object/alias/2257/init.mcfunction new file mode 100644 index 0000000000..65e19cf95a --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2257/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2257/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/2257.thunder_object/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2257/register.mcfunction b/Asset/data/asset/functions/object/alias/2257/register.mcfunction new file mode 100644 index 0000000000..4bf249c13c --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2257/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2257/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/2257.thunder_object/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2257/summon.mcfunction b/Asset/data/asset/functions/object/alias/2257/summon.mcfunction new file mode 100644 index 0000000000..bbdbd7e588 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2257/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2257/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/2257.thunder_object/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2257/tick.mcfunction b/Asset/data/asset/functions/object/alias/2257/tick.mcfunction new file mode 100644 index 0000000000..c9adb7e99e --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2257/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2257/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/2257.thunder_object/tick/ \ No newline at end of file