diff --git a/data/fz/advancements/game_event/on_entered_nether_portal.json b/data/fz/advancements/game_event/on_entered_nether_portal.json new file mode 100644 index 0000000..d804bbd --- /dev/null +++ b/data/fz/advancements/game_event/on_entered_nether_portal.json @@ -0,0 +1,21 @@ +{ + "criteria": { + "on_entered_nether_portal": { + "trigger": "minecraft:changed_dimension", + "conditions": { + "player": { + "location": { + "block": { + "blocks": [ + "minecraft:nether_portal" + ] + } + } + } + } + } + }, + "rewards": { + "function": "fz:game_event/player/on_entered_nether_portal" + } +} \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension.mcfunction b/data/fz/functions/api/get_dimension.mcfunction deleted file mode 100644 index 914ce42..0000000 --- a/data/fz/functions/api/get_dimension.mcfunction +++ /dev/null @@ -1,2 +0,0 @@ -data modify storage fz:global fz.cache.dimension.id set from entity @s Dimension -data modify storage fz:global fz.cache.dimension.name set value '{"nbt": "fz.cache.dimension.id", "storage": "fz:global"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension_name/default.mcfunction b/data/fz/functions/api/get_dimension_name/default.mcfunction new file mode 100644 index 0000000..9974fe1 --- /dev/null +++ b/data/fz/functions/api/get_dimension_name/default.mcfunction @@ -0,0 +1 @@ +data modify storage fz:global fz.api.dimension.name set value '{"nbt": "fz.cache.dimension.id", "storage": "fz:global"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension_name/minecraft/overworld.mcfunction b/data/fz/functions/api/get_dimension_name/minecraft/overworld.mcfunction new file mode 100644 index 0000000..d58fe61 --- /dev/null +++ b/data/fz/functions/api/get_dimension_name/minecraft/overworld.mcfunction @@ -0,0 +1 @@ +execute if data storage fz:global fz.api.dimension{id:'minecraft:overworld'} run data modify storage fz:global fz.api.dimension.name set value '{"text": "主世界", "color": "dark_green"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension_name/minecraft/the_end.mcfunction b/data/fz/functions/api/get_dimension_name/minecraft/the_end.mcfunction new file mode 100644 index 0000000..0536e08 --- /dev/null +++ b/data/fz/functions/api/get_dimension_name/minecraft/the_end.mcfunction @@ -0,0 +1 @@ +execute if data storage fz:global fz.api.dimension{id:'minecraft:the_end'} run data modify storage fz:global fz.api.dimension.name set value '{"text": "末地", "color": "dark_gray"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension_name/minecraft/the_nether.mcfunction b/data/fz/functions/api/get_dimension_name/minecraft/the_nether.mcfunction new file mode 100644 index 0000000..3b01312 --- /dev/null +++ b/data/fz/functions/api/get_dimension_name/minecraft/the_nether.mcfunction @@ -0,0 +1 @@ +execute if data storage fz:global fz.api.dimension{id:'minecraft:the_nether'} run data modify storage fz:global fz.api.dimension.name set value '{"text": "下界", "color": "dark_red"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension_name/overworld.mcfunction b/data/fz/functions/api/get_dimension_name/overworld.mcfunction deleted file mode 100644 index 55549e6..0000000 --- a/data/fz/functions/api/get_dimension_name/overworld.mcfunction +++ /dev/null @@ -1 +0,0 @@ -execute if data storage fz:global fz.cache.dimension{id:'minecraft:overworld'} run data modify storage fz:global fz.cache.dimension.name set value '{"text": "主世界", "color": "dark_green"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_dimension_name/the_nether.mcfunction b/data/fz/functions/api/get_dimension_name/the_nether.mcfunction deleted file mode 100644 index 0ce4a5e..0000000 --- a/data/fz/functions/api/get_dimension_name/the_nether.mcfunction +++ /dev/null @@ -1 +0,0 @@ -execute if data storage fz:global fz.cache.dimension{id:'minecraft:the_nether'} run data modify storage fz:global fz.cache.dimension.name set value '{"text": "下届", "color": "dark_red"}' \ No newline at end of file diff --git a/data/fz/functions/api/get_player_dimension.mcfunction b/data/fz/functions/api/get_player_dimension.mcfunction new file mode 100644 index 0000000..b83a0ef --- /dev/null +++ b/data/fz/functions/api/get_player_dimension.mcfunction @@ -0,0 +1,2 @@ +data modify storage fz:global fz.api.dimension.id set from entity @s Dimension +data remove storage fz:global fz.api.dimension.name \ No newline at end of file diff --git a/data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction b/data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction index 2fba5ac..3d81a31 100644 --- a/data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction +++ b/data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction @@ -1,7 +1,7 @@ # 调用者:advancements/fz:~ ## 详细 -execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "飞行了1m"}] +execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "飞行了1m"}] ## 将事件数据缓存,并重置事件计分板 scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.aviating_distance diff --git a/data/fz/functions/game_event/player/on_entered_nether_portal.mcfunction b/data/fz/functions/game_event/player/on_entered_nether_portal.mcfunction new file mode 100644 index 0000000..88a584d --- /dev/null +++ b/data/fz/functions/game_event/player/on_entered_nether_portal.mcfunction @@ -0,0 +1,6 @@ +## 调试 +execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "进入了下届传送门"}] + +function #fz:game_event/player/on_entered_nether_portal + +advancement revoke @s only fz:game_event/on_entered_nether_portal \ No newline at end of file diff --git a/data/fz/functions/game_event/player/on_used_tool.mcfunction b/data/fz/functions/game_event/player/on_used_tool.mcfunction index 9478e05..841079f 100644 --- a/data/fz/functions/game_event/player/on_used_tool.mcfunction +++ b/data/fz/functions/game_event/player/on_used_tool.mcfunction @@ -1,7 +1,7 @@ # 调用者:advancements/fz:~ ## 详细 -execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}] +execute if score fz.logger.level fz.variable.integer matches ..300 run tellraw @a [{"nbt": "fz.level.fine", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "使用了工具"}] ## 运行事件 function #fz:game_event/player/on_used_tool diff --git a/data/fz/functions/module/here/get_dimension_message/if_overworld.mcfunction b/data/fz/functions/module/here/get_dimension_message/if_overworld.mcfunction index 3bf1308..a8bab56 100644 --- a/data/fz/functions/module/here/get_dimension_message/if_overworld.mcfunction +++ b/data/fz/functions/module/here/get_dimension_message/if_overworld.mcfunction @@ -1,5 +1,6 @@ -data modify storage fz:here fz.cache.nether_pos set value [0, 0] -execute store result storage fz:here fz.cache.nether_pos[0] int 0.125 run data get entity @s Pos[0] -execute store result storage fz:here fz.cache.nether_pos[1] int 0.125 run data get entity @s Pos[2] - -data modify storage fz:here fz.cache.message[2] set value '[{"text": ",对应", "color": "white"}, {"text": "下届", "color": "dark_red"}, {"text": ":"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.nether_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.nether_pos[1]", "storage": "fz:here"}, {"text": "]"}]]' \ No newline at end of file +data modify storage fz:here fz.nether_pos set value [0, 0] +execute store result storage fz:here fz.nether_pos[0] int 0.125 run data get entity @s Pos[0] +execute store result storage fz:here fz.nether_pos[1] int 0.125 run data get entity @s Pos[2] +data modify storage fz:global fz.api.dimension.id set value "minecraft:the_nether" +function #fz:api/get_dimension_name +data modify storage fz:here fz.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.nether_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.nether_pos[1]", "storage": "fz:here"}, {"text": "]"}]]' \ No newline at end of file diff --git a/data/fz/functions/module/here/get_dimension_message/if_the_nether.mcfunction b/data/fz/functions/module/here/get_dimension_message/if_the_nether.mcfunction index b84480a..8499358 100644 --- a/data/fz/functions/module/here/get_dimension_message/if_the_nether.mcfunction +++ b/data/fz/functions/module/here/get_dimension_message/if_the_nether.mcfunction @@ -1,5 +1,6 @@ -data modify storage fz:here fz.cache.overworld_pos set value [0, 0] -execute store result storage fz:here fz.cache.overworld_pos[0] int 8 run data get entity @s Pos[0] -execute store result storage fz:here fz.cache.overworld_pos[1] int 8 run data get entity @s Pos[2] - -data modify storage fz:here fz.cache.message[2] set value '[{"text": ",对应", "color": "white"}, {"text": "主世界", "color": "dark_green"}, {"text": ":"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.overworld_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.overworld_pos[1]", "storage": "fz:here"}, {"text": "]"}]]' \ No newline at end of file +data modify storage fz:here fz.overworld_pos set value [0, 0] +execute store result storage fz:here fz.overworld_pos[0] int 8 run data get entity @s Pos[0] +execute store result storage fz:here fz.overworld_pos[1] int 8 run data get entity @s Pos[2] +data modify storage fz:global fz.api.dimension.id set value "minecraft:overworld" +function #fz:api/get_dimension_name +data modify storage fz:here fz.message[2] set value '[{"text": ",对应", "color": "white"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.overworld_pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.overworld_pos[1]", "storage": "fz:here"}, {"text": "]"}]]' \ No newline at end of file diff --git a/data/fz/functions/module/here/get_dimension_message/overworld.mcfunction b/data/fz/functions/module/here/get_dimension_message/overworld.mcfunction index 57c4362..9bf5a51 100644 --- a/data/fz/functions/module/here/get_dimension_message/overworld.mcfunction +++ b/data/fz/functions/module/here/get_dimension_message/overworld.mcfunction @@ -1 +1 @@ -execute if data storage fz:global fz.cache.dimension{id:"minecraft:overworld"} run function fz:module/here/get_dimension_message/if_overworld \ No newline at end of file +execute if data storage fz:global fz.api.dimension{id:"minecraft:overworld"} run function fz:module/here/get_dimension_message/if_overworld \ No newline at end of file diff --git a/data/fz/functions/module/here/get_dimension_message/the_nether.mcfunction b/data/fz/functions/module/here/get_dimension_message/the_nether.mcfunction index 5926bee..d7c517e 100644 --- a/data/fz/functions/module/here/get_dimension_message/the_nether.mcfunction +++ b/data/fz/functions/module/here/get_dimension_message/the_nether.mcfunction @@ -1 +1 @@ -execute if data storage fz:global fz.cache.dimension{id:"minecraft:the_nether"} run function fz:module/here/get_dimension_message/if_the_nether \ No newline at end of file +execute if data storage fz:global fz.api.dimension{id:"minecraft:the_nether"} run function fz:module/here/get_dimension_message/if_the_nether \ No newline at end of file diff --git a/data/fz/functions/module/here/get_message.mcfunction b/data/fz/functions/module/here/get_message.mcfunction index 17b9a03..65e528a 100644 --- a/data/fz/functions/module/here/get_message.mcfunction +++ b/data/fz/functions/module/here/get_message.mcfunction @@ -1,8 +1,10 @@ ## fz.cache.pos已在install中初始化 -execute store result storage fz:here fz.cache.pos[0] int 1 run data get entity @s Pos[0] -execute store result storage fz:here fz.cache.pos[1] int 1 run data get entity @s Pos[1] -execute store result storage fz:here fz.cache.pos[2] int 1 run data get entity @s Pos[2] -data modify storage fz:here fz.cache.message set value ['{"nbt": "fz.cache.dimension.name", "interpret": true, "storage": "fz:global"}', '[{"text": "[", "color": "green"}, {"nbt": "fz.cache.pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.pos[1]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.cache.pos[2]", "storage": "fz:here"}, {"text": "]"}]', ''] +execute store result storage fz:here fz.pos[0] int 1 run data get entity @s Pos[0] +execute store result storage fz:here fz.pos[1] int 1 run data get entity @s Pos[1] +execute store result storage fz:here fz.pos[2] int 1 run data get entity @s Pos[2] +data modify storage fz:here fz.message[0] set from storage fz:global fz.api.dimension.name +data modify storage fz:here fz.message[1] set value '[{"text": "[", "color": "green"}, {"nbt": "fz.pos[0]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.pos[1]", "storage": "fz:here"}, {"text": ", "}, {"nbt": "fz.pos[2]", "storage": "fz:here"}, {"text": "]"}]' +data modify storage fz:here fz.message[2] set value '' ## 调试 execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了位置信息"}] \ No newline at end of file diff --git a/data/fz/functions/module/here/global_message.mcfunction b/data/fz/functions/module/here/global_message.mcfunction index 4992e3d..5013a41 100644 --- a/data/fz/functions/module/here/global_message.mcfunction +++ b/data/fz/functions/module/here/global_message.mcfunction @@ -1 +1 @@ -tellraw @a [{"text": "", "color": "white"}, {"selector": "@s"}, {"text": "说:"}, {"text": "我在"}, {"nbt": "fz.cache.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[2]", "interpret": true, "storage": "fz:here"}] \ No newline at end of file +tellraw @a [{"text": "", "color": "white"}, {"selector": "@s"}, {"text": "说:"}, {"text": "我在"}, {"nbt": "fz.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[2]", "interpret": true, "storage": "fz:here"}] \ No newline at end of file diff --git a/data/fz/functions/module/here/install.mcfunction b/data/fz/functions/module/here/install.mcfunction index 576c60d..2337fdb 100644 --- a/data/fz/functions/module/here/install.mcfunction +++ b/data/fz/functions/module/here/install.mcfunction @@ -1,4 +1,5 @@ -data modify storage fz:here fz.cache.pos set value [0, 0, 0] +data modify storage fz:here fz.pos set value [0, 0, 0] +data modify storage fz:here fz.message set value ['', '', ''] ## 标记为已安装 data modify storage fz:installed fz.module.here set value 1b diff --git a/data/fz/functions/module/here/private_message.mcfunction b/data/fz/functions/module/here/private_message.mcfunction index e9e53f2..0a62b25 100644 --- a/data/fz/functions/module/here/private_message.mcfunction +++ b/data/fz/functions/module/here/private_message.mcfunction @@ -1 +1 @@ -tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fz.cache.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.cache.message[2]", "interpret": true, "storage": "fz:here"}] \ No newline at end of file +tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fz.message[0]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[1]", "interpret": true, "storage": "fz:here"}, {"nbt": "fz.message[2]", "interpret": true, "storage": "fz:here"}] \ No newline at end of file diff --git a/data/fz/functions/module/last_death/get_death_point.mcfunction b/data/fz/functions/module/last_death/get_death_point.mcfunction index 48ac7a8..6f5e94c 100644 --- a/data/fz/functions/module/last_death/get_death_point.mcfunction +++ b/data/fz/functions/module/last_death/get_death_point.mcfunction @@ -1,5 +1,4 @@ -data modify storage fz:global fz.cache.dimension.id set from entity @s LastDeathLocation.dimension -data modify storage fz:global fz.cache.dimension.name set from entity @s LastDeathLocation.dimension +data modify storage fz:global fz.api.dimension.id set from entity @s LastDeathLocation.dimension ## fz.cache.pos已在install中初始化 execute store result storage fz:last_death fz.cache.pos[0] int 1 run data get entity @s LastDeathLocation.pos[0] execute store result storage fz:last_death fz.cache.pos[1] int 1 run data get entity @s LastDeathLocation.pos[1] diff --git a/data/fz/functions/module/last_death/private_message.mcfunction b/data/fz/functions/module/last_death/private_message.mcfunction index b2b47ad..296f3eb 100644 --- a/data/fz/functions/module/last_death/private_message.mcfunction +++ b/data/fz/functions/module/last_death/private_message.mcfunction @@ -1 +1 @@ -tellraw @s [{"text": "你的上次死亡位于"}, {"nbt": "fz.cache.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.pos[0]", "storage": "fz:last_death"}, {"text": ", "}, {"nbt": "fz.cache.pos[1]", "storage": "fz:last_death"}, {"text": ", "}, {"nbt": "fz.cache.pos[2]", "storage": "fz:last_death"}, {"text": "]"}]] \ No newline at end of file +tellraw @s [{"text": "你上次死亡于"}, {"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"nbt": "fz.cache.pos[0]", "storage": "fz:last_death"}, {"text": ", "}, {"nbt": "fz.cache.pos[1]", "storage": "fz:last_death"}, {"text": ", "}, {"nbt": "fz.cache.pos[2]", "storage": "fz:last_death"}, {"text": "]"}]] \ No newline at end of file diff --git a/data/fz/functions/module/last_nether_portal/event/on_entered_nether_portal.mcfunction b/data/fz/functions/module/last_nether_portal/event/on_entered_nether_portal.mcfunction new file mode 100644 index 0000000..6d76d42 --- /dev/null +++ b/data/fz/functions/module/last_nether_portal/event/on_entered_nether_portal.mcfunction @@ -0,0 +1,5 @@ +execute if predicate fz:in_dimension_overworld run scoreboard players set @s fz.module.last_nether_portal.dimension 0 +execute if predicate fz:in_dimension_the_nether run scoreboard players set @s fz.module.last_nether_portal.dimension -1 +execute store result score @s fz.module.last_nether_portal.x run data get entity @s Pos[0] +execute store result score @s fz.module.last_nether_portal.y run data get entity @s Pos[1] +execute store result score @s fz.module.last_nether_portal.z run data get entity @s Pos[2] \ No newline at end of file diff --git a/data/fz/functions/module/last_nether_portal/get_message.mcfunction b/data/fz/functions/module/last_nether_portal/get_message.mcfunction new file mode 100644 index 0000000..74e7981 --- /dev/null +++ b/data/fz/functions/module/last_nether_portal/get_message.mcfunction @@ -0,0 +1,2 @@ +execute if score @s fz.module.last_nether_portal.dimension matches 0 run data modify storage fz:global fz.api.dimension.id set value "minecraft:overworld" +execute if score @s fz.module.last_nether_portal.dimension matches -1 run data modify storage fz:global fz.api.dimension.id set value "minecraft:the_nether" \ No newline at end of file diff --git a/data/fz/functions/module/last_nether_portal/global_message.mcfunction b/data/fz/functions/module/last_nether_portal/global_message.mcfunction new file mode 100644 index 0000000..6fbf22c --- /dev/null +++ b/data/fz/functions/module/last_nether_portal/global_message.mcfunction @@ -0,0 +1 @@ +tellraw @a [{"selector": "@s"}, [{"text": "说:我上次穿出的下界传送门位于", "color": "white"}, {"nbt": "fz.message", "interpret": true, "storage": "fz:last_nether_portal"}]] \ No newline at end of file diff --git a/data/fz/functions/module/last_nether_portal/install.mcfunction b/data/fz/functions/module/last_nether_portal/install.mcfunction new file mode 100644 index 0000000..b560366 --- /dev/null +++ b/data/fz/functions/module/last_nether_portal/install.mcfunction @@ -0,0 +1,5 @@ +scoreboard objectives add fz.module.last_nether_portal.dimension dummy +scoreboard objectives add fz.module.last_nether_portal.x dummy +scoreboard objectives add fz.module.last_nether_portal.y dummy +scoreboard objectives add fz.module.last_nether_portal.z dummy +data modify storage fz:last_nether_portal fz.message set value '[{"nbt": "fz.api.dimension.name", "interpret": true, "storage": "fz:global"}, [{"text": "[", "color": "green"}, {"score": {"name": "@s", "objective": "fz.module.last_nether_portal.x"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fz.module.last_nether_portal.z"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fz.module.last_nether_portal.z"}}, {"text": "]"}]]' \ No newline at end of file diff --git a/data/fz/functions/module/last_nether_portal/private_message.mcfunction b/data/fz/functions/module/last_nether_portal/private_message.mcfunction new file mode 100644 index 0000000..d94d17d --- /dev/null +++ b/data/fz/functions/module/last_nether_portal/private_message.mcfunction @@ -0,0 +1 @@ +tellraw @a [{"text": "你上次穿出的下界传送门位于"}, {"nbt": "fz.message", "interpret": true, "storage": "fz:last_nether_portal"}] \ No newline at end of file diff --git a/data/fz/functions/module/last_nether_portal/uninstall.mcfunction b/data/fz/functions/module/last_nether_portal/uninstall.mcfunction new file mode 100644 index 0000000..d971f23 --- /dev/null +++ b/data/fz/functions/module/last_nether_portal/uninstall.mcfunction @@ -0,0 +1,4 @@ +scoreboard objectives remove fz.module.last_nether_portal.x +scoreboard objectives remove fz.module.last_nether_portal.y +scoreboard objectives remove fz.module.last_nether_portal.z +data remove storage fz:last_nether_portal fz \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/install.mcfunction b/data/fz/functions/module/scoreboard/install.mcfunction index 18c13c0..8c22575 100644 --- a/data/fz/functions/module/scoreboard/install.mcfunction +++ b/data/fz/functions/module/scoreboard/install.mcfunction @@ -44,7 +44,7 @@ scoreboard objectives add fz.module.scoreboard.display.kill_count dummy team add fz.module.scoreboard.display.kill_count ### 放置榜 -scoreboard objectives add fz.module.scoreboard.placement_count dummy +scoreboard objectives add fz.module.scoreboard.display.placement_count dummy team add fz.module.scoreboard.display.placement_count ### 交易榜 diff --git a/data/fz/functions/system/uninstall.mcfunction b/data/fz/functions/system/uninstall.mcfunction index 02247bb..9ca91b4 100644 --- a/data/fz/functions/system/uninstall.mcfunction +++ b/data/fz/functions/system/uninstall.mcfunction @@ -1,5 +1,5 @@ ## 整数类型 scoreboard objectives remove fz.variable.integer -## 卸载配置信息 -data remove storage fz:config fz \ No newline at end of file +## 清除缓存 +data remove storage fz:global fz \ No newline at end of file diff --git a/data/fz/predicates/in_dimension_overworld.json b/data/fz/predicates/in_dimension_overworld.json index e69de29..ce7f9a2 100644 --- a/data/fz/predicates/in_dimension_overworld.json +++ b/data/fz/predicates/in_dimension_overworld.json @@ -0,0 +1,9 @@ +{ + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "location": { + "dimension": "minecraft:overworld" + } + } +} \ No newline at end of file diff --git a/data/fz/predicates/in_dimension_the_nether.json b/data/fz/predicates/in_dimension_the_nether.json index e69de29..545cdcd 100644 --- a/data/fz/predicates/in_dimension_the_nether.json +++ b/data/fz/predicates/in_dimension_the_nether.json @@ -0,0 +1,9 @@ +{ + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "location": { + "dimension": "minecraft:the_nether" + } + } +} \ No newline at end of file diff --git a/data/fz/tags/functions/api/get_dimension_name.json b/data/fz/tags/functions/api/get_dimension_name.json index febfb85..ceefe42 100644 --- a/data/fz/tags/functions/api/get_dimension_name.json +++ b/data/fz/tags/functions/api/get_dimension_name.json @@ -1,7 +1,9 @@ { "replace": false, "values": [ - "fz:api/get_dimension_name/overworld", - "fz:api/get_dimension_name/the_nether" + "fz:api/get_dimension_name/default", + "#fz:api/get_dimension_name/minecraft/overworld", + "#fz:api/get_dimension_name/minecraft/the_end", + "#fz:api/get_dimension_name/minecraft/the_nether" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/api/get_dimension_name/minecraft/overworld.json b/data/fz/tags/functions/api/get_dimension_name/minecraft/overworld.json new file mode 100644 index 0000000..1ded298 --- /dev/null +++ b/data/fz/tags/functions/api/get_dimension_name/minecraft/overworld.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:api/get_dimension_name/minecraft/overworld" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/api/get_dimension_name/minecraft/the_end.json b/data/fz/tags/functions/api/get_dimension_name/minecraft/the_end.json new file mode 100644 index 0000000..ace7851 --- /dev/null +++ b/data/fz/tags/functions/api/get_dimension_name/minecraft/the_end.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:api/get_dimension_name/minecraft/the_end" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/api/get_dimension_name/minecraft/the_nether.json b/data/fz/tags/functions/api/get_dimension_name/minecraft/the_nether.json new file mode 100644 index 0000000..32a2d33 --- /dev/null +++ b/data/fz/tags/functions/api/get_dimension_name/minecraft/the_nether.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:api/get_dimension_name/minecraft/the_nether" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/api/get_player_dimension.json b/data/fz/tags/functions/api/get_player_dimension.json new file mode 100644 index 0000000..523650d --- /dev/null +++ b/data/fz/tags/functions/api/get_player_dimension.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:api/get_player_dimension" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/game_event/player/on_entered_nether_portal.json b/data/fz/tags/functions/game_event/player/on_entered_nether_portal.json new file mode 100644 index 0000000..4752afa --- /dev/null +++ b/data/fz/tags/functions/game_event/player/on_entered_nether_portal.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "#fz:module/last_nether_portal/event/on_entered_nether_portal" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/config/on_click.json b/data/fz/tags/functions/module/config/on_click.json index 7c67c57..b431f65 100644 --- a/data/fz/tags/functions/module/config/on_click.json +++ b/data/fz/tags/functions/module/config/on_click.json @@ -2,7 +2,6 @@ "replace": false, "values": [ "fz:module/config/on_click", - "#fz:module/config/display", - "fz:module/scoreboard/config/on_click" + "#fz:module/scoreboard/config/on_click" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/here/get_message.json b/data/fz/tags/functions/module/here/get_message.json index aa57091..9af0ce5 100644 --- a/data/fz/tags/functions/module/here/get_message.json +++ b/data/fz/tags/functions/module/here/get_message.json @@ -1,7 +1,8 @@ { "replace": false, "values": [ - "#fz:api/get_dimension", + "#fz:api/get_player_dimension", + "#fz:api/get_dimension_name", "fz:module/here/get_message", "#fz:module/here/get_dimension_message" ] diff --git a/data/fz/tags/functions/module/last_nether_portal/event/on_entered_nether_portal.json b/data/fz/tags/functions/module/last_nether_portal/event/on_entered_nether_portal.json new file mode 100644 index 0000000..7b1ee0b --- /dev/null +++ b/data/fz/tags/functions/module/last_nether_portal/event/on_entered_nether_portal.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "#fz:api/get_player_dimension", + "#fz:api/get_dimension_name", + "fz:module/last_nether_portal/event/on_entered_nether_portal" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/api/get_dimension.json b/data/fz/tags/functions/module/last_nether_portal/get_message.json similarity index 61% rename from data/fz/tags/functions/api/get_dimension.json rename to data/fz/tags/functions/module/last_nether_portal/get_message.json index 25b7894..3a12e6e 100644 --- a/data/fz/tags/functions/api/get_dimension.json +++ b/data/fz/tags/functions/module/last_nether_portal/get_message.json @@ -1,7 +1,7 @@ { "replace": false, "values": [ - "fz:api/get_dimension", + "fz:module/last_nether_portal/get_message", "#fz:api/get_dimension_name" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/last_nether_portal/global_message.json b/data/fz/tags/functions/module/last_nether_portal/global_message.json new file mode 100644 index 0000000..5d17905 --- /dev/null +++ b/data/fz/tags/functions/module/last_nether_portal/global_message.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "#fz:module/last_nether_portal/get_message", + "fz:module/last_nether_portal/global_message" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/last_nether_portal/install.json b/data/fz/tags/functions/module/last_nether_portal/install.json new file mode 100644 index 0000000..5958980 --- /dev/null +++ b/data/fz/tags/functions/module/last_nether_portal/install.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:module/last_nether_portal/install" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/last_nether_portal/private_message.json b/data/fz/tags/functions/module/last_nether_portal/private_message.json new file mode 100644 index 0000000..78f2ffd --- /dev/null +++ b/data/fz/tags/functions/module/last_nether_portal/private_message.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "#fz:module/last_nether_portal/get_message", + "fz:module/last_nether_portal/private_message" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/last_nether_portal/uninstall.json b/data/fz/tags/functions/module/last_nether_portal/uninstall.json new file mode 100644 index 0000000..9e8bad0 --- /dev/null +++ b/data/fz/tags/functions/module/last_nether_portal/uninstall.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:module/last_nether_portal/uninstall" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/config/on_click.json b/data/fz/tags/functions/module/scoreboard/config/on_click.json new file mode 100644 index 0000000..5f8f8ab --- /dev/null +++ b/data/fz/tags/functions/module/scoreboard/config/on_click.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "fz:module/scoreboard/config/on_click", + "#fz:module/config/display" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/install/module.json b/data/fz/tags/functions/system/install/module.json index 4120e7c..a920fc3 100644 --- a/data/fz/tags/functions/system/install/module.json +++ b/data/fz/tags/functions/system/install/module.json @@ -5,6 +5,7 @@ "#fz:module/health/install", "#fz:module/here/install", "#fz:module/last_death/install", + "#fz:module/last_nether_portal/install", "#fz:module/scoreboard/install" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/system/uninstall/module.json b/data/fz/tags/functions/system/uninstall/module.json index aff3fb4..47df1b2 100644 --- a/data/fz/tags/functions/system/uninstall/module.json +++ b/data/fz/tags/functions/system/uninstall/module.json @@ -5,6 +5,7 @@ "#fz:module/health/uninstall", "#fz:module/here/uninstall", "#fz:module/last_death/uninstall", + "#fz:module/last_nether_portal/uninstall", "#fz:module/scoreboard/uninstall" ] } \ No newline at end of file