Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -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..}]
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/2257/init.mcfunction
Original file line number Diff line number Diff line change
@@ -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/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/2257/register
#
# Objectのデータ指定処理のエイリアス
#
# @within asset_manager:object/summon/register.m

# 元の登録処理を呼び出す
function asset:object/2257.thunder_object/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/2257/summon
#
# Object召喚処理のエイリアス
#
# @within asset_manager:object/summon/summon.m

# 元の召喚処理を呼び出す
function asset:object/2257.thunder_object/summon/
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/2257/tick.mcfunction
Original file line number Diff line number Diff line change
@@ -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/
Loading