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,9 +8,13 @@
# @private
#declare score_holder $UserID

# 演出用Object
data modify storage api: Argument.ID set value 1183
function api:object/summon

# 演出
particle firework ~ ~ ~ 0 0 0 0.2 30 normal @a
particle dust 5 20000000 3 1.5 ~ ~ ~ 0.5 0.5 0.5 0 60 normal @a
# particle dust 5 20000000 3 1.5 ~ ~ ~ 0.5 0.5 0.5 0 60 normal @a
playsound entity.firework_rocket.twinkle neutral @a ~ ~ ~ 0.3 2 0
playsound entity.firework_rocket.twinkle neutral @a ~ ~ ~ 0.3 1.5 0
playsound item.trident.return neutral @a ~ ~ ~ 0.5 2 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:object/1183.voltage_effect/init/
#
# Objectのinit時の処理
#
# @within asset:object/alias/1183/init

# ランダムにIndex設定
execute store result storage asset:context this.Index int 1 run random value 0..2

# 4回append
function asset:object/1183.voltage_effect/init/append/
function asset:object/1183.voltage_effect/init/append/
function asset:object/1183.voltage_effect/init/append/
function asset:object/1183.voltage_effect/init/append/
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#> asset:object/1183.voltage_effect/init/append/
#
#
#
# @within function asset:object/1183.voltage_effect/init/

#> Private
# @private
#declare score_holder $Index

# ランダム
execute store result storage asset:context this.Random int 1 run random value 0..2

# Index
execute store result score $Index Temporary run data get storage asset:context this.Index
scoreboard players add $Index Temporary 1
execute if score $Index Temporary matches 3.. run scoreboard players set $Index Temporary 0
execute store result storage asset:context this.Index int 1 run scoreboard players get $Index Temporary
scoreboard players reset $Index Temporary

# do
function asset:object/1183.voltage_effect/init/append/do.m with storage asset:context this
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1183.voltage_effect/init/append/do.m
#
#
#
# @within function asset:object/1183.voltage_effect/init/append/

#
$data modify storage asset:context this.List append from storage asset:context this.ColorList.$(Random)[$(Index)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:object/1183.voltage_effect/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1183/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 1183
# フィールド(オプション)
data modify storage asset:object Field.List set value []
data modify storage asset:object Field.ColorList.0 set value ["0","1","2"]
data modify storage asset:object Field.ColorList.1 set value ["3","4","5"]
data modify storage asset:object Field.ColorList.2 set value ["6","7","8"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1183.voltage_effect/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1183/summon

# 元となるEntityを召喚する
summon text_display ~ ~ ~ {Tags:["ObjectInit"],billboard:"center",alignment:"center",brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,2f,0f]},background:16711680}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:object/1183.voltage_effect/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/1183/tick

# 消滅処理
execute unless data storage asset:context this.List[0] run kill @s

# 適用
data modify storage asset:temp _.Char set from storage asset:context this.List[-1]
function asset:object/1183.voltage_effect/tick/apply_char.m with storage asset:temp _
data remove storage asset:context this.List[-1]

# リセット
data remove storage asset:temp _
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1183.voltage_effect/tick/apply_char.m
#
#
#
# @within function asset:object/1183.voltage_effect/tick/

#
$data modify entity @s text set value '{"text":"$(Char)","font":"object/1183"}'
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/1183/init.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1183/init
#
# Init処理のエイリアス
#
# @within asset_manager:object/init/init.m

# 元のInit処理を呼び出す
function asset:object/1183.voltage_effect/init/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1183/register
#
# Objectのデータ指定処理のエイリアス
#
# @within asset_manager:object/summon/register.m

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

# 元の召喚処理を呼び出す
function asset:object/1183.voltage_effect/summon/
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/1183/tick.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1183/tick
#
# Tick時処理のエイリアス
#
# @within asset_manager:object/tick/tick.m

# 元のTick処理を呼び出す
function asset:object/1183.voltage_effect/tick/
Loading