text:
#> player_manager:god/change_believe/check-1/on_click
#
#
#
# @within function player_manager:god/change_believe/check-1/listener

# エラー値
    execute unless score @s Believe matches 1..2 run function lib:message/invalid_operation
# 正常値
    execute if score @s Believe matches 1 run function oh_my_dat:please
    execute if score @s Believe matches 1 unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems[0] run function player_manager:god/change_believe/on_change
    execute if score @s Believe matches 1 if data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems[0] run function player_manager:god/change_believe/check-2/
    execute if score @s Believe matches 2 run function player_manager:god/change_believe/on_check_blessing
# リセット
    execute unless score @s Believe matches 0 run scoreboard players reset @s Believe


text:
#> player_manager:god/change_believe/check-1/listener
#
#
#
# @within function
#   player_manager:god/change_believe/check-1/
#   player_manager:god/change_believe/check-1/listener

# チェック
    execute as @a[scores={Believe=1..}] run function player_manager:god/change_believe/check-1/on_click
    execute as @a[scores={Believe=0}] unless score @s InArea matches 1 run scoreboard players reset @s Believe
    execute as @a[scores={Believe=0}] unless score @s InSubArea matches 10..14 run scoreboard players reset @s Believe
# ループ
    execute if entity @a[scores={Believe=0},limit=1] run schedule function player_manager:god/change_believe/check-1/listener 1t

repo_name: ProjectTSB/TheSkyBlessing

repo_language: mcfunction

mime_type: text/plain


text:
#> player_manager:god/mercy/mercy
#
#
#
# @within function player_manager:god/mercy/on_mercy/check

# 供物アイテムの削除
    data modify storage api: Argument.Target set from storage player_manager:god TargetOfferingData.Next.Item
    data modify storage api: Argument.Amount set from storage player_manager:god TargetOfferingData.Next.Amount
    function api:inventory/clear
# 次の供物アイテムを設定する
    function player_manager:god/mercy/offering/set_next
# アイテム返還
    data modify storage api: Argument.Count set value 20
    execute at @s positioned ~ ~7 ~ run function api:lost_items/give
# 神のメッセージ
    execute if score @s InSubArea matches 10 run function lib:message/god/flora/mercy
    execute if score @s InSubArea matches 11 run function lib:message/god/nyaptov/mercy
    execute if score @s InSubArea matches 12 run function lib:message/god/rumor/mercy
    execute if score @s InSubArea matches 13 run function lib:message/god/urban/mercy
    execute if score @s InSubArea matches 14 run function lib:message/god/wi-ki/mercy


text:
#> player_manager:god/mercy/on_click
#
#
#
# @within function player_manager:god/mercy/listener

# エラー値
    execute unless score @s Believe3 matches 1..2 run function lib:message/invalid_operation
# 正常値
    execute if score @s Believe3 matches 1 run function player_manager:god/mercy/on_check_offering
    execute if score @s Believe3 matches 2 run function player_manager:god/mercy/on_mercy/pre
# リセット
    execute unless score @s Believe3 matches 0 run scoreboard players reset @s Believe3


text:
#> player_manager:god/mercy/listener
#
#
#
# @within function
#   player_manager:god/mercy/
#   player_manager:god/mercy/listener

# チェック
    execute as @a[scores={Believe3=1..}] run function player_manager:god/mercy/on_click
    execute as @a[scores={Believe3=0}] unless score @s InArea matches 1 run scoreboard players reset @s Believe3
    execute as @a[scores={Believe3=0}] unless score @s InSubArea matches 10..14 run scoreboard players reset @s Believe3
# ループ
    execute if entity @a[scores={Believe3=0},limit=1] run schedule function player_manager:god/mercy/listener 1t


text:
#> player_manager:god/mercy/on_check_offering
#
#
#
# @within function player_manager:god/mercy/on_click

function player_manager:god/mercy/offering/send_require_message

function player_manager:god/mercy/


text:
#> player_manager:god/mercy/on_mercy/check
#
#
#
# @within function player_manager:god/mercy/on_mercy/pre

#> 返り値
# @private
    #declare score_holder $Amount
    #declare score_holder $Return.Amount

# 供物データを取得
    function player_manager:god/mercy/offering/get
# 供物アイテムの個数取得
    data modify storage api: Argument.Target set from storage player_manager:god TargetOfferingData.Next.Item
    data modify storage api: Argument.Amount set value 0
    function api:inventory/clear
# 個数チェック
    execute store result score $Amount Temporary run data get storage player_manager:god TargetOfferingData.Next.Amount
    execute unless score $Amount Temporary <= $Return.Amount Lib run function player_manager:god/mercy/offering/send_require_message
    execute if score $Amount Temporary <= $Return.Amount Lib run function player_manager:god/mercy/mercy
# リセット
    scoreboard players reset $Amount
    scoreboard players reset $Return.Amount


text:
#> player_manager:god/mercy/on_mercy/pre
#
#
#
# @within function player_manager:god/mercy/on_click

# UserStorage呼び出し
    function oh_my_dat:please
# 失ったアイテムが無いならメッセージ
    execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems[0] run tellraw @s [{"text":"今は慈悲を乞う必要は無さそうだ...","color":"light_purple"}]
# 失ったアイテムがあればチェック
    execute if data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems[0] run function player_manager:god/mercy/on_mercy/check


text:
#> player_manager:god/mercy/offering/send_require_message
#
#
#
# @within function
#   player_manager:god/mercy/on_check_offering
#   player_manager:god/mercy/on_mercy/check

function player_manager:god/mercy/offering/get

tellraw @s [{"storage":"player_manager:god","nbt":"TargetOfferingData.GodName","color":"white"},{"text":"に慈悲を乞うには","color":"white"},{"storage":"player_manager:god","nbt":"TargetOfferingData.Next.Name","interpret":true,"color":"green"},{"text":"が","color":"white"},{"storage":"player_manager:god","nbt":"TargetOfferingData.Next.Amount","color":"green"},{"text":"個必要なようだ...","color":"white"}]


text:
#> player_manager:god/mercy/offering/set_next
#
#
#
# @within function
#   player_manager:god/mercy/offering/get
#   player_manager:god/mercy/mercy

#> Length
# @private
    #declare score_holder $CandidatesLength
    #declare score_holder $Argument.Index
    #declare score_holder $Min
    #declare score_holder $Diff
    #declare score_holder $Count

# セッション開ける
    function lib:array/session/open
# 供物リスト
    data modify storage lib: Array set from storage player_manager:god TargetOfferingData.Items
# 候補リストの長さを取得
    execute store result score $CandidatesLength Temporary if data storage lib: Array[]
# ターゲットの名前をランダムに決める
    execute store result score $Argument.Index Lib run function lib:random/
    scoreboard players operation $Argument.Index Lib %= $CandidatesLength Temporary
# 移動
    function lib:array/move
# 名前と必要アイテムを代入
    data modify storage player_manager:god TargetOfferingData.Next.Item set from storage lib: Array[-1].Item
    data modify storage player_manager:god TargetOfferingData.Next.Name set from storage lib: Array[-1].Name
# 個数の範囲を算出する
    execute store result score $Min Temporary run data get storage lib: Array[-1].Amount[0]
    execute store result score $Diff Temporary run data get storage lib: Array[-1].Amount[1]
    scoreboard players operation $Diff Temporary -= $Min Temporary
    scoreboard players add $Diff Temporary 1
# 個数をランダムに設定する
    execute store result score $Count Temporary run function lib:random/
    scoreboard players operation $Count Temporary %= $Diff Temporary
    scoreboard players operation $Count Temporary += $Min Temporary
    execute store result storage player_manager:god TargetOfferingData.Next.Amount int 1 run scoreboard players get $Count Temporary
# セット
    execute if score @s InSubArea matches 10 run data modify storage player_manager:god OfferingData.Flora set from storage player_manager:god TargetOfferingData
    execute if score @s InSubArea matches 11 run data modify storage player_manager:god OfferingData.Nyaptov set from storage player_manager:god TargetOfferingData
    execute if score @s InSubArea matches 12 run data modify storage player_manager:god OfferingData.Rumor set from storage player_manager:god TargetOfferingData
    execute if score @s InSubArea matches 13 run data modify storage player_manager:god OfferingData.Urban set from storage player_manager:god TargetOfferingData
    execute if score @s InSubArea matches 14 run data modify storage player_manager:god OfferingData.Wi-ki set from storage player_manager:god TargetOfferingData
# リセット
    function lib:array/session/close
    scoreboard players reset $CandidatesLength Temporary
    scoreboard players reset $Count Temporary
    scoreboard players reset $Diff Temporary
    scoreboard players reset $Min Temporary


text:
#> player_manager:god/mercy/offering/get
#
#
#
# @within function
#   player_manager:god/mercy/on_mercy/check
#   player_manager:god/mercy/offering/send_require_message

# 初期化
    data remove storage player_manager:god TargetOfferingData
# 取得
    execute if score @s InSubArea matches 10 run data modify storage player_manager:god TargetOfferingData set from storage player_manager:god OfferingData.Flora
    execute if score @s InSubArea matches 11 run data modify storage player_manager:god TargetOfferingData set from storage player_manager:god OfferingData.Nyaptov
    execute if score @s InSubArea matches 12 run data modify storage player_manager:god TargetOfferingData set from storage player_manager:god OfferingData.Rumor
    execute if score @s InSubArea matches 13 run data modify storage player_manager:god TargetOfferingData set from storage player_manager:god OfferingData.Urban
    execute if score @s InSubArea matches 14 run data modify storage player_manager:god TargetOfferingData set from storage player_manager:god OfferingData.Wi-ki
# 未設定の場合設定する
    execute unless data storage player_manager:god TargetOfferingData.Next run function player_manager:god/mercy/offering/set_next


text:
#> player_manager:god/mercy/offering/init
#
# 慈悲を乞うための供物データを定義します
#
# @within function core:load_once

# フローラ
    data modify storage player_manager:god OfferingData.Flora.GodName set value "フローラ"
    data modify storage player_manager:god OfferingData.Flora.Items set value []
    data modify storage player_manager:god OfferingData.Flora.Items append value {Item:{id:"minecraft:poppy"},Amount:[10,30],Name:'{"translate":"block.minecraft.poppy"}'}
    data modify storage player_manager:god OfferingData.Flora.Items append value {Item:{id:"minecraft:dandelion"},Amount:[10,30],Name:'{"translate":"block.minecraft.dandelion"}'}
    data modify storage player_manager:god OfferingData.Flora.Items append value {Item:{id:"minecraft:cornflower"},Amount:[10,30],Name:'{"translate":"block.minecraft.cornflower"}'}
# ニャプトフ
    data modify storage player_manager:god OfferingData.Nyaptov.GodName set value "ニャプトフ"
    data modify storage player_manager:god OfferingData.Nyaptov.Items set value []
    data modify storage player_manager:god OfferingData.Nyaptov.Items append value {Item:{id:"minecraft:cod"},Amount:[15,30],Name:'{"translate":"item.minecraft.cod"}'}
    data modify storage player_manager:god OfferingData.Nyaptov.Items append value {Item:{id:"minecraft:salmon"},Amount:[5,15],Name:'{"translate":"item.minecraft.salmon"}'}
    data modify storage player_manager:god OfferingData.Nyaptov.Items append value {Item:{id:"minecraft:tropical_fish"},Amount:[2,4],Name:'{"translate":"item.minecraft.tropical_fish"}'}
# ルーモア
    data modify storage player_manager:god OfferingData.Rumor.GodName set value "ルーモア"
    data modify storage player_manager:god OfferingData.Rumor.Items set value []
    data modify storage player_manager:god OfferingData.Rumor.Items append value {Item:{id:"minecraft:oak_log"},Amount:[30,60],Name:'{"translate":"block.minecraft.oak_log"}'}
    data modify storage player_manager:god OfferingData.Rumor.Items append value {Item:{id:"minecraft:bread"},Amount:[15,25],Name:'{"translate":"item.minecraft.bread"}'}
    data modify storage player_manager:god OfferingData.Rumor.Items append value {Item:{id:"minecraft:string"},Amount:[10,20],Name:'{"translate":"item.minecraft.string"}'}
# ウルバン
    data modify storage player_manager:god OfferingData.Urban.GodName set value "ウルバン"
    data modify storage player_manager:god OfferingData.Urban.Items set value []
    data modify storage player_manager:god OfferingData.Urban.Items append value {Item:{id:"minecraft:iron_ingot"},Amount:[4,8],Name:'{"translate":"item.minecraft.iron_ingot"}'}
    data modify storage player_manager:god OfferingData.Urban.Items append value {Item:{id:"minecraft:coal"},Amount:[4,8],Name:'{"translate":"item.minecraft.coal"}'}
    data modify storage player_manager:god OfferingData.Urban.Items append value {Item:{id:"minecraft:gunpowder"},Amount:[10,20],Name:'{"translate":"item.minecraft.gunpowder"}'}
# ウィ＝キ
    data modify storage player_manager:god OfferingData.Wi-ki.GodName set value "ウィ＝キ"
    data modify storage player_manager:god OfferingData.Wi-ki.Items set value []
    data modify storage player_manager:god OfferingData.Wi-ki.Items append value {Item:{id:"minecraft:paper"},Amount:[30,60],Name:'{"translate":"item.minecraft.paper"}'}
    data modify storage player_manager:god OfferingData.Wi-ki.Items append value {Item:{id:"minecraft:book"},Amount:[4,8],Name:'{"translate":"item.minecraft.book"}'}
    data modify storage player_manager:god OfferingData.Wi-ki.Items append value {Item:{id:"minecraft:ink_sac"},Amount:[5,15],Name:'{"translate":"item.minecraft.ink_sac"}'}


text:
#> player_manager:god/nyaptov/passive
#
#
#
# @within function player_manager:god/tick

#> 落下距離
# @private
    #declare score_holder $FallDistance
    #declare tag SlowFalling

# 着地チェック
    execute if entity @s[tag=SlowFalling] run function api:data_get/on_ground
    execute if entity @s[tag=SlowFalling] if data storage api: {OnGround:1b} run tag @s remove SlowFalling
# 25m落下チェック
    execute unless entity @s[tag=SlowFalling] run function api:data_get/fall_distance
    execute unless entity @s[tag=SlowFalling] store result score $FallDistance Temporary run data get storage api: FallDistance
    execute unless entity @s[tag=SlowFalling] if entity @s[tag=Nyaptov.FlyingElytra] run scoreboard players reset $FallDistance Temporary
    execute unless entity @s[tag=SlowFalling] if score $FallDistance Temporary matches 25.. run tp @s @s
    execute unless entity @s[tag=SlowFalling] if score $FallDistance Temporary matches 25.. run particle cloud ~ ~ ~ 0.3 0.2 0.3 0 10 normal
    execute unless entity @s[tag=SlowFalling] if score $FallDistance Temporary matches 25.. run tag @s add SlowFalling
# SlowFallingタグが付与されているなら効果を付与
    execute if entity @s[tag=SlowFalling] run summon area_effect_cloud ~ ~ ~ {Duration:6,Age:4,Effects:[{Id:28,Amplifier:0b,Duration:5,ShowParticles:0b}]}
# リセット
    scoreboard players reset $FallDistance Temporary
    tag @s[tag=Nyaptov.FlyingElytra] remove Nyaptov.FlyingElytra


text:
#> player_manager:god/nyaptov/in_temple
#
#
#
# @within function world_manager:area/01-11.nyaptov_temple

# 教徒
    execute if entity @s[tag=Believe.Nyaptov] run function player_manager:god/mercy/
# 異教徒
    execute if entity @s[tag=!Believe.Nyaptov] run function player_manager:god/change_believe/


text:
#> player_manager:god/nyaptov/unbelieve
#
#
#
# @within
#   function player_manager:god/change_believe/unbelieve2
#   function debug:change_believe/none

# 信仰タグ削除
    tag @s remove Believe.Nyaptov
# 回復+30%
    data modify storage api: Argument.UUID set value [2, 1, 1, 11]
    function api:modifier/heal/remove
# 攻撃-20%
    data modify storage api: Argument.UUID set value [2, 1, 1, 11]
    function api:modifier/attack/base/remove
# 水耐性-10%
    data modify storage api: Argument.UUID set value [2, 1, 1, 11]
    function api:modifier/defense/water/remove


text:
#> player_manager:god/nyaptov/believe
#
#
#
# @within
#   function player_manager:god/change_believe/believe2
#   function debug:change_believe/nyaptov

# 信仰タグ付与
    tag @s add Believe.Nyaptov
# 回復+30%
    data modify storage api: Argument.UUID set value [2, 1, 1, 11]
    data modify storage api: Argument.Amount set value 0.3
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/heal/add
# 攻撃-20%
    data modify storage api: Argument.UUID set value [2, 1, 1, 11]
    data modify storage api: Argument.Amount set value -0.2
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/attack/base/add
# 水耐性-15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 11]
    data modify storage api: Argument.Amount set value -0.15
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/water/add


text:
#> player_manager:god/none/set_tag
#
#
#
# @within function core:handler/first_join

tag @s add Believe.None


text:
#> player_manager:god/rumor/in_temple
#
#
#
# @within function world_manager:area/01-12.rumor_temple

# 教徒
    execute if entity @s[tag=Believe.Rumor] run function player_manager:god/mercy/
# 異教徒
    execute if entity @s[tag=!Believe.Rumor] run function player_manager:god/change_believe/


text:
#> player_manager:god/rumor/unbelieve
#
#
#
# @within
#   function player_manager:god/change_believe/unbelieve2
#   function debug:change_believe/none

# 信仰タグ削除
    tag @s remove Believe.Rumor
# 雷攻撃+15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    function api:modifier/attack/thunder/remove
# 雷耐性-15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    function api:modifier/defense/thunder/remove
# 攻撃-10%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    function api:modifier/attack/base/remove
# 耐性-10%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    function api:modifier/defense/base/remove

# PassiveBuffの補正を削除
    function player_manager:god/rumor/passive/remove


text:
#> player_manager:god/rumor/believe
#
#
#
# @within
#   function player_manager:god/change_believe/believe2
#   function debug:change_believe/rumor

# 信仰タグ付与
    tag @s add Believe.Rumor
# 雷攻撃+15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    data modify storage api: Argument.Amount set value 0.15
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/attack/thunder/add
# 雷耐性-15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    data modify storage api: Argument.Amount set value -0.15
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/thunder/add
# 攻撃-10%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    data modify storage api: Argument.Amount set value -0.1
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/attack/base/add
# 耐性-10%
    data modify storage api: Argument.UUID set value [2, 1, 1, 12]
    data modify storage api: Argument.Amount set value -0.1
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/base/add


text:
#> player_manager:god/rumor/passive/remove
#
#
#
# @within function
#   player_manager:god/rumor/passive/
#   player_manager:god/rumor/unbelieve

# タグ削除
    tag @s remove PassiveBuff
# 攻撃+30%
    data modify storage api: Argument.UUID set value [1, 2, 1, 12]
    function api:modifier/attack/base/remove
# 耐性+30%
    data modify storage api: Argument.UUID set value [1, 2, 1, 12]
    function api:modifier/defense/base/remove
# MP回復量+0.5
    data modify storage api: Argument.UUID set value [1, 2, 1, 12]
    function api:modifier/mp_regen/remove


text:
#> player_manager:god/rumor/passive/_index.d
# @private

#> 最初と最後のみに動作させるためのタグ
# @within function player_manager:god/rumor/passive/*
#declare tag PassiveBuff


text:
#> player_manager:god/rumor/passive/set
#
#
#
# @within function player_manager:god/rumor/passive/

# タグ付与
    tag @s add PassiveBuff
# 攻撃+30%
    data modify storage api: Argument.UUID set value [1, 2, 1, 12]
    data modify storage api: Argument.Amount set value 0.3
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/attack/base/add
# 耐性+30%
    data modify storage api: Argument.UUID set value [1, 2, 1, 12]
    data modify storage api: Argument.Amount set value 0.3
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/base/add
# MP回復量+0.5
    data modify storage api: Argument.UUID set value [1, 2, 1, 12]
    data modify storage api: Argument.Amount set value 0.5
    data modify storage api: Argument.Operation set value "add"
    function api:modifier/mp_regen/add


text:
#> player_manager:god/wi-ki/in_temple
#
#
#
# @within function world_manager:area/01-14.wi-ki_temple

# 教徒
    execute if entity @s[tag=Believe.Wi-ki] run function player_manager:god/mercy/
# 異教徒
    execute if entity @s[tag=!Believe.Wi-ki] run function player_manager:god/change_believe/


text:
#> player_manager:god/wi-ki/unbelieve
#
#
#
# @within
#   function player_manager:god/change_believe/unbelieve2
#   function debug:change_believe/none

# 信仰タグ削除
    tag @s remove Believe.Wi-ki
# 魔法攻撃+15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 14]
    function api:modifier/attack/magic/remove
# 魔法耐性+20%
    data modify storage api: Argument.UUID set value [2, 1, 1, 14]
    function api:modifier/defense/magic/remove
# 火耐性-30%
    data modify storage api: Argument.UUID set value [2, 1, 1, 14]
    function api:modifier/defense/fire/remove


text:
#> player_manager:god/wi-ki/believe
#
#
#
# @within
#   function player_manager:god/change_believe/believe2
#   function debug:change_believe/wi-ki

# 信仰タグ付与
    tag @s add Believe.Wi-ki
# 魔法攻撃+15%
    data modify storage api: Argument.UUID set value [2, 1, 1, 14]
    data modify storage api: Argument.Amount set value 0.15
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/attack/magic/add
# 魔法耐性+20%
    data modify storage api: Argument.UUID set value [2, 1, 1, 14]
    data modify storage api: Argument.Amount set value 0.2
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/magic/add
# 火耐性-30%
    data modify storage api: Argument.UUID set value [2, 1, 1, 14]
    data modify storage api: Argument.Amount set value -0.3
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/fire/add


text:
#> player_manager:god/wi-ki/passive/remove
#
#
#
# @within function player_manager:god/wi-ki/passive/

# タグ削除
    tag @s remove PassiveDebuff
# 攻撃+30%
    data modify storage api: Argument.UUID set value [1, 2, 1, 14]
    function api:modifier/defense/base/remove


text:
#> player_manager:god/wi-ki/passive/_index.d
# @private

#> 最初と最後のみに動作させるためのタグ
# @within function player_manager:god/wi-ki/passive/*
#declare tag PassiveDebuff


text:
#> player_manager:god/wi-ki/passive/set
#
#
#
# @within function player_manager:god/wi-ki/passive/

# タグ付与
    tag @s add PassiveDebuff
# 耐性-50%
    data modify storage api: Argument.UUID set value [1, 2, 1, 14]
    data modify storage api: Argument.Amount set value -0.5
    data modify storage api: Argument.Operation set value "multiply_base"
    function api:modifier/defense/base/add


text:
#> player_manager:lost_item/take
#
# プレイヤーのアイテムを保管するよ
#
# @within core:handler/death

# Inventory -> Temp
    data modify storage player_manager:lost_item Temp set from storage api: Inventory
# Slotを削除
    data remove storage player_manager:lost_item Temp[].Slot
# 消滅の呪い付きアイテムを削除
    data remove storage player_manager:lost_item Temp[{tag:{Enchantments:[{id:"minecraft:vanishing_curse"}]}}]
# UserStorage呼び出し
    function oh_my_dat:please
# IDをIDSetに追加
    execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems[-1] run data modify storage oh_my_dat: IDSet append value -2147483648
    execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems[-1] store result storage oh_my_dat: IDSet[-1] int 1 run scoreboard players get @s OhMyDatID
# Temp -> UserStorage
    data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems append from storage player_manager:lost_item Temp[]
    data remove storage player_manager:lost_item Temp
#名前の取得
    execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Name run function lib:get_name/
    execute unless data storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Name run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Name set from storage lib: Return.Name
# インベントリclear
    clear @s


text:
#> player_manager:lost_item/_index.d
# @private

#> Temp
# @within *
#   player_manager:lost_item/**
    #declare storage player_manager:lost_item

#> LoopCounter
# @within function
#   player_manager:lost_item/give_all/minecart.summon
#   player_manager:lost_item/give_all/packing.minecart
#   player_manager:lost_item/give_all/packing.chest
#   player_manager:lost_item/give_all/packing.item
    #declare score_holder $i

#> Minecart -> Chest Tag
# @within function
#   player_manager:lost_item/give_all/minecart.summon
#   player_manager:lost_item/give_all/minecart_to_chest_check
    #declare tag LostItemChest

#> Temp
# @within function player_manager:lost_item/give_part/*
    #declare score_holder $GiveCount
    #declare score_holder $ListLength
    #declare score_holder $Index


text:
#> player_manager:lost_item/drop/motion_multiple
#
#
#
# @within function player_manager:lost_item/drop/

# 吹っ飛び方を弄る
    data modify storage player_manager:lost_item Motion set from entity @s Motion
    execute store result storage player_manager:lost_item Motion[0] double 0.0001 run data get storage player_manager:lost_item Motion[0] 20000
    execute store result storage player_manager:lost_item Motion[2] double 0.0001 run data get storage player_manager:lost_item Motion[2] 20000
    data modify entity @s Motion set from storage player_manager:lost_item Motion
# Motionの書き換えが燃やすとなぜか反映される
    data modify entity @s Fire set value 2s
# 拾えるまでの時間を調整する
    data modify entity @s PickupDelay set value 20s
# リセット
    data remove storage lib: Array
    data remove storage player_manager:lost_item Motion


text:
#> player_manager:lost_item/give_part/falling_item
#
# 実行座標からlib: Elementsの中身を降らします
#
# @within function
#   player_manager:lost_item/give_part/
#   player_manager:lost_item/give_part/falling_item

# 27個にSlot付けて移す
    function lib:array/packing_chest
# シャルカーに入れる
    data modify block 10000 0 10000 Items set from storage lib: Package
# 恵みを与える
    loot spawn ~ ~ ~ mine 10000 0 10000 debug_stick
# 残ってたら繰り返す
    execute if data storage lib: Array[0] run function player_manager:lost_item/give_part/falling_item


text:
#> player_manager:lost_item/give_part/generate_index
#
# 返却するアイテム配列の添字をランダムに一つ生成する
#
# @within function
#   player_manager:lost_item/give_part/
#   player_manager:lost_item/give_part/generate_index

# 乱数生成
    execute store result score $Index Temporary run function lib:random/
# 配列範囲に剰余算
    scoreboard players operation $Index Temporary %= $ListLength Temporary
# 添字配列に追加
    data modify storage lib: Picks append value -1
    execute store result storage lib: Picks[-1] int 1 run scoreboard players get $Index Temporary
# GiveCountを減らす
    scoreboard players remove $GiveCount Temporary 1
# GiveCountが残ってるなら繰り返す
    execute if score $GiveCount Temporary matches 1.. run function player_manager:lost_item/give_part/generate_index


text:
#> player_manager:lost_item/give_all/packing.user
#
# プレイヤーのロストしたアイテムをすべて梱包しChests配列に追加する処理
#
# @within function
#   player_manager:lost_item/give_all/
#   player_manager:lost_item/give_all/packing.user

# IDSetの取り出し
    execute store result score $ OhMyDatID run data get storage oh_my_dat: IDSet[-1]
    data remove storage oh_my_dat: IDSet[-1]
# セッション開ける
    function lib:array/session/open
# UserStorage呼び出し
    function oh_its_dat:please
# Arrayに移す
    data modify storage lib: Array set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems
# Chests構造へ梱包して追加
    execute if data storage lib: Array[0] run function player_manager:lost_item/give_all/packing.chest
# リセット
    function lib:array/session/close
# 明示的にstorageを綺麗にしておく
    data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems
# ループ処理
    execute if data storage oh_my_dat: IDSet[-1] run function player_manager:lost_item/give_all/packing.user


text:
#> player_manager:lost_item/give_all/name_to_textcomponent
#
# 名前をテキストコンポーネントに加工してチェストのNameに代入する
#
# @within function player_manager:lost_item/give_all/packing.chest

# 名前を取得し、TextComponentに加工して適用
    data modify storage player_manager:lost_item Name set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Name
    execute in overworld run loot replace block 10000 0 10000 container.0 loot player_manager:lost_item/give_all/name_to_textcomponent
    execute in overworld run data modify storage player_manager:lost_item Chests[-1].tag.display.Name set from block 10000 0 10000 Items[0].tag.display.Name
    data remove storage player_manager:lost_item Name


text:
#> player_manager:lost_item/give_all/minecart_to_chest_check
#
# LostItemChest -> Chestの移動を監視してkillやホッパーの加速を行う
#
# @within function
#   player_manager:lost_item/give_all/
#   player_manager:lost_item/give_all/minecart_to_chest_check

# ホッパー加速
    data modify block 2927 183 -1273 TransferCooldown set value 0b
    data modify block 2927 183 -1274 TransferCooldown set value 0b
    data modify block 2927 183 -1275 TransferCooldown set value 0b
# 中身が空の挿入用チェストをkill
    execute as @e[tag=LostItemChest,distance=..1,x=2927,y=184,z=-1273] unless data entity @s Items[0] run kill @s
# 挿入用チェストがまだ残っていたらループ
    execute if entity @e[tag=LostItemChest,distance=..1,x=2927,y=184,z=-1273,limit=1] run schedule function player_manager:lost_item/give_all/minecart_to_chest_check 1t


text:
#> player_manager:lost_item/give_all/packing.minecart
#
# チェストトロッコのItems構造を作る処理
#
# @within function
#   player_manager:lost_item/give_all/minecart.summon
#   player_manager:lost_item/give_all/packing.minecart

# Chests -> MinecartItems
    data modify storage player_manager:lost_item MinecartItems append from storage player_manager:lost_item Chests[-1]
    data remove storage player_manager:lost_item Chests[-1]
# Slotの設定
    execute store result storage player_manager:lost_item MinecartItems[-1].Slot byte 1 run scoreboard players get $i Temporary
# ループ処理
    scoreboard players add $i Temporary 1
    execute if score $i Temporary < $27 Const if data storage player_manager:lost_item Chests[-1] run function player_manager:lost_item/give_all/packing.minecart


text:
#> player_manager:lost_item/give_all/packing.chest
#
# [0-26]をChests[0:[0-26]-n:[0-26]]に移行する処理
#
# @within function
#   player_manager:lost_item/give_all/packing.user
#   player_manager:lost_item/give_all/packing.chest

# 梱包処理
    # チェストのAppend
        data modify storage player_manager:lost_item Chests append value {id:"chest",Count:1b}
    # Name適用処理
        function player_manager:lost_item/give_all/name_to_textcomponent
    # 梱包
        function lib:array/packing_chest
    # チェストに突っ込む
        data modify storage player_manager:lost_item Chests[-1].tag.BlockEntityTag.Items set from storage lib: Package
    # リセット
        data remove storage lib: Package
# ループ処理
    execute if data storage lib: Array[0] run function player_manager:lost_item/give_all/packing.chest


text:
#> player_manager:lost_item/give_all/minecart.summon
#
# チェストトロッコへアイテムを追加する処理
#
# @within function
#   player_manager:lost_item/give_all/
#   player_manager:lost_item/give_all/minecart.summon

#> Private
# @private
    #declare tag EmptyItems

# チェストロッコに追加する処理
    scoreboard players set $i Temporary 0
    function player_manager:lost_item/give_all/packing.minecart
    scoreboard players reset $i Temporary
# シャルカー -> チェスト
    summon chest_minecart ~ ~ ~ {Invulnerable:1b,Silent:1b,Tags:["LostItemChest","EmptyItems"],Items:[]}
    data modify entity @e[type=chest_minecart,tag=EmptyItems,distance=0,limit=1] Items set from storage player_manager:lost_item MinecartItems
    tag @e[type=chest_minecart,tag=EmptyItems,distance=0,limit=1] remove EmptyItems
    data remove storage player_manager:lost_item MinecartItems
# ループ処理
    execute if data storage player_manager:lost_item Chests[-1] run function player_manager:lost_item/give_all/minecart.summon


text:
#> player_manager:bonus/update_defense_bonus
#
#
#
# @within function
#   core:handler/join
#   asset:artifact/0002.blessing/trigger/**

#> Diff
# @private
    #declare score_holder $Diff
    #declare score_holder $RemovedAmount
    #declare score_holder $isNegative

# 古いのをremove
    data modify storage api: Argument.UUID set value [I;2,2,1,1]
    function api:modifier/defense/base/remove
# 差分にする
    scoreboard players operation $Diff Temporary = $DefenseBonus Global
    execute store result score $RemovedAmount Temporary run data get storage api: Removed.Amount 100
    execute unless score $RemovedAmount Temporary matches -2147483648..2147483647 run scoreboard players set $RemovedAmount Temporary 0
    scoreboard players operation $Diff Temporary -= $RemovedAmount Temporary
# 出力
    execute store result score $isNegative Temporary if score $Diff Temporary matches ..-1
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $Diff Temporary *= $-1 Const
    execute if score $isNegative Temporary matches 0 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"防御力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"%増加した","color":"white"}]
    execute if score $isNegative Temporary matches 1 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"防御力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"%減少した","color":"white"}]
# リセット
    scoreboard players reset $Diff Temporary
    scoreboard players reset $RemovedAmount Temporary
    scoreboard players reset $isNegative Temporary

# 適用
    data modify storage api: Argument set value {Amount:-1,UUID:[I;2,2,1,1],Operation:"multiply"}
    execute store result storage api: Argument.Amount double 0.01 run scoreboard players get $DefenseBonus Global
    function api:modifier/defense/base/add


text:
#> player_manager:bonus/update_mp_bonus
#
#
#
# @within function
#   core:handler/join
#   asset:artifact/0002.blessing/trigger/**

#> Diff
# @private
    #declare score_holder $Diff
    #declare score_holder $isNegative

# 差分にする
    scoreboard players operation $Diff Temporary = $MaxMP Global
    scoreboard players operation $Diff Temporary -= @s MPMax
# 出力
    execute store result score $isNegative Temporary if score $Diff Temporary matches ..-1
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $Diff Temporary *= $-1 Const
    execute if score $isNegative Temporary matches 0 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大魔力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"増加した","color":"white"}]
    execute if score $isNegative Temporary matches 1 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大魔力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"減少した","color":"white"}]
# リセット
    scoreboard players reset $Diff Temporary
    scoreboard players reset $isNegative Temporary

# 適用
    scoreboard players operation @s MPMax = $MaxMP Global


text:
#> player_manager:bonus/update_attack_bonus
#
#
#
# @within function
#   core:handler/join
#   asset:artifact/0002.blessing/trigger/**

#> Diff
# @private
    #declare score_holder $Diff
    #declare score_holder $RemovedAmount
    #declare score_holder $isNegative

# 古いのをremove
    data modify storage api: Argument.UUID set value [I;2,2,1,1]
    function api:modifier/attack/base/remove
# 差分にする
    scoreboard players operation $Diff Temporary = $AttackBonus Global
    execute store result score $RemovedAmount Temporary run data get storage api: Removed.Amount 100
    execute unless score $RemovedAmount Temporary matches -2147483648..2147483647 run scoreboard players set $RemovedAmount Temporary 0
    scoreboard players operation $Diff Temporary -= $RemovedAmount Temporary
# 出力
    execute store result score $isNegative Temporary if score $Diff Temporary matches ..-1
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $Diff Temporary *= $-1 Const
    execute if score $isNegative Temporary matches 0 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"攻撃力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"%増加した","color":"white"}]
    execute if score $isNegative Temporary matches 1 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"攻撃力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"%減少した","color":"white"}]
# リセット
    scoreboard players reset $Diff Temporary
    scoreboard players reset $RemovedAmount Temporary
    scoreboard players reset $isNegative Temporary

# 適用
    data modify storage api: Argument set value {Amount:-1,UUID:[I;2,2,1,1],Operation:"multiply"}
    execute store result storage api: Argument.Amount double 0.01 run scoreboard players get $AttackBonus Global
    function api:modifier/attack/base/add


text:
#> player_manager:bonus/update_health_bonus
#
#
#
# @within function
#   core:handler/join
#   asset:artifact/0002.blessing/trigger/**

#> Diff
# @private
    #declare score_holder $Diff
    #declare score_holder $isNegative
    #declare score_holder $isNegative

# 差分にする
    scoreboard players operation $Diff Temporary = $MaxHealth Global
    scoreboard players operation $Diff Temporary -= @s ScoreToMaxHealth
# 符号を記録して正数に補正する
    execute store result score $isNegative Temporary if score $Diff Temporary matches ..-1
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $Diff Temporary *= $-1 Const
# 整数部のみを取り出す
    scoreboard players operation $Diff Temporary = $Diff Temporary
    scoreboard players operation $Diff Temporary /= $10000 Const
# 出力
    execute if score $isNegative Temporary matches 0 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大体力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"増加した","color":"white"}]
    execute if score $isNegative Temporary matches 1 if score $Diff Temporary matches 1.. run tellraw @s [{"text":"最大体力が","color":"white"},{"score":{"name":"$Diff","objective":"Temporary"},"color":"aqua"},{"text":"減少した","color":"white"}]
# リセット
    scoreboard players reset $Diff Temporary
    scoreboard players reset $isNegative Temporary

# 適用
    scoreboard players operation @s ScoreToMaxHealth = $MaxHealth Global


text:
#> player_manager:mp/_index.d
# @private

#> PlayerManager
# @within function player_manager:mp/viewer/**
    #declare score_holder $NowLvP


text:
#> player_manager:mp/viewer/check_xpbar
#
# 経験値が想定される表示とずれている場合に修正します
#
# @within function core:tick/player/post

#> private
# @private
    #declare score_holder $Lv
    #declare score_holder $LvP
    #declare tag Success

# 取得
    execute store result score $Lv Temporary run xp query @s levels
    function api:data_get/xp_p
    execute store result score $LvP Temporary run data get storage api: XpP 1000
    execute unless score $LvP Temporary matches 0 run scoreboard players add $LvP Temporary 10
    scoreboard players operation $LvP Temporary /= $10 Const
# 現在の%を計算
    scoreboard players operation $NowLvP Temporary = @s MP
    scoreboard players operation $NowLvP Temporary *= $100 Const
    scoreboard players operation $NowLvP Temporary /= @s MPMax
# ずれている場合再調整
    execute if score @s MP = $Lv Temporary if score $NowLvP Temporary = $LvP Temporary run tag @s add Success
    execute if entity @s[tag=!Success] run function player_manager:mp/viewer/adjust_xpbar
# リセット
    tag @s remove Success
    scoreboard players reset $Lv Temporary
    scoreboard players reset $LvP Temporary
    scoreboard players reset $NowLvP Temporary


text:
#> player_manager:mp/viewer/adjust_xpbar
#
# xpbarを調整します
#
# @within function player_manager:mp/viewer/check_xpbar

#> private
# @private
    #declare score_holder $NowMP

#初期化 //40levelは最大が201pointであることを利用して100%までを表現する
    xp set @s 40 levels
    xp set @s 0 points
    scoreboard players operation $NowMP Temporary = @s MP

# pointを設定
    scoreboard players operation $NowLvP Temporary *= $2^24 Const
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 128 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 64 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 32 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 16 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 8 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 4 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 2 points
    scoreboard players operation $NowLvP Temporary *= $2 Const
    execute if score $NowLvP Temporary matches ..-1 run xp add @s 1 points

# levelを設定
    xp set @s 0 levels
    scoreboard players operation $NowMP Temporary *= $2^20 Const
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 1024 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 512 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 256 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 128 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 64 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 32 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 16 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 8 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 4 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 2 levels
    scoreboard players operation $NowMP Temporary *= $2 Const
    execute if score $NowMP Temporary matches ..-1 run xp add @s 1 levels

# リセット
    scoreboard players reset $NowMP Temporary


text:
#> player_manager:mp/regen/check
#
# MPの再生クールダウンを減少させ、クールダウンのチェックを行う
#
# @within function core:tick/player/

# 回復してからの時間を加算
    scoreboard players add @s MPRegenCooldown 1
# 10なら回復処理
    execute if score @s MPRegenCooldown matches 10 run function player_manager:mp/regen/do


text:
#> player_manager:mp/regen/do
#
# MPを回復します
#
# @within function player_manager:mp/regen/check

#> Temp
# @private
    #declare score_holder $isNegative
    #declare score_holder $Fluctuation
    #declare score_holder $AmountFloat

# UserStorage呼び出し
    function oh_my_dat:please
# 回復量計算
    execute store result score $Fluctuation Lib run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.MPRegen 10
    scoreboard players operation $Fluctuation Lib *= @s MPMax
    scoreboard players operation $Fluctuation Lib /= $100 Const
# 負数を強制する
    execute store success score $isNegative Temporary if score $Fluctuation Lib matches ..-1
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $Fluctuation Lib *= $-1 Const
# MP回復量を整数部と少数部に分離する
    # $AmountFloatにコピー
        scoreboard players operation $AmountFloat Temporary = $Fluctuation Lib
    # 10で除算
        scoreboard players operation $Fluctuation Lib /= $10 Const
    # 10で剰余算
        scoreboard players operation $AmountFloat Temporary %= $10 Const
# 負数なら戻す
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $Fluctuation Lib *= $-1 Const
    execute if score $isNegative Temporary matches 1 run scoreboard players operation $AmountFloat Lib *= $-1 Const
# 小数点の桁あがりチェック
    scoreboard players operation @s MPFloat += $AmountFloat Temporary
    execute if score @s MPFloat matches 10.. run scoreboard players add $Fluctuation Lib 1
    execute if score @s MPFloat matches 10.. run scoreboard players remove @s MPFloat 10
    execute if score @s MPFloat matches ..-1 run scoreboard players remove $Fluctuation Lib 1
    execute if score @s MPFloat matches ..-1 run scoreboard players add @s MPFloat 10
# 表示を無効化する
    data modify storage lib: Argument.DisableLog set value true
# 回復
    function lib:mp/fluctuation
# クールダウンリセット
    scoreboard players set @s MPRegenCooldown 0
# リセット
    scoreboard players reset $AmountFloat Temporary
    scoreboard players reset $isNegative Temporary


text:
#> player_manager:manage_tag/_index.d
# @private

#> 無敵であることが推奨されるプレイヤー
# @public
#declare tag PlayerShouldInvulnerable


text:
#> player_manager:adjust_hunger/respawn.delay
#
# 満腹度回復を与え、監視処理をセットします
#
# @within core:handler/respawn.delay

effect give @s saturation 20 0 true
tag @s add AdjustHunger
schedule function player_manager:adjust_hunger/observe 1t replace


text:
#> player_manager:adjust_hunger/_index.d
# @private

#> PlayerManager
# @within function
#   player_manager:adjust_hunger/respawn.delay
#   player_manager:adjust_hunger/observe
    #declare tag AdjustHunger


text:
#> player_manager:adjust_hunger/death
#
# リスポーン時のために死亡時の満腹度を取得する
#
# @within core:handler/death

scoreboard players operation @s HungerTarget = @s Hunger


text:
#> player_manager:adjust_hunger/observe
#
# Playerの満腹度を調節します
#
# @within function
#   player_manager:adjust_hunger/respawn.delay
#   player_manager:adjust_hunger/observe

execute as @a[tag=AdjustHunger,tag=!Death] if score @s Hunger = @s HungerTarget run effect clear @s saturation
execute as @a[tag=AdjustHunger,tag=!Death] if score @s Hunger = @s HungerTarget run tag @s remove AdjustHunger
execute if entity @a[tag=AdjustHunger,limit=1] run schedule function player_manager:adjust_hunger/observe 1t


text:
#> player_manager:adjust_hunger/respawn
#
# リスポーン時に死亡時の満腹度に強制的に戻すよ
#
# @within function core:handler/respawn

execute unless score @s HungerTarget matches 20 run effect give @s hunger 4 255 true


text:
#> debug:clear_lostitems
#
# 失ったアイテムを削除します
#
# @private
# @user

function oh_my_dat:please
data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LostItems


text:
#> debug:stopwatch.start
#
# 負荷計測用のストップウォッチをスタートします
#
# @debug
# @api

execute in the_nether run worldborder set 1
execute in the_nether run worldborder set 100000 100


text:
#> debug:stopwatch.stop
#
# 負荷計測用のストップウォッチをストップします
#
# @debug
# @api

execute in the_nether store result score $MilliSecond Temporary run worldborder get
execute in the_nether run worldborder set 59999968
tellraw @a [{"text":"処理速度: "},{"score":{"objective":"Temporary","name":"$MilliSecond"}},{"text":"ms"}]
scoreboard players reset $MilliSecond Temporary


text:
#> debug:debug_privilege/remove
#
# 開発特権をはく奪します
#
# @private
# @user

tag @s remove DevPrivilege


text:
#> debug:change_believe/wi-ki
#
# 信仰をWi-kiに変更します
#
# @private
# @user

# 信仰解除
    function debug:change_believe/none
# 信仰
    tag @s remove Believe.None
    function player_manager:god/wi-ki/believe


text:
#> debug:change_believe/urban
#
# 信仰をUrbanに変更します
#
# @private
# @user

# 信仰解除
    function debug:change_believe/none
# 信仰
    tag @s remove Believe.None
    function player_manager:god/urban/believe


text:
#> debug:change_believe/none
#
# 無信仰に変更します
#
# @within function debug:change_believe/*
# @user

# 共通
    tag @s add Believe.None
# 各神
    execute if entity @s[tag=Believe.Flora] run function player_manager:god/flora/unbelieve
    execute if entity @s[tag=Believe.Nyaptov] run function player_manager:god/nyaptov/unbelieve
    execute if entity @s[tag=Believe.Rumor] run function player_manager:god/rumor/unbelieve
    execute if entity @s[tag=Believe.Urban] run function player_manager:god/urban/unbelieve
    execute if entity @s[tag=Believe.Wi-ki] run function player_manager:god/wi-ki/unbelieve


text:
#> debug:change_believe/nyaptov
#
# 信仰をNyaptovに変更します
#
# @private
# @user

# 信仰解除
    function debug:change_believe/none
# 信仰
    tag @s remove Believe.None
    function player_manager:god/nyaptov/believe


text:
#> debug:change_believe/rumor
#
# 信仰をRumorに変更します
#
# @private
# @user

# 信仰解除
    function debug:change_believe/none
# 信仰
    tag @s remove Believe.None
    function player_manager:god/rumor/believe


text:
#> debug:change_believe/flora
#
# 信仰をFloraに変更します
#
# @private
# @user

# 信仰解除
    function debug:change_believe/none
# 信仰
    tag @s remove Believe.None
    function player_manager:god/flora/believe


text:
#> debug:entity_storage/merge
# @user
# @private

# EntityStorage取得
    function oh_my_dat:please
# merge
    data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4] merge from storage lib: Argument.Data
# リセット
    data remove storage lib: Argument.Data


text:
#> debug:entity_storage/show
# @user
# @private

# EntityStorage取得
    function oh_my_dat:please
# 表示
    tellraw @a [{"storage":"oh_my_dat:","nbt":"_[-4][-4][-4][-4][-4][-4][-4][-4]"}]


text:
#> debug:tps/1
#
# TickPerSecを大体1に設定します
#
# @user
# @private

function debug:tps/init
scoreboard players set $AwaitTime Global 1000


text:
#> debug:tps/5
#
# TickPerSecを大体5に設定します
#
# @user
# @private

function debug:tps/init
scoreboard players set $AwaitTime Global 200


text:
#> debug:tps/2
#
# TickPerSecを大体2に設定します
#
# @user
# @private

function debug:tps/init
scoreboard players set $AwaitTime Global 500


text:
#> debug:tps/watch
#
#
#
# @api

#>
# @private
#declare score_holder $MilliSecond

execute store result score $MilliSecond Temporary in the_end run worldborder get

execute if score $AwaitTime Global <= $MilliSecond Temporary run function debug:tps/init
execute if score $AwaitTime Global <= $MilliSecond Temporary as @a at @s run playsound entity.experience_orb.pickup master @s ~ ~ ~ 0.05 2

execute if score $AwaitTime Global > $MilliSecond Temporary run function debug:tps/watch


text:
#> debug:tps/10
#
# TickPerSecを大体10に設定します
#
# @user
# @private

function debug:tps/init
scoreboard players set $AwaitTime Global 100


text:
#> debug:tps/3
#
# TickPerSecを大体3に設定します
#
# @user
# @private

function debug:tps/init
scoreboard players set $AwaitTime Global 333


text:
#> debug:tps/_index.d
# @private

#> TargetTickRate
# @within
#   core:tick/
#   debug:tps/**
#declare score_holder $AwaitTime


text:
#> debug:tps/4
#
# TickPerSecを大体4に設定します
#
# @user
# @private

function debug:tps/init
scoreboard players set $AwaitTime Global 250


text:
#> debug:tps/init
#
#
#
# @within function debug:tps/*

execute in the_end run worldborder set 1
execute in the_end run worldborder set 100000 100


text:
#> debug:tps/reset
#
# TickPerSecを元に戻します
#
# @user
# @private

scoreboard players reset $AwaitTime Global


text:
#> world_manager:force_difficulty
#
#
#
# @within function core:tick/

#> Val
# @private
#declare score_holder $Difficulty

# 難易度を取得する
    execute store result score $Difficulty Temporary run difficulty
# ピースフルの場合の変更処理
    execute if score $Difficulty Temporary matches 0 run tellraw @a [{"storage":"global","nbt":"Prefix.FAILED"},{"text":"難易度をピースフルにすることは出来ません。"}]
    execute if score $Difficulty Temporary matches 0 run tellraw @a [{"storage":"global","nbt":"Prefix.FAILED"},{"text":"難易度はイージーに変更されました。"}]
    execute if score $Difficulty Temporary matches 0 run difficulty easy
# リセット
    scoreboard players reset $Difficulty Temporary


text:
#> world_manager:gimmick/_index.d
# @private

#>
# @within world_manager:gimmick/**
#declare storage world_manager:gimmick

#> Tag
# @within world_manager:gimmick/shard_processor/**
    #alias entity ShardProcessor @e[type=glow_item_frame,tag=ShardProcessor,distance=..0.4,x=-34.0,y=21.5,z=-13.5,limit=1]
    #declare tag ShardProcessor
    #declare tag ShardProcessorModel


text:
#> world_manager:gimmick/return_to_overworld_portal/return_to_overworld
#
# 地上に帰る
#
# @within function world_manager:gimmick/return_to_overworld_portal/main

# エフェクト
    effect give @s blindness 2 0 true

# ワープ前でサウンド
    execute at @s run playsound entity.enderman.teleport block @a ~ ~ ~ 2 1

# 帰還(交易島テレポーター行き)
    execute in overworld run tp @s -15 21.00 -1 145 0

# ワープ先でもサウンド
    execute at @s run playsound entity.enderman.teleport block @a ~ ~ ~ 2 1


text:
#> world_manager:gimmick/return_to_overworld_portal/tick
#
#
#
# @within function world_manager:gimmick/

#> Tag
# @private
#declare tag EndReturnPortal

execute as @e[type=marker,tag=EndReturnPortal] at @s if entity @p[distance=..50] run function world_manager:gimmick/return_to_overworld_portal/main


text:
#> world_manager:gimmick/return_to_overworld_portal/main
#
#
#
# @within function world_manager:gimmick/return_to_overworld_portal/tick

# 見た目 その1
    particle electric_spark ^0 ^0.1 ^-1 0 0 0 0 1
    particle electric_spark ^0.30902 ^0.1 ^-0.95106 0 0 0 0 1
    particle electric_spark ^0.58779 ^0.1 ^-0.80902 0 0 0 0 1
    particle electric_spark ^0.80902 ^0.1 ^-0.58779 0 0 0 0 1
    particle electric_spark ^0.95106 ^0.1 ^-0.30902 0 0 0 0 1
    particle electric_spark ^1 ^0.1 ^0 0 0 0 0 1
    particle electric_spark ^0.95106 ^0.1 ^0.30902 0 0 0 0 1
    particle electric_spark ^0.80902 ^0.1 ^0.58779 0 0 0 0 1
    particle electric_spark ^0.58779 ^0.1 ^0.80902 0 0 0 0 1
    particle electric_spark ^0.30902 ^0.1 ^0.95106 0 0 0 0 1
    particle electric_spark ^0 ^0.1 ^1 0 0 0 0 1
    particle electric_spark ^-0.30902 ^0.1 ^0.95106 0 0 0 0 1
    particle electric_spark ^-0.58779 ^0.1 ^0.80902 0 0 0 0 1
    particle electric_spark ^-0.80902 ^0.1 ^0.58779 0 0 0 0 1
    particle electric_spark ^-0.95106 ^0.1 ^0.30902 0 0 0 0 1
    particle electric_spark ^-1 ^ ^0 0 0 0 0 1
    particle electric_spark ^-0.95106 ^0.1 ^-0.30902 0 0 0 0 1
    particle electric_spark ^-0.80902 ^0.1 ^-0.58779 0 0 0 0 1
    particle electric_spark ^-0.58779 ^0.1 ^-0.80902 0 0 0 0 1
    particle electric_spark ^-0.30902 ^0.1 ^-0.95106 0 0 0 0 1

# 見た目 その2
    particle dust 0.7 0 1 0.7 ~ ~0.5 ~ 0.5 1 0.5 0 10
    particle dragon_breath ~ ~0.5 ~ 0.5 1 0.5 0 2

# 効果音
    playsound block.beacon.ambient block @a ~ ~ ~ 0.5 1

# 中に入った人を飛ばす
    execute if entity @a[distance=..2] as @a[distance=..2] run function world_manager:gimmick/return_to_overworld_portal/return_to_overworld


text:
#> world_manager:gimmick/shard_processor/check_item/invalid
#
# シャード以外のアイテムが入ったときにはじき出す処理
#
# @within function world_manager:gimmick/shard_processor/check_item/

# 額縁の中身を消す
    data modify entity @s ItemRotation set value 0b
    item replace entity @s container.0 with air

# お返しする
    data modify storage world_manager:gimmick Items set value []
    data modify storage world_manager:gimmick Items append from storage world_manager:gimmick FrameData.Item
    data modify storage world_manager:gimmick Items[-1].Slot set value 0b
    data modify block 10000 0 10000 Items set from storage world_manager:gimmick Items
    loot spawn -33.8 21.5 -13.5 mine 10000 0 10000 debug_stick


text:
#> world_manager:gimmick/shard_processor/process/complete
#
#
#
# @within function world_manager:gimmick/shard_processor/process/

# 額縁のアイテムを消す
    data modify entity @s ItemRotation set value 0b
    item replace entity @s container.0 with air

# 神器を吐き出す
    execute store result storage api: Argument.Rarity int 1 run data get storage world_manager:gimmick FrameData.Item.tag.TSB.ShardRarity
    execute positioned -33.8 21.6 -13.8 run function api:artifact/spawn/from_rarity

# アマスタのモデルをリセットしてFixedを消す
    execute positioned ^ ^ ^-0.5 run item replace entity @e[type=armor_stand,sort=nearest,limit=1] armor.head with stick{CustomModelData:20113}
    data modify entity @s Fixed set value 0b

# VFX
    playsound minecraft:entity.chicken.egg block @a ~ ~ ~ 2 1
    playsound minecraft:block.note_block.bell block @a ~ ~ ~ 1.5 1
    particle dust 0.455 0.553 1 1 ~ ~-0.1 ~-0.3 0.25 0.25 0.25 0 10
    particle dust 0.871 0.545 1 1 ~ ~-0.1 ~-0.3 0.25 0.25 0.25 0 10
    particle item stick{CustomModelData:20093} ~ ~-0.1 ~-0.3 0 0 0 0.1 10


text:
#> world_manager:gimmick/shard_processor/process/model_modifier
#
#
#
# @within function world_manager:gimmick/shard_processor/process/

execute if score $Rotation Temporary matches 1 run item replace entity @s armor.head with stick{CustomModelData:20115}
execute if score $Rotation Temporary matches 2 run item replace entity @s armor.head with stick{CustomModelData:20116}
execute if score $Rotation Temporary matches 3 run item replace entity @s armor.head with stick{CustomModelData:20117}
execute if score $Rotation Temporary matches 4 run item replace entity @s armor.head with stick{CustomModelData:20118}
execute if score $Rotation Temporary matches 5 run item replace entity @s armor.head with stick{CustomModelData:20119}
execute if score $Rotation Temporary matches 6 run item replace entity @s armor.head with stick{CustomModelData:20120}
execute if score $Rotation Temporary matches 7 run item replace entity @s armor.head with stick{CustomModelData:20121}


text:
#> world_manager:gimmick/ending_portal/return_to_overworld
#
# 帰還処理
#
# @within function world_manager:gimmick/ending_portal/main
effect give @s blindness 2 0 true
execute at @s run playsound entity.enderman.teleport block @a ~ ~ ~ 2 1
execute in overworld run tp @s 3051 118 -512 -90 0
execute at @s run playsound entity.enderman.teleport block @a ~ ~ ~ 2 1


text:
#> world_manager:gimmick/ending_portal/tick
#
#
#
# @within function world_manager:gimmick/

execute as @e[type=marker,tag=BetaEndingPortal] at @s if entity @p[distance=..50] run function world_manager:gimmick/ending_portal/main


text:
#> world_manager:gimmick/ending_portal/open
#
# 初期スポーンに帰還するポータル
#
# @api

# 最初のやつをキル
    kill @e[type=marker,tag=BetaEndingPortal]

# 指定座標に召喚
    summon marker 100 107 2925 {Tags:["BetaEndingPortal"]}


text:
#> world_manager:gimmick/ending_portal/_index.d
#
#
#
# @within function world_manager:gimmick/ending_portal/**

#declare tag BetaEndingPortal


text:
#> world_manager:gimmick/ending_portal/main
#
#
#
# @within function world_manager:gimmick/ending_portal/tick

# 見た目 その1
    particle electric_spark ^0 ^0.1 ^-1 0 0 0 0 1
    particle electric_spark ^0.30902 ^0.1 ^-0.95106 0 0 0 0 1
    particle electric_spark ^0.58779 ^0.1 ^-0.80902 0 0 0 0 1
    particle electric_spark ^0.80902 ^0.1 ^-0.58779 0 0 0 0 1
    particle electric_spark ^0.95106 ^0.1 ^-0.30902 0 0 0 0 1
    particle electric_spark ^1 ^0.1 ^0 0 0 0 0 1
    particle electric_spark ^0.95106 ^0.1 ^0.30902 0 0 0 0 1
    particle electric_spark ^0.80902 ^0.1 ^0.58779 0 0 0 0 1
    particle electric_spark ^0.58779 ^0.1 ^0.80902 0 0 0 0 1
    particle electric_spark ^0.30902 ^0.1 ^0.95106 0 0 0 0 1
    particle electric_spark ^0 ^0.1 ^1 0 0 0 0 1
    particle electric_spark ^-0.30902 ^0.1 ^0.95106 0 0 0 0 1
    particle electric_spark ^-0.58779 ^0.1 ^0.80902 0 0 0 0 1
    particle electric_spark ^-0.80902 ^0.1 ^0.58779 0 0 0 0 1
    particle electric_spark ^-0.95106 ^0.1 ^0.30902 0 0 0 0 1
    particle electric_spark ^-1 ^ ^0 0 0 0 0 1
    particle electric_spark ^-0.95106 ^0.1 ^-0.30902 0 0 0 0 1
    particle electric_spark ^-0.80902 ^0.1 ^-0.58779 0 0 0 0 1
    particle electric_spark ^-0.58779 ^0.1 ^-0.80902 0 0 0 0 1
    particle electric_spark ^-0.30902 ^0.1 ^-0.95106 0 0 0 0 1

# 見た目 その2
    particle dust 0.7 0 1 0.7 ~ ~0.5 ~ 0.5 1 0.5 0 10
    particle dragon_breath ~ ~0.5 ~ 0.5 1 0.5 0 2

# 効果音
    playsound block.beacon.ambient block @a ~ ~ ~ 0.5 1

# 中に入った人を飛ばす
    execute if entity @a[distance=..2] as @a[distance=..2] run function world_manager:gimmick/ending_portal/return_to_overworld


text:
#> world_manager:area/01-12.rumor_temple
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 12
# 神殿の処理
    execute unless score @s InSubArea matches 12 run function player_manager:god/rumor/in_temple


text:
#> world_manager:area/01-99.world-spawn
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 99
# チュートリアル完了済フラグが付いていたらTPする
    execute if entity @s[tag=TutorialEnded] run tp 23.5 3.5 24.5
# 初期スポーンだと方向指定が効かないので無理やり回転させる
    execute unless score @s InSubArea matches 99 if entity @s[tag=!TutorialEnded] run tp @s ~ ~ ~ 270 0


text:
#> world_manager:area/01-13.urban_temple
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 13
# 神殿の処理
    execute unless score @s InSubArea matches 13 run function player_manager:god/urban/in_temple


text:
#> world_manager:area/01-10.flora_temple
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 10
# 神殿の処理
    execute unless score @s InSubArea matches 10 run function player_manager:god/flora/in_temple


text:
#> world_manager:area/01-02.tutorial-island
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag2

# エリアセット
    scoreboard players set $NextInSubArea Temporary 02
# メッセージ
    execute unless entity @s[tag=TutorialFlag2] run function lib:message/tutorial/island
# 二度と表示されなくする
    tag @s add TutorialFlag2


text:
#> world_manager:area/01-07.tutorial-recommend
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag7

# エリアセット
    scoreboard players set $NextInSubArea Temporary 07
# メッセージ
    execute unless entity @s[tag=TutorialFlag7] run function lib:message/tutorial/recommend
# 盲目
    effect give @s blindness 30 0 true
# 二度と表示されなくする
    tag @s add TutorialFlag7


text:
#> world_manager:area/01-05.tutorial-spawner
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag5

# エリアセット
    scoreboard players set $NextInSubArea Temporary 05
# メッセージ
    execute unless entity @s[tag=TutorialFlag5] run function lib:message/tutorial/spawner
# 二度と表示されなくする
    tag @s add TutorialFlag5


text:
#> world_manager:area/01-03.tutorial-artifact
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag3

# エリアセット
    scoreboard players set $NextInSubArea Temporary 03
# メッセージ
    execute unless entity @s[tag=TutorialFlag3] run function lib:message/tutorial/artifact
# 二度と表示されなくする
    tag @s add TutorialFlag3


text:
#> world_manager:area/01-11.nyaptov_temple
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 11
# 神殿の処理
    execute unless score @s InSubArea matches 11 run function player_manager:god/nyaptov/in_temple


text:
#> world_manager:area/02-01.shard_processor
#
#
#
# @within function world_manager:area/02.islands/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 01


text:
#> world_manager:area/04-03.end_forgotten_star_higher
#
#
#
# @within function world_manager:area/04.end/on_tick

#> Val
# @private
#declare tag InLava

# エリアセット
    scoreboard players set $NextInSubArea Temporary 02

# 溶岩に入ったら死ぬほど痛いダメージを与える
    execute if block ~0.3 ~0.0 ~0.3 lava run tag @s add InLava
    execute if block ~0.3 ~0.0 ~-.3 lava run tag @s add InLava
    execute if block ~-.3 ~0.0 ~0.3 lava run tag @s add InLava
    execute if block ~-.3 ~0.0 ~-.3 lava run tag @s add InLava
    execute if block ~0.3 ~1.8 ~0.3 lava run tag @s add InLava
    execute if block ~0.3 ~1.8 ~-.3 lava run tag @s add InLava
    execute if block ~-.3 ~1.8 ~0.3 lava run tag @s add InLava
    execute if block ~-.3 ~1.8 ~-.3 lava run tag @s add InLava
# おおよそ2秒で死ぬようにする
    data modify storage lib: Argument.Damage set value 3
    data modify storage lib: Argument.AttackType set value "Magic"
    data modify storage lib: Argument.FixedDamage set value true
# デスログ
    data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは溶岩の温度を甘く見ていた","with":[{"selector":"@s"}]}]'
    data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは溶けた","with":[{"selector":"@s"}]}]'
# ダメージ (スペクテイターだろうがダメージを食らうようにする)
    execute if entity @s[gamemode=!creative,tag=InLava] run function lib:damage/
    function lib:damage/reset
# リセット
    tag @s remove InLava


text:
#> world_manager:area/01-30.gate_island-lower
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 30
# 復帰エフェクト
    effect give @s levitation 1 7 true


text:
#> world_manager:area/01-06.tutorial-lost_items
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag6

# エリアセット
    scoreboard players set $NextInSubArea Temporary 06
# メッセージ
    execute unless entity @s[tag=TutorialFlag6] run function lib:message/tutorial/lost_items
# 二度と表示されなくする
    tag @s add TutorialFlag6


text:
#> world_manager:area/01-04.tutorial-religion
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag4

# エリアセット
    scoreboard players set $NextInSubArea Temporary 04
# メッセージ
    execute unless entity @s[tag=TutorialFlag4] run function lib:message/tutorial/religion
# 二度と表示されなくする
    tag @s add TutorialFlag4


text:
#> world_manager:area/01-01.tutorial-goal
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag1

# エリアセット
    scoreboard players set $NextInSubArea Temporary 01
# メッセージ
    execute unless entity @s[tag=TutorialFlag1] run function lib:message/tutorial/goal
# 二度と表示されなくする
    tag @s add TutorialFlag1


text:
#> world_manager:area/_index.d
# @private

#> Next
# @within world_manager:area/**
    #declare score_holder $NextInArea
    #declare score_holder $NextInSubArea

#> GodBoundaries Declares
# @within world_manager:area/01-*
    #declare tag TutorialEnded


text:
#> world_manager:area/04-01.end_mansion_void
#
#
#
# @within function world_manager:area/04.end/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 01
# 神殿の処理
    execute unless score @s InSubArea matches 01 run scoreboard players set $Set Lib 0
    execute unless score @s InSubArea matches 01 run function lib:score_to_health_wrapper/set


text:
#> world_manager:area/01-08.tutorial-tp_point
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

#> Once
# @private
#declare tag TutorialFlag8

# エリアセット
    scoreboard players set $NextInSubArea Temporary 08
# 盲目を1秒にする
    effect clear @s blindness
    effect give @s blindness 1 0 true
# 落下ダメージ無くそうね
    effect give @s slow_falling 1 0 true
# テレポート
    tp @s @s
    tp @s 23.5 3.5 24.5 180 ~
# チュートリアル完了済フラグ
    tag @s add TutorialEnded


text:
#> world_manager:area/01-98-world-spawn-higher
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 98
# 問答無用で初期リスへ飛ばす
    spawnpoint @s 4093 165 -468 270
    tp @s 4093 165 -468


text:
#> world_manager:area/01-14.wi-ki_temple
#
#
#
# @within function world_manager:area/01.god_boundaries/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 14
# 神殿の処理
    execute unless score @s InSubArea matches 14 run function player_manager:god/wi-ki/in_temple


text:
#> world_manager:area/04-02.end_forgotten_star_lower
#
#
#
# @within function world_manager:area/04.end/on_tick

# エリアセット
    scoreboard players set $NextInSubArea Temporary 02
# 神殿の処理
    execute if block ~ ~-0.2 ~ barrier run scoreboard players set $Set Lib 0
    execute if block ~ ~-0.2 ~ barrier run function lib:score_to_health_wrapper/set


text:
#> world_manager:area/03.nether/on_tick
#
#
#
# @within function world_manager:area/03.nether/

# メモ 島々のギミック処理とかを小さなサブエリアを作った上で書く


text:
#> world_manager:area/03.nether/on_entered
#
#
#
# @within function world_manager:area/03.nether/

# ゲームモードをアドベンチャーに
    gamemode adventure @s[gamemode=!creative]


text:
#> world_manager:area/02.islands/on_tick
#
#
#
# @within function world_manager:area/02.islands/

# シャード加工場
    execute if predicate world_manager:area/02-01.shard_processor run function world_manager:area/02-01.shard_processor


text:
#> world_manager:area/02.islands/on_entered
#
#
#
# @within function world_manager:area/02.islands/

# ゲームモードをサバイバルに
    gamemode survival @s[gamemode=!creative]


text:
#> world_manager:area/04.end/on_tick
#
#
#
# @within function world_manager:area/04.end/

# テレポーターの起動
    data modify storage api: Argument.ActivationState set value "Activate"
    function api:teleporter/set_activation_state/from_nearest
# 死ぬがよい
    execute if predicate world_manager:area/04-01.end_mansion_void run function world_manager:area/04-01.end_mansion_void
    execute if predicate world_manager:area/04-02.end_forgotten_star_lower run function world_manager:area/04-02.end_forgotten_star_lower
    execute if predicate world_manager:area/04-03.end_forgotten_star_higher run function world_manager:area/04-03.end_forgotten_star_higher
# エンドラが沸いてる可能性があるのでさよならしようね
    kill @e[type=ender_dragon]


text:
#> world_manager:area/04.end/on_entered
#
#
#
# @within function world_manager:area/04.end/

# ゲームモードをアドベンチャーに
    gamemode adventure @s[gamemode=!creative]


text:
#> world_manager:area/01.god_boundaries/on_tick
#
#
#
# @within function world_manager:area/01.god_boundaries/

# 初期リス
    execute if predicate world_manager:area/01-98.world-spawn-higher run function world_manager:area/01-98-world-spawn-higher
    execute if predicate world_manager:area/01-99.world-spawn run function world_manager:area/01-99.world-spawn
# チュートリアル
    execute if predicate world_manager:area/01-01.tutorial-goal run function world_manager:area/01-01.tutorial-goal
    execute if predicate world_manager:area/01-02.tutorial-island run function world_manager:area/01-02.tutorial-island
    execute if predicate world_manager:area/01-03.tutorial-artifact run function world_manager:area/01-03.tutorial-artifact
    execute if predicate world_manager:area/01-04.tutorial-religion run function world_manager:area/01-04.tutorial-religion
    execute if predicate world_manager:area/01-05.tutorial-spawner run function world_manager:area/01-05.tutorial-spawner
    execute if predicate world_manager:area/01-06.tutorial-lost_items run function world_manager:area/01-06.tutorial-lost_items
    execute if predicate world_manager:area/01-07.tutorial-recommend run function world_manager:area/01-07.tutorial-recommend
    execute if predicate world_manager:area/01-08.tutorial-tp_point run function world_manager:area/01-08.tutorial-tp_point
# 神殿
    execute if predicate world_manager:area/01-10.flora_temple run function world_manager:area/01-10.flora_temple
    execute if predicate world_manager:area/01-11.nyaptov_temple run function world_manager:area/01-11.nyaptov_temple
    execute if predicate world_manager:area/01-12.rumor_temple run function world_manager:area/01-12.rumor_temple
    execute if predicate world_manager:area/01-13.urban_temple run function world_manager:area/01-13.urban_temple
    execute if predicate world_manager:area/01-14.wi-ki_temple run function world_manager:area/01-14.wi-ki_temple
# ゲート島
    execute if predicate world_manager:area/01-30.gate_island-lower run function world_manager:area/01-30.gate_island-lower


text:
#> world_manager:area/01.god_boundaries/on_entered
#
#
#
# @within function world_manager:area/01.god_boundaries/

# ゲームモードをアドベンチャーに
    gamemode adventure @s[gamemode=!creative]


text:
#> world_manager:chunk_io_protect/check_dimension
#
#
#
# @within function world_manager:chunk_io_protect/

#> Val
# @private
#declare score_holder $isDimensionChanged

# ディメンションを取得する
    function api:data_get/dimension
# EntityStorageを呼び出す
    function oh_my_dat:please
# 1tick前のデータと比較しつつ、データを退避する
    execute store success score $isDimensionChanged Temporary run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Stash.Dimension set from storage api: Dimension
# ディメンションが変わっている場合はタグを付与する
    execute if score $isDimensionChanged Temporary matches 1 run tag @s add IsNeedsUpdate
# リセット
    scoreboard players reset $isDimensionChanged Temporary


text:
#> world_manager:chunk_io_protect/check_move
#
#
#
# @within function world_manager:chunk_io_protect/

#> Val
# @private
    #declare score_holder $X e1
    #declare score_holder $Y e1
    #declare score_holder $Z e1
    #declare score_holder $SquaredDistance e2

# プレイヤーのベクトルを取得する
    function api:player_vector/get
    execute store result score $X Temporary run data get storage api: Return.Vector[0] 10
    execute store result score $Y Temporary run data get storage api: Return.Vector[1] 10
    execute store result score $Z Temporary run data get storage api: Return.Vector[2] 10
# 各成分を二乗する e1 -> e2
    scoreboard players operation $X Temporary *= $X Temporary
    scoreboard players operation $Y Temporary *= $Y Temporary
    scoreboard players operation $Z Temporary *= $Z Temporary
# 距離の二乗を計算する
    scoreboard players operation $SquaredDistance Temporary = $X Temporary
    scoreboard players operation $SquaredDistance Temporary += $Y Temporary
    scoreboard players operation $SquaredDistance Temporary += $Z Temporary
# 約4.5m/t(90m/s)以上で動いている場合はタグを付与する (4.5^2 ≒ 2000 (e2))
    execute if score $SquaredDistance Temporary > $2000 Const run tag @s add IsNeedsUpdate
# リセット
    scoreboard players reset $X Temporary
    scoreboard players reset $Y Temporary
    scoreboard players reset $Z Temporary
    scoreboard players reset $SquaredDistance Temporary


text:
#> world_manager:chunk_io_protect/update_load_waiting_time
#
#
#
# @within function core:handler/join

scoreboard players set @s ChunkLoadWaitingTime 160


text:
#> world_manager:chunk_io_protect/_index.d
# @private

#> Val
# @within world_manager:chunk_io_protect/*
#declare tag IsNeedsUpdate


text:
# NaturalMergeSort
Efficient Sort of Integer Lists in Minecraft JE 1.16+
整数リストの動作の軽いソート

# 使い方/How To Use

```mcfunction
data modify storage natural_merge_sort: List set value [3,8,1,2,10,5,6,2,9,1,5,4,7]
function natural_merge_sort:ascend
data get storage natural_merge_sort: List
# => [1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10]

function natural_merge_sort:descend
data get storage natural_merge_sort: List
# => [10, 9, 8, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1]
```

# 連絡はこちら/Contact

https://twitter.com/AiAkaishi

# ライセンス/LICENSE

These codes are released under the MIT License, see LICENSE.


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:ascend
# 渡された数値配列を、昇順にソートします。
# Sort the specified int list in ascending order.
# @api
# @input storage natural_merge_sort: List
#   ソートする数値配列 / the int list to sort

function natural_merge_sort:sys/sort
execute unless data storage natural_merge_sort: ListAsc[0] run function natural_merge_sort:sys/ascend
data modify storage lib: Array set from storage natural_merge_sort: ListAsc[0]
# リセット
    scoreboard players reset $Value1 Temporary
    scoreboard players reset $Value2 Temporary


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:descend
# 渡された数値配列を、降順にソートします。
# Sort the specified int list in descending order.
# @api
# @input storage natural_merge_sort: List
#   ソートする数値配列 / the int list to sort

function natural_merge_sort:sys/sort
execute unless data storage natural_merge_sort: ListDesc[0] run function natural_merge_sort:sys/descend
data modify storage lib: Array set from storage natural_merge_sort: ListDesc[0]
# リセット
    scoreboard players reset $Value1 Temporary
    scoreboard players reset $Value2 Temporary


text:
#> natural_merge_sort:_index.d
# @private

#> 数値配列操作用ストレージ
# Storage for sorting operation.
# @within function lib:array/sort_*
# @internal
    #declare storage natural_merge_sort:

#> 計算用ScoreHolder
# @internal
    #declare score_holder $Value1
    #declare score_holder $Value2


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/sort
# ナチュラルマージソートします。
# Sort by Natural Merge Sort.
# @within
#   natural_merge_sort:*
# @input storage natural_merge_sort: List
#   ソートする数値配列 / the int list to sort

data modify storage natural_merge_sort: ListDesc set value []
scoreboard players set $Value2 Temporary -2147483648
execute if data storage lib: Array[0] run function natural_merge_sort:sys/setup
function natural_merge_sort:sys/ascend


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/setup
# ソートする配列をListDescに設定します。
# Set the list to sort to ListDesc.
# @within
#   natural_merge_sort:sys/setup
#   natural_merge_sort:sys/sort

execute store result score $Value1 Temporary run data get storage lib: Array[-1]
execute if score $Value2 Temporary < $Value1 Temporary run data modify storage natural_merge_sort: ListDesc append value []
data modify storage natural_merge_sort: ListDesc[-1] append value 0
execute store result storage natural_merge_sort: ListDesc[-1][-1] int 1 run scoreboard players operation $Value2 Temporary = $Value1 Temporary
data remove storage lib: Array[-1]
execute if data storage lib: Array[0] run function natural_merge_sort:sys/setup


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/ascend
# 昇順を保つようにマージする。
# Merge in ascending order.
# @within
#   natural_merge_sort:ascend
#   natural_merge_sort:sys/descend
#   natural_merge_sort:sys/sort

execute store result score $Value1 Temporary run data get storage natural_merge_sort: ListDesc[-1][-1]
execute store result score $Value2 Temporary run data get storage natural_merge_sort: ListDesc[-2][-1]
execute unless data storage natural_merge_sort: ListDesc[-2][-1] run scoreboard players set $Value2 Temporary 2147483647
data modify storage natural_merge_sort: ListAsc set value [[]]
function natural_merge_sort:sys/ascend/loop
execute if data storage natural_merge_sort: ListAsc[1] run function natural_merge_sort:sys/descend


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/descend
# 降順を保つようにマージする。
# Merge in descending order.
# @within
#   natural_merge_sort:descend
#   natural_merge_sort:sys/ascend
#   natural_merge_sort:sys/sort

execute store result score $Value1 Temporary run data get storage natural_merge_sort: ListAsc[-1][-1]
execute store result score $Value2 Temporary run data get storage natural_merge_sort: ListAsc[-2][-1]
execute unless data storage natural_merge_sort: ListAsc[-2][-1] run scoreboard players set $Value2 Temporary -2147483648
data modify storage natural_merge_sort: ListDesc set value [[]]
function natural_merge_sort:sys/descend/loop
execute if data storage natural_merge_sort: ListDesc[1] run function natural_merge_sort:sys/ascend


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/descend/shift
# @within
#   natural_merge_sort:sys/descend/loop

data remove storage natural_merge_sort: ListAsc[-1]
data remove storage natural_merge_sort: ListAsc[-1]
execute if data storage natural_merge_sort: ListAsc[-1][-1] store result score $Value1 Temporary run data get storage natural_merge_sort: ListAsc[-1][-1]
execute if data storage natural_merge_sort: ListAsc[-2][-1] store result score $Value2 Temporary run data get storage natural_merge_sort: ListAsc[-2][-1]
execute if data storage natural_merge_sort: ListAsc[0] run data modify storage natural_merge_sort: ListDesc append value []


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/descend/take2
# @within
#   natural_merge_sort:sys/descend/loop

data modify storage natural_merge_sort: ListDesc[-1] append from storage natural_merge_sort: ListAsc[-2][-1]
data remove storage natural_merge_sort: ListAsc[-2][-1]
execute store result score $Value2 Temporary run data get storage natural_merge_sort: ListAsc[-2][-1]
execute unless data storage natural_merge_sort: ListAsc[-2][-1] run scoreboard players set $Value2 Temporary -2147483648


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/descend/loop
# @within
#   natural_merge_sort:sys/descend
#   natural_merge_sort:sys/descend/loop

execute if score $Value1 Temporary >= $Value2 Temporary run function natural_merge_sort:sys/descend/take1
execute if score $Value2 Temporary >= $Value1 Temporary run function natural_merge_sort:sys/descend/take2
execute unless data storage natural_merge_sort: ListAsc[-1][-1] unless data storage natural_merge_sort: ListAsc[-2][-1] run function natural_merge_sort:sys/descend/shift
execute if data storage natural_merge_sort: ListAsc[0] run function natural_merge_sort:sys/descend/loop


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/descend/take1
# @within
#   natural_merge_sort:sys/descend/loop

data modify storage natural_merge_sort: ListDesc[-1] append from storage natural_merge_sort: ListAsc[-1][-1]
data remove storage natural_merge_sort: ListAsc[-1][-1]
execute store result score $Value1 Temporary run data get storage natural_merge_sort: ListAsc[-1][-1]
execute unless data storage natural_merge_sort: ListAsc[-1][-1] run scoreboard players set $Value1 Temporary -2147483648


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/ascend/shift
# @within
#   natural_merge_sort:sys/ascend/loop

data remove storage natural_merge_sort: ListDesc[-1]
data remove storage natural_merge_sort: ListDesc[-1]
execute if data storage natural_merge_sort: ListDesc[-1][-1] store result score $Value1 Temporary run data get storage natural_merge_sort: ListDesc[-1][-1]
execute if data storage natural_merge_sort: ListDesc[-2][-1] store result score $Value2 Temporary run data get storage natural_merge_sort: ListDesc[-2][-1]
execute if data storage natural_merge_sort: ListDesc[0] run data modify storage natural_merge_sort: ListAsc append value []


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/ascend/take2
# @within
#   natural_merge_sort:sys/ascend/loop

data modify storage natural_merge_sort: ListAsc[-1] append from storage natural_merge_sort: ListDesc[-2][-1]
data remove storage natural_merge_sort: ListDesc[-2][-1]
execute store result score $Value2 Temporary run data get storage natural_merge_sort: ListDesc[-2][-1]
execute unless data storage natural_merge_sort: ListDesc[-2][-1] run scoreboard players set $Value2 Temporary 2147483647


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/ascend/loop
# @within
#   natural_merge_sort:sys/ascend
#   natural_merge_sort:sys/ascend/loop

execute if score $Value1 Temporary <= $Value2 Temporary run function natural_merge_sort:sys/ascend/take1
execute if score $Value2 Temporary <= $Value1 Temporary run function natural_merge_sort:sys/ascend/take2
execute unless data storage natural_merge_sort: ListDesc[-1][-1] unless data storage natural_merge_sort: ListDesc[-2][-1] run function natural_merge_sort:sys/ascend/shift
execute if data storage natural_merge_sort: ListDesc[0] run function natural_merge_sort:sys/ascend/loop


text:
### Copyright © 2020 赤石愛
### This software is released under the MIT License, see LICENSE.

#> natural_merge_sort:sys/ascend/take1
# @within
#   natural_merge_sort:sys/ascend/loop

data modify storage natural_merge_sort: ListAsc[-1] append from storage natural_merge_sort: ListDesc[-1][-1]
data remove storage natural_merge_sort: ListDesc[-1][-1]
execute store result score $Value1 Temporary run data get storage natural_merge_sort: ListDesc[-1][-1]
execute unless data storage natural_merge_sort: ListDesc[-1][-1] run scoreboard players set $Value1 Temporary 2147483647


text:
#> asset:island/19/register/register
#
# 島の定義データ
#
# @within function asset:island/19/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-100,Y:35,Z:140}

# ID (int)
    data modify storage asset:island ID set value 19
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/08/register/register
#
# 島の定義データ
#
# @within function asset:island/08/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-32,Y:21,Z:72}

# ID (int)
    data modify storage asset:island ID set value 8
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/05/register/register
#
# 島の定義データ
#
# @within function asset:island/05/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-41,Y:37,Z:-92}

# ID (int)
    data modify storage asset:island ID set value 5
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/09/register/register
#
# 島の定義データ
#
# @within function asset:island/09/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:4,Y:19,Z:83}

# ID (int)
    data modify storage asset:island ID set value 9
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/32/register/register
#
# 島の定義データ
#
# @within function asset:island/32/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:103,Y:117,Z:-104}

# ID (int)
    data modify storage asset:island ID set value 32
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 237

function asset:island/common/register


text:
#> asset:island/26/register/register
#
# 島の定義データ
#
# @within function asset:island/26/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-82,Y:212,Z:256}

# ID (int)
    data modify storage asset:island ID set value 26
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/23/register/register
#
# 島の定義データ
#
# @within function asset:island/23/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:416,Y:160,Z:130}

# ID (int)
    data modify storage asset:island ID set value 23
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 175

function asset:island/common/register


text:
#> asset:island/33/register/register
#
# 島の定義データ
#
# @within function asset:island/33/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:339,Y:28,Z:-80}

# ID (int)
    data modify storage asset:island ID set value 33
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 104

function asset:island/common/register


text:
#> asset:island/10/register/register
#
# 島の定義データ
#
# @within function asset:island/10/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:23,Y:5,Z:65}

# ID (int)
    data modify storage asset:island ID set value 10
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/44/register/register
#
# 島の定義データ
#
# @within function asset:island/44/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-107,Y:104,Z:55}

# ID (int)
    data modify storage asset:island ID set value 44
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/42/register/register
#
# 島の定義データ
#
# @within function asset:island/42/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-199,Y:69,Z:20}

# ID (int)
    data modify storage asset:island ID set value 42
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/34/register/register
#
# 島の定義データ
#
# @within function asset:island/34/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:23,Y:131,Z:-73}

# ID (int)
    data modify storage asset:island ID set value 34
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/25/register/register
#
# 島の定義データ
#
# @within function asset:island/25/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:23,Y:4,Z:255}

# ID (int)
    data modify storage asset:island ID set value 25
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/20/register/register
#
# 島の定義データ
#
# @within function asset:island/20/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:30,Y:7,Z:155}

# ID (int)
    data modify storage asset:island ID set value 20
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 59

function asset:island/common/register


text:
#> asset:island/55/register/register
#
# 島の定義データ
#
# @within function asset:island/55/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:the_nether,X:3,Y:73,Z:128}

# ID (int)
    data modify storage asset:island ID set value 55
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 22

function asset:island/common/register


text:
#> asset:island/22/register/register
#
# 島の定義データ
#
# @within function asset:island/22/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:213,Y:8,Z:112}

# ID (int)
    data modify storage asset:island ID set value 22
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/04/register/register
#
# 島の定義データ
#
# @within function asset:island/04/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-34,Y:9,Z:42}

# ID (int)
    data modify storage asset:island ID set value 4
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/46/register/register
#
# 島の定義データ
#
# @within function asset:island/46/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-208,Y:59,Z:233}

# ID (int)
    data modify storage asset:island ID set value 46
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 120

function asset:island/common/register


text:
#> asset:island/53/register/register
#
# 島の定義データ
#
# @within function asset:island/53/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-102,Y:223,Z:-46}

# ID (int)
    data modify storage asset:island ID set value 53
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/18/register/register
#
# 島の定義データ
#
# @within function asset:island/18/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-58,Y:59,Z:134}

# ID (int)
    data modify storage asset:island ID set value 18
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/07/register/register
#
# 島の定義データ
#
# @within function asset:island/07/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-129,Y:35,Z:79}

# ID (int)
    data modify storage asset:island ID set value 7
# Rotation (float)
    data modify storage asset:island Rotation set value 90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/40/register/register
#
# 島の定義データ
#
# @within function asset:island/40/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-146,Y:106,Z:-110}

# ID (int)
    data modify storage asset:island ID set value 40
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 129

function asset:island/common/register


text:
#> asset:island/50/register/register
#
# 島の定義データ
#
# @within function asset:island/50/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-70,Y:156,Z:140}

# ID (int)
    data modify storage asset:island ID set value 50
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/43/register/register
#
# 島の定義データ
#
# @within function asset:island/43/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-188,Y:104,Z:99}

# ID (int)
    data modify storage asset:island ID set value 43
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 131

function asset:island/common/register


text:
#> asset:island/13/register/register
#
# 島の定義データ
#
# @within function asset:island/13/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:182,Y:9,Z:-38}

# ID (int)
    data modify storage asset:island ID set value 13
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 55

function asset:island/common/register


text:
#> asset:island/36/register/register
#
# 島の定義データ
#
# @within function asset:island/36/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:175,Y:88,Z:-105}

# ID (int)
    data modify storage asset:island ID set value 36
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/48/register/register
#
# 島の定義データ
#
# @within function asset:island/48/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:22,Y:168,Z:405}

# ID (int)
    data modify storage asset:island ID set value 48
# Rotation (float)
    data modify storage asset:island Rotation set value 180f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 216

function asset:island/common/register


text:
#> asset:island/37/register/register
#
# 島の定義データ
#
# @within function asset:island/37/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-52,Y:139,Z:-177}

# ID (int)
    data modify storage asset:island ID set value 37
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    data modify storage asset:island BossID set value 185

function asset:island/common/register


text:
#> asset:island/51/register/register
#
# 島の定義データ
#
# @within function asset:island/51/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:-71,Y:45,Z:-31}

# ID (int)
    data modify storage asset:island ID set value 51
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/52/register/register
#
# 島の定義データ
#
# @within function asset:island/52/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:253,Y:170,Z:124}

# ID (int)
    data modify storage asset:island ID set value 52
# Rotation (float)
    data modify storage asset:island Rotation set value -90f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register


text:
#> asset:island/35/register/register
#
# 島の定義データ
#
# @within function asset:island/35/register/

# 重複防止レジストリへの登録
    data modify storage asset:island DPR append value {D:overworld,X:36,Y:77,Z:-165}

# ID (int)
    data modify storage asset:island ID set value 35
# Rotation (float)
    data modify storage asset:island Rotation set value 0f
# BOSS ID (int) (Optional)
    # data modify storage asset:island BossID set value

function asset:island/common/register