Skip to content
Merged
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
@@ -0,0 +1,11 @@
#> asset:object/1156.refraction_prism/init/
#
# Objectのinit時の処理
#
# @within asset:object/alias/1156/init

# Rotationをランダムにする
execute store result storage asset:temp Args.Yaw float 0.01 run random value 0..35999
execute store result storage asset:temp Args.Pitch float 0.01 run random value -6000..1500
function asset:object/1156.refraction_prism/init/rotate with storage asset:temp Args
data remove storage asset:temp Args
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:object/1156.refraction_prism/init/rotate
#
#
#
# @within function asset:object/1156.refraction_prism/init/

$tp @s ~ ~ ~ $(Yaw) $(Pitch)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:object/1156.refraction_prism/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1156/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 1156
# フィールド(オプション)
data modify storage asset:object Field.Font set value 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1156.refraction_prism/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1156/summon

# 元となるEntityを召喚する
function asset:object/1156.refraction_prism/summon/m with storage asset:context this
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:object/1156.refraction_prism/summon/m
#
#
#
# @within function asset:object/1156.refraction_prism/summon/

$summon text_display ~ ~ ~ {Tags:["ObjectInit"],teleport_duration:1,alignment:"center",billboard:"center",brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0.3826f,0.9238f],translation:[0f,0f,0f],scale:[0f,0f,0f]},text:'[{"text":"$(Font)","font":"object/1156"}]',background:16711680}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:object/1156.refraction_prism/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/1156/tick

# Tick加算
scoreboard players add @s General.Object.Tick 1
execute unless score @s General.Object.Tick matches 3.. run return fail

# tp
execute if score @s General.Object.Tick matches 3..13 run tp @s ^ ^ ^0.12
execute if score @s General.Object.Tick matches 14..21 run tp @s ^ ^ ^0.09
execute if score @s General.Object.Tick matches 22..27 run tp @s ^ ^ ^0.05
execute if score @s General.Object.Tick matches 28.. run tp @s ^ ^ ^0.01

# transformation
execute if score @s General.Object.Tick matches 3 run function asset:object/1156.refraction_prism/tick/transformation/0
execute if score @s General.Object.Tick matches 15 run function asset:object/1156.refraction_prism/tick/transformation/1
execute if score @s General.Object.Tick matches 25 run function asset:object/1156.refraction_prism/tick/transformation/2

# kill
execute if score @s General.Object.Tick matches 30.. run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/1156.refraction_prism/tick/transformation/0
#
#
#
# @within function asset:object/1156.refraction_prism/tick/

data modify entity @s start_interpolation set value 0
data modify entity @s interpolation_duration set value 12
data modify entity @s transformation.left_rotation set value {angle:1.57f,axis:[0f,-0.7071f,0.7071f]}
data modify entity @s transformation.scale set value [0.6f,0.6f,0f]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/1156.refraction_prism/tick/transformation/1
#
#
#
# @within function asset:object/1156.refraction_prism/tick/

data modify entity @s start_interpolation set value 0
data modify entity @s interpolation_duration set value 10
data modify entity @s transformation.left_rotation set value {angle:3.14f,axis:[0f,-0.7071f,0.7071f]}
data modify entity @s transformation.scale set value [0.9f,0.9f,0f]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/1156.refraction_prism/tick/transformation/2
#
#
#
# @within function asset:object/1156.refraction_prism/tick/

data modify entity @s start_interpolation set value 0
data modify entity @s interpolation_duration set value 5
data modify entity @s transformation.left_rotation set value {angle:-2.355f,axis:[0f,-0.7071f,0.7071f]}
data modify entity @s transformation.scale set value [0f,0f,0f]
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/1156/init.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1156/init
#
# Init処理のエイリアス
#
# @within asset_manager:object/init/init.m

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

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

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

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