diff --git a/data/fz.admin.implement/functions/autocarpet.mcfunction b/data/fz.admin/functions/autocarpet.mcfunction similarity index 100% rename from data/fz.admin.implement/functions/autocarpet.mcfunction rename to data/fz.admin/functions/autocarpet.mcfunction diff --git a/data/fz.admin/tags/functions/autocarpet.json b/data/fz.admin/tags/functions/autocarpet.json index df1bea6..987aa34 100644 --- a/data/fz.admin/tags/functions/autocarpet.json +++ b/data/fz.admin/tags/functions/autocarpet.json @@ -2,7 +2,7 @@ "replace": false, "values": [ { - "id": "fz.admin.implement:autocarpet", + "id": "fz.admin:autocarpet", "required": true } ] diff --git a/data/fz/advancements/game_event.json b/data/fz/advancements/game_event.json new file mode 100644 index 0000000..e7279b2 --- /dev/null +++ b/data/fz/advancements/game_event.json @@ -0,0 +1,7 @@ +{ + "criteria": { + "root":{ + "trigger": "minecraft:impossible" + } + } +} \ No newline at end of file diff --git a/data/fz/advancements/event/on_aviate_one_meter.json b/data/fz/advancements/game_event/on_aviate_one_meter.json similarity index 85% rename from data/fz/advancements/event/on_aviate_one_meter.json rename to data/fz/advancements/game_event/on_aviate_one_meter.json index 400c3b1..ae2c956 100644 --- a/data/fz/advancements/event/on_aviate_one_meter.json +++ b/data/fz/advancements/game_event/on_aviate_one_meter.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_aviate_one_meter": { "trigger": "minecraft:tick", @@ -18,6 +19,6 @@ } }, "rewards": { - "function": "fz:event/player/on_aviate_one_meter" + "function": "fz:game_event/player/on_aviate_one_meter" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_dead.json b/data/fz/advancements/game_event/on_dead.json similarity index 86% rename from data/fz/advancements/event/on_dead.json rename to data/fz/advancements/game_event/on_dead.json index 4f9028d..91c63e3 100644 --- a/data/fz/advancements/event/on_dead.json +++ b/data/fz/advancements/game_event/on_dead.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_dead": { "trigger": "minecraft:tick", @@ -18,6 +19,6 @@ } }, "rewards": { - "function": "fz:event/player/on_dead" + "function": "fz:game_event/player/on_dead" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_fished.json b/data/fz/advancements/game_event/on_fished.json similarity index 76% rename from data/fz/advancements/event/on_fished.json rename to data/fz/advancements/game_event/on_fished.json index c93509d..f71e796 100644 --- a/data/fz/advancements/event/on_fished.json +++ b/data/fz/advancements/game_event/on_fished.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_fished": { "trigger": "minecraft:fishing_rod_hooked", @@ -10,6 +11,6 @@ } }, "rewards": { - "function": "fz:event/player/on_fished" + "function": "fz:game_event/player/on_fished" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_hurt_entity_with_tools.json b/data/fz/advancements/game_event/on_hurt_entity_with_tools.json similarity index 80% rename from data/fz/advancements/event/on_hurt_entity_with_tools.json rename to data/fz/advancements/game_event/on_hurt_entity_with_tools.json index 8ce20f4..f434c16 100644 --- a/data/fz/advancements/event/on_hurt_entity_with_tools.json +++ b/data/fz/advancements/game_event/on_hurt_entity_with_tools.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_hurt_entity_with_tools": { "trigger": "minecraft:player_hurt_entity", @@ -14,6 +15,6 @@ } }, "rewards": { - "function": "fz:event/player/on_hurt_entity_with_tools" + "function": "fz:game_event/player/on_hurt_entity_with_tools" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_killed_mob_or_player.json b/data/fz/advancements/game_event/on_killed_mob_or_player.json similarity index 88% rename from data/fz/advancements/event/on_killed_mob_or_player.json rename to data/fz/advancements/game_event/on_killed_mob_or_player.json index d9850be..a18b541 100644 --- a/data/fz/advancements/event/on_killed_mob_or_player.json +++ b/data/fz/advancements/game_event/on_killed_mob_or_player.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_killed_mob_or_player": { "trigger": "minecraft:player_killed_entity", @@ -22,6 +23,6 @@ } }, "rewards": { - "function": "fz:event/player/on_killed_mob_or_player" + "function": "fz:game_event/player/on_killed_mob_or_player" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_login.json b/data/fz/advancements/game_event/on_login.json similarity index 89% rename from data/fz/advancements/event/on_login.json rename to data/fz/advancements/game_event/on_login.json index 2a03f45..6c7df20 100644 --- a/data/fz/advancements/event/on_login.json +++ b/data/fz/advancements/game_event/on_login.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_login": { "trigger": "tick", @@ -21,6 +22,6 @@ } }, "rewards": { - "function": "fz:event/player/on_login" + "function": "fz:game_event/player/on_login" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_piglin_trade.json b/data/fz/advancements/game_event/on_piglin_trade.json similarity index 81% rename from data/fz/advancements/event/on_piglin_trade.json rename to data/fz/advancements/game_event/on_piglin_trade.json index 282aa11..1b355f1 100644 --- a/data/fz/advancements/event/on_piglin_trade.json +++ b/data/fz/advancements/game_event/on_piglin_trade.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_piglin_trade": { "trigger": "minecraft:thrown_item_picked_up_by_entity", @@ -13,6 +14,6 @@ } }, "rewards": { - "function": "fz:event/player/on_piglin_trade" + "function": "fz:game_event/player/on_piglin_trade" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_placed_block.json b/data/fz/advancements/game_event/on_placed_block.json similarity index 60% rename from data/fz/advancements/event/on_placed_block.json rename to data/fz/advancements/game_event/on_placed_block.json index 9f14160..d097b88 100644 --- a/data/fz/advancements/event/on_placed_block.json +++ b/data/fz/advancements/game_event/on_placed_block.json @@ -1,10 +1,11 @@ { + "parent": "fz:game_event", "criteria": { "on_placed_block": { "trigger": "minecraft:placed_block" } }, "rewards": { - "function": "fz:event/player/on_placed_block" + "function": "fz:game_event/player/on_placed_block" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_play_one_hour.json b/data/fz/advancements/game_event/on_play_one_hour.json similarity index 70% rename from data/fz/advancements/event/on_play_one_hour.json rename to data/fz/advancements/game_event/on_play_one_hour.json index e9b4a2c..2d4000f 100644 --- a/data/fz/advancements/event/on_play_one_hour.json +++ b/data/fz/advancements/game_event/on_play_one_hour.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_play_one_hour": { "trigger": "minecraft:tick", @@ -8,8 +9,8 @@ "condition": "minecraft:entity_scores", "entity": "this", "scores": { - "fz.event.play_seconds": { - "min": 3600 + "fz.event.play_ticks": { + "min": 72000 } } } @@ -18,6 +19,6 @@ } }, "rewards": { - "function": "fz:event/player/on_play_one_hour" + "function": "fz:game_event/player/on_play_one_hour" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_shears_used_on_entity.json b/data/fz/advancements/game_event/on_shears_used_on_entity.json similarity index 79% rename from data/fz/advancements/event/on_shears_used_on_entity.json rename to data/fz/advancements/game_event/on_shears_used_on_entity.json index 1bd0b91..26a1433 100644 --- a/data/fz/advancements/event/on_shears_used_on_entity.json +++ b/data/fz/advancements/game_event/on_shears_used_on_entity.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_shears_used_on_entity": { "trigger": "minecraft:player_interacted_with_entity", @@ -13,6 +14,6 @@ } }, "rewards": { - "function": "fz:event/player/on_shears_used_on_entity" + "function": "fz:game_event/player/on_shears_used_on_entity" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_sneak.json b/data/fz/advancements/game_event/on_sneak.json similarity index 78% rename from data/fz/advancements/event/on_sneak.json rename to data/fz/advancements/game_event/on_sneak.json index 484f422..f981797 100644 --- a/data/fz/advancements/event/on_sneak.json +++ b/data/fz/advancements/game_event/on_sneak.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_sneak": { "trigger": "minecraft:tick", @@ -12,6 +13,6 @@ } }, "rewards": { - "function": "fz:event/player/on_sneak" + "function": "fz:game_event/player/on_sneak" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_took_damage.json b/data/fz/advancements/game_event/on_took_damage.json similarity index 79% rename from data/fz/advancements/event/on_took_damage.json rename to data/fz/advancements/game_event/on_took_damage.json index ee65e60..b65c97c 100644 --- a/data/fz/advancements/event/on_took_damage.json +++ b/data/fz/advancements/game_event/on_took_damage.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_took_damage": { "trigger": "minecraft:tick", @@ -9,7 +10,7 @@ "entity": "this", "scores": { "fz.event.damage_taken": { - "min": 1 + "min": 10 } } } @@ -18,6 +19,6 @@ } }, "rewards": { - "function": "fz:event/player/on_took_damage" + "function": "fz:game_event/player/on_took_damage" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_tools_used_on_block.json b/data/fz/advancements/game_event/on_tools_used_on_block.json similarity index 77% rename from data/fz/advancements/event/on_tools_used_on_block.json rename to data/fz/advancements/game_event/on_tools_used_on_block.json index df3a799..2b1c841 100644 --- a/data/fz/advancements/event/on_tools_used_on_block.json +++ b/data/fz/advancements/game_event/on_tools_used_on_block.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_tools_used_on_block": { "__comment": "斧子剥树皮会触发两次!", @@ -11,6 +12,6 @@ } }, "rewards": { - "function": "fz:event/player/on_tools_used_on_block" + "function": "fz:game_event/player/on_tools_used_on_block" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_unsneak.json b/data/fz/advancements/game_event/on_unsneak.json similarity index 75% rename from data/fz/advancements/event/on_unsneak.json rename to data/fz/advancements/game_event/on_unsneak.json index 3842c18..074825d 100644 --- a/data/fz/advancements/event/on_unsneak.json +++ b/data/fz/advancements/game_event/on_unsneak.json @@ -1,5 +1,5 @@ { - "parent": "fz:event/on_sneak", + "parent": "fz:game_event/on_sneak", "criteria": { "on_unsneak": { "trigger": "minecraft:tick", @@ -11,7 +11,7 @@ "type_specific": { "type": "player", "advancements": { - "fz:event/on_sneak": true + "fz:game_event/on_sneak": true } } } @@ -19,6 +19,6 @@ } }, "rewards": { - "function": "fz:event/player/on_unsneak" + "function": "fz:game_event/player/on_unsneak" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_used_tool.json b/data/fz/advancements/game_event/on_used_tool.json similarity index 82% rename from data/fz/advancements/event/on_used_tool.json rename to data/fz/advancements/game_event/on_used_tool.json index 34aba3a..4675759 100644 --- a/data/fz/advancements/event/on_used_tool.json +++ b/data/fz/advancements/game_event/on_used_tool.json @@ -1,4 +1,5 @@ { + "parent": "fz:game_event", "criteria": { "on_used_tool": { "trigger": "minecraft:tick", @@ -14,6 +15,6 @@ } }, "rewards": { - "function": "fz:event/player/on_used_tool" + "function": "fz:game_event/player/on_used_tool" } } \ No newline at end of file diff --git a/data/fz/advancements/event/on_villager_trade.json b/data/fz/advancements/game_event/on_villager_trade.json similarity index 60% rename from data/fz/advancements/event/on_villager_trade.json rename to data/fz/advancements/game_event/on_villager_trade.json index 620888a..0a567d8 100644 --- a/data/fz/advancements/event/on_villager_trade.json +++ b/data/fz/advancements/game_event/on_villager_trade.json @@ -1,10 +1,11 @@ { + "parent": "fz:game_event", "criteria": { "on_villager_trade": { "trigger": "minecraft:villager_trade" } }, "rewards": { - "function": "fz:event/player/on_villager_trade" + "function": "fz:game_event/player/on_villager_trade" } } \ No newline at end of file diff --git a/data/fz/functions/boot_manager/10.mcfunction b/data/fz/functions/boot_manager/10.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/2.mcfunction b/data/fz/functions/boot_manager/2.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/3.mcfunction b/data/fz/functions/boot_manager/3.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/4.mcfunction b/data/fz/functions/boot_manager/4.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/5.mcfunction b/data/fz/functions/boot_manager/5.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/6.mcfunction b/data/fz/functions/boot_manager/6.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/7.mcfunction b/data/fz/functions/boot_manager/7.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/8.mcfunction b/data/fz/functions/boot_manager/8.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/boot_manager/9.mcfunction b/data/fz/functions/boot_manager/9.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/entry.mcfunction b/data/fz/functions/entry.mcfunction index 7d560cc..37d5b72 100644 --- a/data/fz/functions/entry.mcfunction +++ b/data/fz/functions/entry.mcfunction @@ -1,7 +1,2 @@ -## 整数类型 -scoreboard objectives add fz.variable.integer dummy -function fz:logger/install -function fz:logger/load -function fz:event/install -function #fz:install -function #fz:load \ No newline at end of file +execute unless data storage fz:installed fz.global run function #fz:install +execute if data storage fz:installed fz{global:1b} run function #fz:load \ No newline at end of file diff --git a/data/fz/functions/event/player/reset_advancements.mcfunction b/data/fz/functions/event/player/reset_advancements.mcfunction deleted file mode 100644 index 14bcfc3..0000000 --- a/data/fz/functions/event/player/reset_advancements.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -## 复位所有事件进度 -advancement revoke @s only fz:event/on_aviate_one_meter -advancement revoke @s only fz:event/on_dead -advancement revoke @s only fz:event/on_dig -advancement revoke @s only fz:event/on_interacted_with_entity/on_shears_used_on_entity -advancement revoke @s only fz:event/on_login -advancement revoke @s only fz:event/on_piglin_trade -advancement revoke @s only fz:event/on_play_one_hour -advancement revoke @s only fz:event/on_sneak -advancement revoke @s only fz:event/on_take_damage -advancement revoke @s only fz:event/on_tools_used_on_block -advancement revoke @s only fz:event/on_unsneak -advancement revoke @s only fz:event/on_villager_trade - -## 调试 -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/event/install.mcfunction b/data/fz/functions/game_event/install.mcfunction similarity index 96% rename from data/fz/functions/event/install.mcfunction rename to data/fz/functions/game_event/install.mcfunction index 699545d..a5c1491 100644 --- a/data/fz/functions/event/install.mcfunction +++ b/data/fz/functions/game_event/install.mcfunction @@ -3,7 +3,7 @@ scoreboard objectives add fz.event.aviating_distance minecraft.custom:aviate_one scoreboard objectives add fz.event.damage_taken minecraft.custom:damage_taken scoreboard objectives add fz.event.death_count deathCount scoreboard objectives add fz.event.leave_game minecraft.custom:leave_game -scoreboard objectives add fz.event.play_seconds minecraft.custom:play_time +scoreboard objectives add fz.event.play_ticks minecraft.custom:play_time scoreboard objectives add fz.event.villager_trade minecraft.custom:traded_with_villager ## 使用工具 @@ -41,7 +41,7 @@ scoreboard objectives add fz.event.used_tool.diamond_sword minecraft.used:diamon scoreboard objectives add fz.event.used_tool.netherite_sword minecraft.used:netherite_sword ## 标记为已安装 -data modify storage fz:install_manager fz.event set value 1b +data modify storage fz:installed fz.event set value 1b ## 调试 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装系统组件:事件"}] \ No newline at end of file diff --git a/data/fz/functions/event/player/on_aviate_one_meter.mcfunction b/data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction similarity index 85% rename from data/fz/functions/event/player/on_aviate_one_meter.mcfunction rename to data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction index aed054c..2fba5ac 100644 --- a/data/fz/functions/event/player/on_aviate_one_meter.mcfunction +++ b/data/fz/functions/game_event/player/on_aviate_one_meter.mcfunction @@ -9,7 +9,7 @@ scoreboard players operation fz.var.score fz.variable.integer /= 200 fz.variable scoreboard players operation @s fz.event.aviating_distance %= 200 fz.variable.integer ## 运行事件 -function #fz:event/player/on_aviate_one_meter +function #fz:game_event/player/on_aviate_one_meter ## 重置事件进度 -advancement revoke @s only fz:event/on_aviate_one_meter \ No newline at end of file +advancement revoke @s only fz:game_event/on_aviate_one_meter \ No newline at end of file diff --git a/data/fz/functions/event/player/on_broke_block.mcfunction b/data/fz/functions/game_event/player/on_broke_block.mcfunction similarity index 97% rename from data/fz/functions/event/player/on_broke_block.mcfunction rename to data/fz/functions/game_event/player/on_broke_block.mcfunction index 3b87a4f..46a4219 100644 --- a/data/fz/functions/event/player/on_broke_block.mcfunction +++ b/data/fz/functions/game_event/player/on_broke_block.mcfunction @@ -1,4 +1,4 @@ -# 调用者:fz:event/player/on_used_tool +# 调用者:fz:game_event/player/on_used_tool ## 调试 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": "挖掘了方块"}] @@ -37,4 +37,4 @@ scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.use scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.wooden_sword ## 运行事件 -function #fz:event/player/on_broke_block \ No newline at end of file +function #fz:game_event/player/on_broke_block \ No newline at end of file diff --git a/data/fz/functions/event/player/on_dead.mcfunction b/data/fz/functions/game_event/player/on_dead.mcfunction similarity index 85% rename from data/fz/functions/event/player/on_dead.mcfunction rename to data/fz/functions/game_event/player/on_dead.mcfunction index a0e1f32..4fa7452 100644 --- a/data/fz/functions/event/player/on_dead.mcfunction +++ b/data/fz/functions/game_event/player/on_dead.mcfunction @@ -8,7 +8,7 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @ scoreboard players set @s fz.event.death_count 0 ## 运行事件 -function #fz:event/player/on_dead +function #fz:game_event/player/on_dead ## 重置事件进度 -advancement revoke @s only fz:event/on_dead \ No newline at end of file +advancement revoke @s only fz:game_event/on_dead \ No newline at end of file diff --git a/data/fz/functions/event/player/on_fished.mcfunction b/data/fz/functions/game_event/player/on_fished.mcfunction similarity index 77% rename from data/fz/functions/event/player/on_fished.mcfunction rename to data/fz/functions/game_event/player/on_fished.mcfunction index 02094d9..83d5853 100644 --- a/data/fz/functions/event/player/on_fished.mcfunction +++ b/data/fz/functions/game_event/player/on_fished.mcfunction @@ -4,7 +4,7 @@ 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:event/player/on_fished +function #fz:game_event/player/on_fished ## 重置事件进度 -advancement revoke @s only fz:event/on_fished \ No newline at end of file +advancement revoke @s only fz:game_event/on_fished \ No newline at end of file diff --git a/data/fz/functions/event/player/on_hurt_entity_with_tools.mcfunction b/data/fz/functions/game_event/player/on_hurt_entity_with_tools.mcfunction similarity index 77% rename from data/fz/functions/event/player/on_hurt_entity_with_tools.mcfunction rename to data/fz/functions/game_event/player/on_hurt_entity_with_tools.mcfunction index bb6b470..850fdb0 100644 --- a/data/fz/functions/event/player/on_hurt_entity_with_tools.mcfunction +++ b/data/fz/functions/game_event/player/on_hurt_entity_with_tools.mcfunction @@ -7,7 +7,7 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @ scoreboard players remove @s fz.event.used_tool.dig_offset 1 ## 运行事件 -function #fz:event/player/on_hurt_entity_with_tools +function #fz:game_event/player/on_hurt_entity_with_tools ## 重置事件进度 -advancement revoke @s only fz:event/on_hurt_entity_with_tools +advancement revoke @s only fz:game_event/on_hurt_entity_with_tools diff --git a/data/fz/functions/event/player/on_killed_mob_or_player.mcfunction b/data/fz/functions/game_event/player/on_killed_mob_or_player.mcfunction similarity index 73% rename from data/fz/functions/event/player/on_killed_mob_or_player.mcfunction rename to data/fz/functions/game_event/player/on_killed_mob_or_player.mcfunction index 3c8778b..95d4913 100644 --- a/data/fz/functions/event/player/on_killed_mob_or_player.mcfunction +++ b/data/fz/functions/game_event/player/on_killed_mob_or_player.mcfunction @@ -4,7 +4,7 @@ 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:event/player/on_killed_mob_or_player +function #fz:game_event/player/on_killed_mob_or_player ## 重置事件进度 -advancement revoke @s only fz:event/on_killed_mob_or_player \ No newline at end of file +advancement revoke @s only fz:game_event/on_killed_mob_or_player \ No newline at end of file diff --git a/data/fz/functions/event/player/on_login.mcfunction b/data/fz/functions/game_event/player/on_login.mcfunction similarity index 91% rename from data/fz/functions/event/player/on_login.mcfunction rename to data/fz/functions/game_event/player/on_login.mcfunction index 340ee1e..217dcf8 100644 --- a/data/fz/functions/event/player/on_login.mcfunction +++ b/data/fz/functions/game_event/player/on_login.mcfunction @@ -7,4 +7,4 @@ scoreboard players set @s fz.event.leave_game 0 ## 运行事件 ### 会调用reset_events标签,故本函数内不需要再重置事件进度 -function #fz:event/player/on_login \ No newline at end of file +function #fz:game_event/player/on_login \ No newline at end of file diff --git a/data/fz/functions/event/player/on_piglin_trade.mcfunction b/data/fz/functions/game_event/player/on_piglin_trade.mcfunction similarity index 75% rename from data/fz/functions/event/player/on_piglin_trade.mcfunction rename to data/fz/functions/game_event/player/on_piglin_trade.mcfunction index d2076bc..04d481c 100644 --- a/data/fz/functions/event/player/on_piglin_trade.mcfunction +++ b/data/fz/functions/game_event/player/on_piglin_trade.mcfunction @@ -4,7 +4,7 @@ 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:event/player/on_piglin_trade +function #fz:game_event/player/on_piglin_trade ## 重置事件进度 -advancement revoke @s only fz:event/on_piglin_trade \ No newline at end of file +advancement revoke @s only fz:game_event/on_piglin_trade \ No newline at end of file diff --git a/data/fz/functions/event/player/on_placed_block.mcfunction b/data/fz/functions/game_event/player/on_placed_block.mcfunction similarity index 75% rename from data/fz/functions/event/player/on_placed_block.mcfunction rename to data/fz/functions/game_event/player/on_placed_block.mcfunction index a22c6ac..a863024 100644 --- a/data/fz/functions/event/player/on_placed_block.mcfunction +++ b/data/fz/functions/game_event/player/on_placed_block.mcfunction @@ -4,7 +4,7 @@ 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:event/player/on_placed_block +function #fz:game_event/player/on_placed_block ## 重置事件进度 -advancement revoke @s only fz:event/on_placed_block \ No newline at end of file +advancement revoke @s only fz:game_event/on_placed_block \ No newline at end of file diff --git a/data/fz/functions/event/player/on_play_one_hour.mcfunction b/data/fz/functions/game_event/player/on_play_one_hour.mcfunction similarity index 71% rename from data/fz/functions/event/player/on_play_one_hour.mcfunction rename to data/fz/functions/game_event/player/on_play_one_hour.mcfunction index 735941f..f0ad84f 100644 --- a/data/fz/functions/event/player/on_play_one_hour.mcfunction +++ b/data/fz/functions/game_event/player/on_play_one_hour.mcfunction @@ -4,12 +4,12 @@ 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": "游玩了1h"}] ## 将事件数据缓存,并重置事件计分板 -# scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.play_seconds +# scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.play_ticks # scoreboard players operation fz.var.score fz.variable.integer /= 3600 fz.variable.integer -scoreboard players operation @s fz.event.play_seconds %= 3600 fz.variable.integer +scoreboard players operation @s fz.event.play_ticks %= 72000 fz.variable.integer ## 运行事件 -function #fz:event/player/on_play_one_hour +function #fz:game_event/player/on_play_one_hour ## 重置事件进度 -advancement revoke @s only fz:event/on_play_one_hour \ No newline at end of file +advancement revoke @s only fz:game_event/on_play_one_hour \ No newline at end of file diff --git a/data/fz/functions/event/player/on_shears_used_on_entity.mcfunction b/data/fz/functions/game_event/player/on_shears_used_on_entity.mcfunction similarity index 77% rename from data/fz/functions/event/player/on_shears_used_on_entity.mcfunction rename to data/fz/functions/game_event/player/on_shears_used_on_entity.mcfunction index 438f474..c67fde4 100644 --- a/data/fz/functions/event/player/on_shears_used_on_entity.mcfunction +++ b/data/fz/functions/game_event/player/on_shears_used_on_entity.mcfunction @@ -7,7 +7,7 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @ scoreboard players remove @s fz.event.used_tool.dig_offset 1 ## 运行事件 -function #fz:event/player/on_shears_used_on_entity +function #fz:game_event/player/on_shears_used_on_entity ## 重置事件进度 -advancement revoke @s only fz:event/on_shears_used_on_entity \ No newline at end of file +advancement revoke @s only fz:game_event/on_shears_used_on_entity \ No newline at end of file diff --git a/data/fz/functions/event/player/on_sneak.mcfunction b/data/fz/functions/game_event/player/on_sneak.mcfunction similarity index 87% rename from data/fz/functions/event/player/on_sneak.mcfunction rename to data/fz/functions/game_event/player/on_sneak.mcfunction index dfff2b8..11090aa 100644 --- a/data/fz/functions/event/player/on_sneak.mcfunction +++ b/data/fz/functions/game_event/player/on_sneak.mcfunction @@ -4,4 +4,4 @@ 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:event/player/on_sneak +function #fz:game_event/player/on_sneak diff --git a/data/fz/functions/event/player/on_took_damage.mcfunction b/data/fz/functions/game_event/player/on_took_damage.mcfunction similarity index 63% rename from data/fz/functions/event/player/on_took_damage.mcfunction rename to data/fz/functions/game_event/player/on_took_damage.mcfunction index 8410f9d..2540a8c 100644 --- a/data/fz/functions/event/player/on_took_damage.mcfunction +++ b/data/fz/functions/game_event/player/on_took_damage.mcfunction @@ -5,10 +5,11 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @ ## 将事件数据缓存,并重置事件计分板 scoreboard players operation fz.var.score fz.variable.integer = @s fz.event.damage_taken -scoreboard players set @s fz.event.damage_taken 0 +scoreboard players operation fz.var.score fz.variable.integer /= 10 fz.variable.integer +scoreboard players operation @s fz.event.damage_taken %= 10 fz.variable.integer ## 运行事件 -function #fz:event/player/on_took_damage +function #fz:game_event/player/on_took_damage ## 重置事件进度 -advancement revoke @s only fz:event/on_took_damage \ No newline at end of file +advancement revoke @s only fz:game_event/on_took_damage \ No newline at end of file diff --git a/data/fz/functions/event/player/on_tools_used_on_block.mcfunction b/data/fz/functions/game_event/player/on_tools_used_on_block.mcfunction similarity index 80% rename from data/fz/functions/event/player/on_tools_used_on_block.mcfunction rename to data/fz/functions/game_event/player/on_tools_used_on_block.mcfunction index c525c44..c771e59 100644 --- a/data/fz/functions/event/player/on_tools_used_on_block.mcfunction +++ b/data/fz/functions/game_event/player/on_tools_used_on_block.mcfunction @@ -8,7 +8,7 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @ scoreboard players remove @s fz.event.used_tool.dig_offset 1 ## 运行事件 -function #fz:event/player/on_tools_used_on_block +function #fz:game_event/player/on_tools_used_on_block ## 重置事件进度 -advancement revoke @s only fz:event/on_tools_used_on_block \ No newline at end of file +advancement revoke @s only fz:game_event/on_tools_used_on_block \ No newline at end of file diff --git a/data/fz/functions/event/player/on_unsneak.mcfunction b/data/fz/functions/game_event/player/on_unsneak.mcfunction similarity index 70% rename from data/fz/functions/event/player/on_unsneak.mcfunction rename to data/fz/functions/game_event/player/on_unsneak.mcfunction index c6143d5..a29f4a0 100644 --- a/data/fz/functions/event/player/on_unsneak.mcfunction +++ b/data/fz/functions/game_event/player/on_unsneak.mcfunction @@ -7,8 +7,7 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @ ##### 当玩家蹲起后触发此事件 ## 运行事件 -function #fz:event/player/on_unsneak -execute if entity @s[x_rotation = -90] run function #fz:event/module/config/on_config +function #fz:game_event/player/on_unsneak ## 重置事件进度 -advancement revoke @s until fz:event/on_unsneak \ No newline at end of file +advancement revoke @s until fz:game_event/on_unsneak \ No newline at end of file diff --git a/data/fz/functions/event/player/on_used_tool.mcfunction b/data/fz/functions/game_event/player/on_used_tool.mcfunction similarity index 53% rename from data/fz/functions/event/player/on_used_tool.mcfunction rename to data/fz/functions/game_event/player/on_used_tool.mcfunction index aab655a..9478e05 100644 --- a/data/fz/functions/event/player/on_used_tool.mcfunction +++ b/data/fz/functions/game_event/player/on_used_tool.mcfunction @@ -4,13 +4,15 @@ 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": "使用了工具"}] ## 运行事件 -function #fz:event/player/on_used_tool +function #fz:game_event/player/on_used_tool ## 判断并触发挖掘事件 -execute unless score @s fz.event.used_tool.offset matches ..-1 run function fz:event/player/on_broke_block +### 挖掘偏移量可以被fz:game_event/[on_tools_used_on_block, on_shears_used_on_entity, on_hurt_entity_with_tools]改变 +### 用于忽略非挖掘事件造成的工具使用分数 +execute unless score @s fz.event.used_tool.offset matches ..-1 run function fz:game_event/player/on_broke_block ## 重置事件计分板 -function #fz:event/player/on_used_tool/reset_used_tool +function #fz:game_event/player/on_used_tool/reset_used_tool ## 重置事件进度 -advancement revoke @s only fz:event/on_used_tool \ No newline at end of file +advancement revoke @s only fz:game_event/on_used_tool \ No newline at end of file diff --git a/data/fz/functions/event/player/on_used_tool/reset_used_tool.mcfunction b/data/fz/functions/game_event/player/on_used_tool/reset_used_tool.mcfunction similarity index 100% rename from data/fz/functions/event/player/on_used_tool/reset_used_tool.mcfunction rename to data/fz/functions/game_event/player/on_used_tool/reset_used_tool.mcfunction diff --git a/data/fz/functions/event/player/on_villager_trade.mcfunction b/data/fz/functions/game_event/player/on_villager_trade.mcfunction similarity index 75% rename from data/fz/functions/event/player/on_villager_trade.mcfunction rename to data/fz/functions/game_event/player/on_villager_trade.mcfunction index ce1777e..b591add 100644 --- a/data/fz/functions/event/player/on_villager_trade.mcfunction +++ b/data/fz/functions/game_event/player/on_villager_trade.mcfunction @@ -4,7 +4,7 @@ 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:event/player/on_villager_trade +function #fz:game_event/player/on_villager_trade ## 重置事件进度 -advancement revoke @s only fz:event/on_villager_trade \ No newline at end of file +advancement revoke @s only fz:game_event/on_villager_trade \ No newline at end of file diff --git a/data/fz/functions/game_event/player/reset_advancements.mcfunction b/data/fz/functions/game_event/player/reset_advancements.mcfunction new file mode 100644 index 0000000..baa824d --- /dev/null +++ b/data/fz/functions/game_event/player/reset_advancements.mcfunction @@ -0,0 +1,6 @@ +## 复位所有事件进度 +### 所有事件进度都继承了fz:game_event进度,因此只需要一行指令: +advancement revoke @s from fz:game_event + +## 调试 +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/event/uninstall.mcfunction b/data/fz/functions/game_event/uninstall.mcfunction similarity index 96% rename from data/fz/functions/event/uninstall.mcfunction rename to data/fz/functions/game_event/uninstall.mcfunction index ea3f1a8..40261f7 100644 --- a/data/fz/functions/event/uninstall.mcfunction +++ b/data/fz/functions/game_event/uninstall.mcfunction @@ -3,7 +3,7 @@ scoreboard objectives remove fz.event.aviating_distance scoreboard objectives remove fz.event.damage_taken scoreboard objectives remove fz.event.death_count scoreboard objectives remove fz.event.leave_game -scoreboard objectives remove fz.event.play_seconds +scoreboard objectives remove fz.event.play_ticks scoreboard objectives remove fz.event.villager_trade ## 使用工具 @@ -41,7 +41,7 @@ scoreboard objectives remove fz.event.used_tool.diamond_sword scoreboard objectives remove fz.event.used_tool.netherite_sword ## 删除安装标记 -data remove storage fz:install_manager fz.event +data remove storage fz:installed fz.event ## 调试 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:事件"}] \ No newline at end of file diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction deleted file mode 100644 index 1bcd151..0000000 --- a/data/fz/functions/install.mcfunction +++ /dev/null @@ -1,10 +0,0 @@ -# 调用者:#fz:install - -## 安装模块 -function #fz:module/install - -## 标记为已安装 -data modify storage fz:install_manager fz.global set value 1b - -## 日志 -tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "安装完成!"}] \ No newline at end of file diff --git a/data/fz/functions/load.mcfunction b/data/fz/functions/load.mcfunction deleted file mode 100644 index 6a08fd9..0000000 --- a/data/fz/functions/load.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -# 调用者:#fz:load - -## 常量 -scoreboard players set 10 fz.variable.integer 10 -scoreboard players set 200 fz.variable.integer 200 -scoreboard players set 3600 fz.variable.integer 3600 - -function #fz:module/try_load - -## 日志 -execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "加载完成!"}] \ No newline at end of file diff --git a/data/fz/functions/logger/install.mcfunction b/data/fz/functions/logger/install.mcfunction index 81f6e84..aebde52 100644 --- a/data/fz/functions/logger/install.mcfunction +++ b/data/fz/functions/logger/install.mcfunction @@ -22,7 +22,7 @@ data modify storage fz:logger fz.exception.load_without_install_exception set va execute unless data storage fz:logger fz.levels.current run data modify storage fz:logger fz.levels.current set value 500 ## 标记为已安装 -data modify storage fz:install_manager fz.logger set value 1b +data modify storage fz:installed fz.logger set value 1b ## 调试 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装系统组件:日志"}] \ No newline at end of file diff --git a/data/fz/functions/logger/uninstall.mcfunction b/data/fz/functions/logger/uninstall.mcfunction index f7e9281..6bd709c 100644 --- a/data/fz/functions/logger/uninstall.mcfunction +++ b/data/fz/functions/logger/uninstall.mcfunction @@ -1,7 +1,7 @@ ## 调用者:#fz:logger/uninstall ## 删除安装标记 -data remove storage fz:install_manager fz.logger +data remove storage fz:installed fz.logger ## 调试 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载系统组件:日志"}] diff --git a/data/fz/functions/module/config/event/on_unsneak.mcfunction b/data/fz/functions/module/config/event/on_unsneak.mcfunction new file mode 100644 index 0000000..0fc534c --- /dev/null +++ b/data/fz/functions/module/config/event/on_unsneak.mcfunction @@ -0,0 +1,3 @@ +# 本目录用于存放向事件中注册的函数,并不用来新建事件 + +execute if entity @s[x_rotation = -90] run function #fz:module/config/on_config \ No newline at end of file diff --git a/data/fz/functions/module/config/install.mcfunction b/data/fz/functions/module/config/install.mcfunction index 5fcd940..11db54e 100644 --- a/data/fz/functions/module/config/install.mcfunction +++ b/data/fz/functions/module/config/install.mcfunction @@ -1,7 +1,7 @@ scoreboard objectives add fz.module.config.trigger trigger ## 标记为已安装 -data modify storage fz:install_manager fz.module.config set value 1b +data modify storage fz:installed fz.module.config set value 1b ## 日志 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装组件:配置"}] \ No newline at end of file diff --git a/data/fz/functions/module/config/loop.mcfunction b/data/fz/functions/module/config/loop.mcfunction index afe3b93..a39b753 100644 --- a/data/fz/functions/module/config/loop.mcfunction +++ b/data/fz/functions/module/config/loop.mcfunction @@ -1,7 +1,7 @@ # 调用者:fz:module/config/trigger ## 如果分数大于0说明玩家点击了按钮 -execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:event/module/config/on_click +execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/on_click execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/reset_trigger schedule function fz:module/config/loop 1t replace diff --git a/data/fz/functions/module/config/uninstall.mcfunction b/data/fz/functions/module/config/uninstall.mcfunction index 7c166e9..2e862f6 100644 --- a/data/fz/functions/module/config/uninstall.mcfunction +++ b/data/fz/functions/module/config/uninstall.mcfunction @@ -3,7 +3,7 @@ schedule clear fz:module/config/loop scoreboard objectives remove fz.module.config.trigger ## 标记为已卸载 -data modify storage fz:install_manager fz.module.config set value 0b +data modify storage fz:installed fz.module.config set value 0b ## 日志 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载组件:配置"}] \ No newline at end of file diff --git a/data/fz/functions/module/health/install.mcfunction b/data/fz/functions/module/health/install.mcfunction new file mode 100644 index 0000000..c85138a --- /dev/null +++ b/data/fz/functions/module/health/install.mcfunction @@ -0,0 +1,5 @@ +scoreboard objectives add fz.module.health health +scoreboard objectives modify fz.module.health rendertype hearts + +## 标记为已安装 +data modify storage fz:installed fz.module.health set value 1b \ No newline at end of file diff --git a/data/fz/functions/module/health/load.mcfunction b/data/fz/functions/module/health/load.mcfunction new file mode 100644 index 0000000..9e85796 --- /dev/null +++ b/data/fz/functions/module/health/load.mcfunction @@ -0,0 +1,5 @@ +function #fz:module/health/set_health_name +execute unless data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName fz.module.health +execute if data storage fz:config fz.module.health.display{below_name: 0b} run scoreboard objectives setdisplay belowName +execute unless data storage fz:config fz.module.health.display{list: 0b} run scoreboard objectives setdisplay list fz.module.health +execute if data storage fz:config fz.module.health.display{list: 0b} run scoreboard objectives setdisplay list \ No newline at end of file diff --git a/data/fz/functions/module/health/set_health_name/default.mcfunction b/data/fz/functions/module/health/set_health_name/default.mcfunction new file mode 100644 index 0000000..080be29 --- /dev/null +++ b/data/fz/functions/module/health/set_health_name/default.mcfunction @@ -0,0 +1 @@ +scoreboard objectives modify fz.module.health displayname {"text": "血量", "color": "red"} \ No newline at end of file diff --git a/data/fz/functions/module/health/set_health_name/preset_1.mcfunction b/data/fz/functions/module/health/set_health_name/preset_1.mcfunction new file mode 100644 index 0000000..5d61093 --- /dev/null +++ b/data/fz/functions/module/health/set_health_name/preset_1.mcfunction @@ -0,0 +1 @@ +scoreboard objectives modify fz.module.health displayname {"text": "HP"} \ No newline at end of file diff --git a/data/fz/functions/module/health/set_health_name/preset_2.mcfunction b/data/fz/functions/module/health/set_health_name/preset_2.mcfunction new file mode 100644 index 0000000..56d2dee --- /dev/null +++ b/data/fz/functions/module/health/set_health_name/preset_2.mcfunction @@ -0,0 +1 @@ +scoreboard objectives modify fz.module.health displayname {"text": "厘米", "color": "gold"} \ No newline at end of file diff --git a/data/fz/functions/module/health/set_health_name/preset_3.mcfunction b/data/fz/functions/module/health/set_health_name/preset_3.mcfunction new file mode 100644 index 0000000..7d6817e --- /dev/null +++ b/data/fz/functions/module/health/set_health_name/preset_3.mcfunction @@ -0,0 +1 @@ +scoreboard objectives modify fz.module.health displayname {"text": "cm", "color": "gold"} \ No newline at end of file diff --git a/data/fz/functions/module/health/set_health_name/preset_4.mcfunction b/data/fz/functions/module/health/set_health_name/preset_4.mcfunction new file mode 100644 index 0000000..7019d51 --- /dev/null +++ b/data/fz/functions/module/health/set_health_name/preset_4.mcfunction @@ -0,0 +1 @@ +scoreboard objectives modify fz.module.health displayname {"text": "节操值", "color": "green"} \ No newline at end of file diff --git a/data/fz/functions/module/health/set_health_name/preset_5.mcfunction b/data/fz/functions/module/health/set_health_name/preset_5.mcfunction new file mode 100644 index 0000000..a5c8fec --- /dev/null +++ b/data/fz/functions/module/health/set_health_name/preset_5.mcfunction @@ -0,0 +1 @@ +scoreboard objectives modify fz.module.health displayname {"text": "沙雕值", "color": "yellow"} \ No newline at end of file diff --git a/data/fz/functions/module/health/uninstall.mcfunction b/data/fz/functions/module/health/uninstall.mcfunction new file mode 100644 index 0000000..7f0bf35 --- /dev/null +++ b/data/fz/functions/module/health/uninstall.mcfunction @@ -0,0 +1,5 @@ +scoreboard objectives remove fz.module.health +data remove storage fz:config fz.module.health + +## 标记为已卸载 +data modify storage fz:installed fz.module.health set value 0b \ No newline at end of file diff --git a/data/fz/functions/module/here/custom_dimension_message/if_in_overworld.mcfunction b/data/fz/functions/module/here/custom_dimension_message/if_in_overworld.mcfunction new file mode 100644 index 0000000..90795d7 --- /dev/null +++ b/data/fz/functions/module/here/custom_dimension_message/if_in_overworld.mcfunction @@ -0,0 +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[0] set value '{"text": "主世界", "color": "dark_green"}' +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 diff --git a/data/fz/functions/module/here/custom_dimension_message/if_in_the_nether.mcfunction b/data/fz/functions/module/here/custom_dimension_message/if_in_the_nether.mcfunction new file mode 100644 index 0000000..53c0d75 --- /dev/null +++ b/data/fz/functions/module/here/custom_dimension_message/if_in_the_nether.mcfunction @@ -0,0 +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[0] set value '{"text": "下届", "color": "dark_red"}' +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 diff --git a/data/fz/functions/module/here/custom_dimension_message/overworld.mcfunction b/data/fz/functions/module/here/custom_dimension_message/overworld.mcfunction new file mode 100644 index 0000000..7a35787 --- /dev/null +++ b/data/fz/functions/module/here/custom_dimension_message/overworld.mcfunction @@ -0,0 +1 @@ +execute if data storage fz:data_viewer fz.here.cache{dimension:"minecraft:overworld"} run function fz:module/here/custom_dimension_message/if_in_overworld \ No newline at end of file diff --git a/data/fz/functions/module/here/custom_dimension_message/the_nether.mcfunction b/data/fz/functions/module/here/custom_dimension_message/the_nether.mcfunction new file mode 100644 index 0000000..4ba9d75 --- /dev/null +++ b/data/fz/functions/module/here/custom_dimension_message/the_nether.mcfunction @@ -0,0 +1 @@ +execute if data storage fz:data_viewer fz.here.cache{dimension:"minecraft:the_nether"} run function fz:module/here/custom_dimension_message/if_in_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 new file mode 100644 index 0000000..7dba9c6 --- /dev/null +++ b/data/fz/functions/module/here/get_message.mcfunction @@ -0,0 +1,9 @@ +data modify storage fz:here fz.cache.dimension set from entity @s Dimension +data modify storage fz:here fz.cache.pos set value [0, 0, 0] +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 ["", "", ""] +data modify storage fz:here fz.cache.message[0] set value '{"nbt": "fz.cache.dimension", "storage": "fz:here"}' +data modify storage fz:here fz.cache.message[1] set value '[{"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": "]"}]' +function #fz:module/here/custom_message \ 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 new file mode 100644 index 0000000..ee84ff0 --- /dev/null +++ b/data/fz/functions/module/here/global_message.mcfunction @@ -0,0 +1,3 @@ +function fz:module/here/get_message + +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 diff --git a/data/fz/functions/module/here/private_message.mcfunction b/data/fz/functions/module/here/private_message.mcfunction new file mode 100644 index 0000000..da9138c --- /dev/null +++ b/data/fz/functions/module/here/private_message.mcfunction @@ -0,0 +1,3 @@ +function fz:module/here/get_message + +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 diff --git a/data/fz/functions/module/here/uninstall.mcfunction b/data/fz/functions/module/here/uninstall.mcfunction new file mode 100644 index 0000000..926b6bf --- /dev/null +++ b/data/fz/functions/module/here/uninstall.mcfunction @@ -0,0 +1 @@ +data remove storage fz:here fz \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/activation.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/activation.mcfunction index 0f9da02..89a1875 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/activation.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/activation.mcfunction @@ -1,2 +1,6 @@ +## 为了扩展性,尽量想把这种硬编码的字段写在同一个文件里方便覆盖 +## 但为了实现这一目标,在此处除了每次添加一次队伍以外,暂时没有找到其他好方法,不知道性能如何 +team join fz.module.scoreboard.display.activation 总活跃时间 + scoreboard players operation 总活跃时间 fz.module.scoreboard.display.general = fz.module.scoreboard.total.activation fz.module.scoreboard.assign.general scoreboard players operation 总活跃时间 fz.module.scoreboard.display.activation = fz.module.scoreboard.total.activation fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.mcfunction index a08efcb..f142a70 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.mcfunction @@ -1,2 +1,4 @@ +team join fz.module.scoreboard.display.aviating_distance 总飞行距离 + scoreboard players operation 总飞行距离 fz.module.scoreboard.display.general = fz.module.scoreboard.total.aviating_distance fz.module.scoreboard.assign.general scoreboard players operation 总飞行距离 fz.module.scoreboard.display.aviating_distance = fz.module.scoreboard.total.aviating_distance fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/damage_taken.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/damage_taken.mcfunction index 1807a23..15a593e 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/damage_taken.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/damage_taken.mcfunction @@ -1,2 +1,4 @@ +team join fz.module.scoreboard.display.damage_taken 总受伤害量 + scoreboard players operation 总受伤害量 fz.module.scoreboard.display.general = fz.module.scoreboard.total.damage_taken fz.module.scoreboard.assign.general scoreboard players operation 总受伤害量 fz.module.scoreboard.display.damage_taken = fz.module.scoreboard.total.damage_taken fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/death_count.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/death_count.mcfunction index 7d24f8c..75903ef 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/death_count.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/death_count.mcfunction @@ -1,2 +1,4 @@ +team join fz.module.scoreboard.display.death_count 总死亡次数 + scoreboard players operation 总死亡次数 fz.module.scoreboard.display.general = fz.module.scoreboard.total.death_count fz.module.scoreboard.assign.general scoreboard players operation 总死亡次数 fz.module.scoreboard.display.death_count = fz.module.scoreboard.total.death_count fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/dig_count.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/dig_count.mcfunction index 9fcd274..8cae03f 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/dig_count.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/dig_count.mcfunction @@ -1,2 +1,4 @@ +team join fz.module.scoreboard.display.dig_count 总挖掘量 + scoreboard players operation 总挖掘量 fz.module.scoreboard.display.general = fz.module.scoreboard.total.dig_count fz.module.scoreboard.assign.general scoreboard players operation 总挖掘量 fz.module.scoreboard.display.dig_count = fz.module.scoreboard.total.dig_count fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/fishing_count.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/fishing_count.mcfunction index 71842f5..216f7b6 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/fishing_count.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/fishing_count.mcfunction @@ -1,2 +1,4 @@ -scoreboard players operation 总受伤害量 fz.module.scoreboard.display.general = fz.module.scoreboard.total.fishing_count fz.module.scoreboard.assign.general -scoreboard players operation 总受伤害量 fz.module.scoreboard.display.fishing_count = fz.module.scoreboard.total.fishing_count fz.module.scoreboard.assign.general \ No newline at end of file +team join fz.module.scoreboard.display.fishing_count 总钓鱼数 + +scoreboard players operation 总钓鱼数 fz.module.scoreboard.display.general = fz.module.scoreboard.total.fishing_count fz.module.scoreboard.assign.general +scoreboard players operation 总钓鱼数 fz.module.scoreboard.display.fishing_count = fz.module.scoreboard.total.fishing_count fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/kill_count.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/kill_count.mcfunction index 0b29dd5..34bdd30 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/kill_count.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/kill_count.mcfunction @@ -1,2 +1,4 @@ -scoreboard players operation 总交易量 fz.module.scoreboard.display.general = fz.module.scoreboard.total.kill_count fz.module.scoreboard.assign.general -scoreboard players operation 总交易量 fz.module.scoreboard.display.kill_count = fz.module.scoreboard.total.kill_count fz.module.scoreboard.assign.general \ No newline at end of file +team join fz.module.scoreboard.display.kill_count 总击杀数 + +scoreboard players operation 总击杀数 fz.module.scoreboard.display.general = fz.module.scoreboard.total.kill_count fz.module.scoreboard.assign.general +scoreboard players operation 总击杀数 fz.module.scoreboard.display.kill_count = fz.module.scoreboard.total.kill_count fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction index 1585136..e6291b9 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction @@ -1,2 +1,4 @@ -scoreboard players operation 总交易量 fz.module.scoreboard.display.general = fz.module.scoreboard.total.placement_count fz.module.scoreboard.assign.general -scoreboard players operation 总交易量 fz.module.scoreboard.display.placement_count = fz.module.scoreboard.total.placement_count fz.module.scoreboard.assign.general \ No newline at end of file +team join fz.module.scoreboard.display.placement_count 总放置方块数 + +scoreboard players operation 总放置方块数 fz.module.scoreboard.display.general = fz.module.scoreboard.total.placement_count fz.module.scoreboard.assign.general +scoreboard players operation 总放置方块数 fz.module.scoreboard.display.placement_count = fz.module.scoreboard.total.placement_count fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/assign/scoreboard/general/trade_count.mcfunction b/data/fz/functions/module/scoreboard/assign/scoreboard/general/trade_count.mcfunction index 818e96d..cc9db46 100644 --- a/data/fz/functions/module/scoreboard/assign/scoreboard/general/trade_count.mcfunction +++ b/data/fz/functions/module/scoreboard/assign/scoreboard/general/trade_count.mcfunction @@ -1,2 +1,4 @@ +team join fz.module.scoreboard.display.trade_count 总交易量 + scoreboard players operation 总交易量 fz.module.scoreboard.display.general = fz.module.scoreboard.total.trade_count fz.module.scoreboard.assign.general scoreboard players operation 总交易量 fz.module.scoreboard.display.trade_count = fz.module.scoreboard.total.trade_count fz.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/config/display/buttons.mcfunction b/data/fz/functions/module/scoreboard/config/display/buttons.mcfunction index 6ad4b3a..00a338d 100644 --- a/data/fz/functions/module/scoreboard/config/display/buttons.mcfunction +++ b/data/fz/functions/module/scoreboard/config/display/buttons.mcfunction @@ -1,3 +1,3 @@ # 调用者:#fz:module/scoreboard/config/display/buttons -tellraw @s [[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "关", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1000"}}, {"text": "关", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1010"}}, {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1020"}}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1030"}}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1040"}}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1050"}}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1060"}}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1070"}}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1080"}}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1090"}}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1100"}}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}, {"text": "]"}]] \ No newline at end of file +execute if data storage fz:installed fz.module{scoreboard:1b} run tellraw @s [[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "关", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1000"}}, {"text": "关", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1010"}}, {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1020"}}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1030"}}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1040"}}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1050"}}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1060"}}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1070"}}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1080"}}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1090"}}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1100"}}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}, {"text": "]"}]] \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/config/display/head.mcfunction b/data/fz/functions/module/scoreboard/config/display/head.mcfunction index 8ba1f65..98c8a9d 100644 --- a/data/fz/functions/module/scoreboard/config/display/head.mcfunction +++ b/data/fz/functions/module/scoreboard/config/display/head.mcfunction @@ -1,3 +1,3 @@ # 调用者:#fz:module/scoreboard/config/display/head -tellraw @s {"text": "计分板:"} \ No newline at end of file +execute if data storage fz:installed fz.module{scoreboard:1b} run tellraw @s {"text": "计分板:"} \ 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 f6a4af8..18c13c0 100644 --- a/data/fz/functions/module/scoreboard/install.mcfunction +++ b/data/fz/functions/module/scoreboard/install.mcfunction @@ -52,7 +52,7 @@ scoreboard objectives add fz.module.scoreboard.display.trade_count dummy team add fz.module.scoreboard.display.trade_count ## 标记为已安装 -data modify storage fz:install_manager fz.module.scoreboard set value 1b +data modify storage fz:installed fz.module.scoreboard set value 1b ## 日志 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已安装组件:计分板"}] \ No newline at end of file diff --git a/data/fz/functions/module/scoreboard/uninstall.mcfunction b/data/fz/functions/module/scoreboard/uninstall.mcfunction index 863f2b8..cc6ee9d 100644 --- a/data/fz/functions/module/scoreboard/uninstall.mcfunction +++ b/data/fz/functions/module/scoreboard/uninstall.mcfunction @@ -29,7 +29,7 @@ team remove fz.module.scoreboard.display.trade_count execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}] ## 标记为已卸载 -data modify storage fz:install_manager fz.module.scoreboard set value 0b +data modify storage fz:installed fz.module.scoreboard set value 0b ## 日志 execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已卸载组件:计分板"}] \ No newline at end of file diff --git a/data/fz/functions/module/sweeper/install.mcfunction b/data/fz/functions/module/sweeper/install.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/module/sweeper/load.mcfunction b/data/fz/functions/module/sweeper/load.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/module/sweeper/uninstall.mcfunction b/data/fz/functions/module/sweeper/uninstall.mcfunction deleted file mode 100644 index e69de29..0000000 diff --git a/data/fz/functions/module/try_install.mcfunction b/data/fz/functions/module/try_install.mcfunction new file mode 100644 index 0000000..f7ba572 --- /dev/null +++ b/data/fz/functions/module/try_install.mcfunction @@ -0,0 +1,5 @@ +# 调用者:#fz:module/try_load + +## 判断是否从未安装,如果是则安装 +execute unless data storage fz:installed fz.module.config run function #fz:module/config/install +execute unless data storage fz:installed fz.module.scoreboard run function #fz:module/scoreboard/install diff --git a/data/fz/functions/module/try_load.mcfunction b/data/fz/functions/module/try_load.mcfunction index d1d5239..2cb59f0 100644 --- a/data/fz/functions/module/try_load.mcfunction +++ b/data/fz/functions/module/try_load.mcfunction @@ -1,6 +1,6 @@ # 调用者:#fz:module/try_load ## 判断是否安装,如果安装则加载 -execute if data storage fz:install_manager fz.module{config:1b} run function #fz:module/config/load -execute if data storage fz:install_manager fz.module{scoreboard:1b} run function #fz:module/scoreboard/load -execute if data storage fz:install_manager fz.module{sweeper:1b} run function #fz:module/sweeper/load +execute if data storage fz:installed fz.module{config:1b} run function #fz:module/config/load +execute if data storage fz:installed fz.module{health:1b} run function #fz:module/health/load +execute if data storage fz:installed fz.module{scoreboard:1b} run function #fz:module/scoreboard/load diff --git a/data/fz/functions/system/install.mcfunction b/data/fz/functions/system/install.mcfunction new file mode 100644 index 0000000..e1e007b --- /dev/null +++ b/data/fz/functions/system/install.mcfunction @@ -0,0 +1,2 @@ +## 整数类型 +scoreboard objectives add fz.variable.integer dummy \ No newline at end of file diff --git a/data/fz/functions/system/installed.mcfunction b/data/fz/functions/system/installed.mcfunction new file mode 100644 index 0000000..4cc67be --- /dev/null +++ b/data/fz/functions/system/installed.mcfunction @@ -0,0 +1,5 @@ +## 标记为已安装 +data modify storage fz:installed fz.global set value 1b + +## 日志 +tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "安装完成!"}] \ No newline at end of file diff --git a/data/fz/functions/system/load.mcfunction b/data/fz/functions/system/load.mcfunction new file mode 100644 index 0000000..4cc788f --- /dev/null +++ b/data/fz/functions/system/load.mcfunction @@ -0,0 +1,4 @@ +## 常量 +scoreboard players set 10 fz.variable.integer 10 +scoreboard players set 200 fz.variable.integer 200 +scoreboard players set 72000 fz.variable.integer 72000 \ No newline at end of file diff --git a/data/fz/functions/system/loaded.mcfunction b/data/fz/functions/system/loaded.mcfunction new file mode 100644 index 0000000..6f446ef --- /dev/null +++ b/data/fz/functions/system/loaded.mcfunction @@ -0,0 +1,2 @@ +## 日志 +execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "加载完成!"}] \ No newline at end of file diff --git a/data/fz/functions/system/uninstall.mcfunction b/data/fz/functions/system/uninstall.mcfunction new file mode 100644 index 0000000..02247bb --- /dev/null +++ b/data/fz/functions/system/uninstall.mcfunction @@ -0,0 +1,5 @@ +## 整数类型 +scoreboard objectives remove fz.variable.integer + +## 卸载配置信息 +data remove storage fz:config fz \ No newline at end of file diff --git a/data/fz/functions/system/uninstalled.mcfunction b/data/fz/functions/system/uninstalled.mcfunction new file mode 100644 index 0000000..d2a330a --- /dev/null +++ b/data/fz/functions/system/uninstalled.mcfunction @@ -0,0 +1,5 @@ +## 标记为已卸载 +data modify storage fz:installed fz.global set value 0b + +## 日志 +execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "卸载完成!"}] \ No newline at end of file diff --git a/data/fz/functions/uninstall.mcfunction b/data/fz/functions/uninstall.mcfunction deleted file mode 100644 index fdb3d13..0000000 --- a/data/fz/functions/uninstall.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -# 调用者:#fz:uninstall - -function #fz:module/uninstall - -## 整数类型 -scoreboard objectives remove fz.variable.integer - -function fz:event/uninstall -function fz:logger/uninstall - -## 标记为已卸载 -data remove storage fz:install_manager fz -data modify storage fz:install_manager fz.global set value 0b - -## 日志 -execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "卸载完成!"}] \ No newline at end of file diff --git a/data/fz/functions/boot_manager/0.mcfunction b/data/fz/predicates/in_dimension_overworld.json similarity index 100% rename from data/fz/functions/boot_manager/0.mcfunction rename to data/fz/predicates/in_dimension_overworld.json diff --git a/data/fz/functions/boot_manager/1.mcfunction b/data/fz/predicates/in_dimension_the_nether.json similarity index 100% rename from data/fz/functions/boot_manager/1.mcfunction rename to data/fz/predicates/in_dimension_the_nether.json diff --git a/data/fz/tags/functions/event/module/config/on_config.json b/data/fz/tags/functions/event/module/config/on_config.json deleted file mode 100644 index c6b733f..0000000 --- a/data/fz/tags/functions/event/module/config/on_config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "__comment": "调用者:fz:event/on_unsneak,当玩家抬头到最高角度并蹲起后,触发此事件", - "replace": false, - "values": [ - "#fz:module/config/on_config" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/event/player/on_hurt_entity_with_tools.json b/data/fz/tags/functions/event/player/on_hurt_entity_with_tools.json deleted file mode 100644 index 0673d42..0000000 --- a/data/fz/tags/functions/event/player/on_hurt_entity_with_tools.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "#fz:event/player/on_dig/reset_used_tools" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/event/player/on_unsneak.json b/data/fz/tags/functions/event/player/on_unsneak.json deleted file mode 100644 index 4614599..0000000 --- a/data/fz/tags/functions/event/player/on_unsneak.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "__comment": "调用者:fz:event/on_unsneaked,当玩家蹲起后触发此事件", - "replace": false, - "values": [] -} \ No newline at end of file diff --git a/data/fz/tags/functions/event/player/on_used_tool/reset_used_tool.json b/data/fz/tags/functions/event/player/on_used_tool/reset_used_tool.json deleted file mode 100644 index ba1aa74..0000000 --- a/data/fz/tags/functions/event/player/on_used_tool/reset_used_tool.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "fz:event/player/on_used_tool/reset_used_tool" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/event/reset_all.json b/data/fz/tags/functions/event/reset_all.json deleted file mode 100644 index dfca80a..0000000 --- a/data/fz/tags/functions/event/reset_all.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "#fz:event/player/reset_advancements", - "#fz:event/player/on_dig/reset_used_tools" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/event/player/on_aviate_one_meter.json b/data/fz/tags/functions/game_event/player/on_aviate_one_meter.json similarity index 100% rename from data/fz/tags/functions/event/player/on_aviate_one_meter.json rename to data/fz/tags/functions/game_event/player/on_aviate_one_meter.json diff --git a/data/fz/tags/functions/event/player/on_broke_block.json b/data/fz/tags/functions/game_event/player/on_broke_block.json similarity index 100% rename from data/fz/tags/functions/event/player/on_broke_block.json rename to data/fz/tags/functions/game_event/player/on_broke_block.json diff --git a/data/fz/tags/functions/event/player/on_dead.json b/data/fz/tags/functions/game_event/player/on_dead.json similarity index 100% rename from data/fz/tags/functions/event/player/on_dead.json rename to data/fz/tags/functions/game_event/player/on_dead.json diff --git a/data/fz/tags/functions/event/player/on_fished.json b/data/fz/tags/functions/game_event/player/on_fished.json similarity index 100% rename from data/fz/tags/functions/event/player/on_fished.json rename to data/fz/tags/functions/game_event/player/on_fished.json diff --git a/data/fz/tags/functions/event/player/on_shears_used_on_entity.json b/data/fz/tags/functions/game_event/player/on_hurt_entity_with_tools.json similarity index 100% rename from data/fz/tags/functions/event/player/on_shears_used_on_entity.json rename to data/fz/tags/functions/game_event/player/on_hurt_entity_with_tools.json diff --git a/data/fz/tags/functions/event/player/on_killed_mob_or_player.json b/data/fz/tags/functions/game_event/player/on_killed_mob_or_player.json similarity index 100% rename from data/fz/tags/functions/event/player/on_killed_mob_or_player.json rename to data/fz/tags/functions/game_event/player/on_killed_mob_or_player.json diff --git a/data/fz/tags/functions/event/player/on_login.json b/data/fz/tags/functions/game_event/player/on_login.json similarity index 71% rename from data/fz/tags/functions/event/player/on_login.json rename to data/fz/tags/functions/game_event/player/on_login.json index 4736be3..4df8db9 100644 --- a/data/fz/tags/functions/event/player/on_login.json +++ b/data/fz/tags/functions/game_event/player/on_login.json @@ -1,7 +1,7 @@ { "replace": false, "values": [ - "#fz:event/reset_all", + "#fz:game_event/reset_all", "#fz:module/config/reset_trigger" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/event/player/on_piglin_trade.json b/data/fz/tags/functions/game_event/player/on_piglin_trade.json similarity index 100% rename from data/fz/tags/functions/event/player/on_piglin_trade.json rename to data/fz/tags/functions/game_event/player/on_piglin_trade.json diff --git a/data/fz/tags/functions/event/player/on_placed_block.json b/data/fz/tags/functions/game_event/player/on_placed_block.json similarity index 100% rename from data/fz/tags/functions/event/player/on_placed_block.json rename to data/fz/tags/functions/game_event/player/on_placed_block.json diff --git a/data/fz/tags/functions/event/player/on_play_one_hour.json b/data/fz/tags/functions/game_event/player/on_play_one_hour.json similarity index 100% rename from data/fz/tags/functions/event/player/on_play_one_hour.json rename to data/fz/tags/functions/game_event/player/on_play_one_hour.json diff --git a/data/fz/tags/functions/event/player/on_sneak.json b/data/fz/tags/functions/game_event/player/on_shears_used_on_entity.json similarity index 100% rename from data/fz/tags/functions/event/player/on_sneak.json rename to data/fz/tags/functions/game_event/player/on_shears_used_on_entity.json diff --git a/data/fz/tags/functions/event/player/on_tools_right_click_used.json b/data/fz/tags/functions/game_event/player/on_sneak.json similarity index 100% rename from data/fz/tags/functions/event/player/on_tools_right_click_used.json rename to data/fz/tags/functions/game_event/player/on_sneak.json diff --git a/data/fz/tags/functions/event/player/on_took_damage.json b/data/fz/tags/functions/game_event/player/on_took_damage.json similarity index 100% rename from data/fz/tags/functions/event/player/on_took_damage.json rename to data/fz/tags/functions/game_event/player/on_took_damage.json diff --git a/data/fz/tags/functions/event/player/on_tools_used_on_block.json b/data/fz/tags/functions/game_event/player/on_tools_right_click_used.json similarity index 100% rename from data/fz/tags/functions/event/player/on_tools_used_on_block.json rename to data/fz/tags/functions/game_event/player/on_tools_right_click_used.json diff --git a/data/fz/tags/functions/event/player/on_used_tool.json b/data/fz/tags/functions/game_event/player/on_tools_used_on_block.json similarity index 100% rename from data/fz/tags/functions/event/player/on_used_tool.json rename to data/fz/tags/functions/game_event/player/on_tools_used_on_block.json diff --git a/data/fz/tags/functions/game_event/player/on_unsneak.json b/data/fz/tags/functions/game_event/player/on_unsneak.json new file mode 100644 index 0000000..578af4d --- /dev/null +++ b/data/fz/tags/functions/game_event/player/on_unsneak.json @@ -0,0 +1,7 @@ +{ + "__comment": "调用者:fz:game_event/on_unsneaked,当玩家蹲起后触发此事件", + "replace": false, + "values": [ + "fz:module/config/event/on_unsneak" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/event/module/config/on_click.json b/data/fz/tags/functions/game_event/player/on_used_tool.json similarity index 55% rename from data/fz/tags/functions/event/module/config/on_click.json rename to data/fz/tags/functions/game_event/player/on_used_tool.json index a7bfb04..907e30b 100644 --- a/data/fz/tags/functions/event/module/config/on_click.json +++ b/data/fz/tags/functions/game_event/player/on_used_tool.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "#fz:module/config/on_click" + ] } \ No newline at end of file diff --git a/data/fz/tags/functions/game_event/player/on_used_tool/reset_used_tool.json b/data/fz/tags/functions/game_event/player/on_used_tool/reset_used_tool.json new file mode 100644 index 0000000..35d3d69 --- /dev/null +++ b/data/fz/tags/functions/game_event/player/on_used_tool/reset_used_tool.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:game_event/player/on_used_tool/reset_used_tool" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/event/player/on_villager_trade.json b/data/fz/tags/functions/game_event/player/on_villager_trade.json similarity index 100% rename from data/fz/tags/functions/event/player/on_villager_trade.json rename to data/fz/tags/functions/game_event/player/on_villager_trade.json diff --git a/data/fz/tags/functions/game_event/player/reset_advancements.json b/data/fz/tags/functions/game_event/player/reset_advancements.json new file mode 100644 index 0000000..d2e9363 --- /dev/null +++ b/data/fz/tags/functions/game_event/player/reset_advancements.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:game_event/player/reset_advancements" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/game_event/reset_all.json b/data/fz/tags/functions/game_event/reset_all.json new file mode 100644 index 0000000..b7ea842 --- /dev/null +++ b/data/fz/tags/functions/game_event/reset_all.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "#fz:game_event/player/reset_advancements", + "#fz:game_event/player/on_used_tool/reset_used_tool" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/install.json b/data/fz/tags/functions/install.json index e9fc9c3..6e0ceec 100644 --- a/data/fz/tags/functions/install.json +++ b/data/fz/tags/functions/install.json @@ -1,7 +1,8 @@ { - "__comment": "调用者:fz:entry", "replace": false, "values": [ - "fz:install" + "#fz:system/install/system", + "#fz:system/install/module", + "#fz:system/install/installed" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/load.json b/data/fz/tags/functions/load.json index 730de65..c30bb28 100644 --- a/data/fz/tags/functions/load.json +++ b/data/fz/tags/functions/load.json @@ -1,7 +1,8 @@ { - "__comment": "调用者:fz:entry", "replace": false, "values": [ - "fz:load" + "#fz:system/load/system", + "#fz:system/load/module", + "#fz:system/load/loaded" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/config/display.json b/data/fz/tags/functions/module/config/display.json index d1ccef1..c0e1bea 100644 --- a/data/fz/tags/functions/module/config/display.json +++ b/data/fz/tags/functions/module/config/display.json @@ -2,7 +2,6 @@ "__comment": "调用者:fz:module/config/on_click、fz:module/config/trigger", "replace": false, "values": [ - "#fz:module/scoreboard/config/display/head", - "#fz:module/scoreboard/config/display/buttons" + "#fz:module/scoreboard/config/display" ] } \ 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 cb79e53..6684d3e 100644 --- a/data/fz/tags/functions/module/config/on_click.json +++ b/data/fz/tags/functions/module/config/on_click.json @@ -1,7 +1,7 @@ { - "__comment": "调用者:fz:module/config/loop", "replace": false, "values": [ - "fz:module/config/on_click" + "fz:module/config/on_click", + "fz:module/scoreboard/config/on_click" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/config/on_config.json b/data/fz/tags/functions/module/config/on_config.json index 09d3d17..f5f752d 100644 --- a/data/fz/tags/functions/module/config/on_config.json +++ b/data/fz/tags/functions/module/config/on_config.json @@ -1,4 +1,5 @@ { + "__comment": "调用者:fz:event/on_unsneak,当玩家抬头到最高角度并蹲起后,触发此事件", "replace": false, "values": [ "fz:module/config/on_config" diff --git a/data/fz/tags/functions/event/player/reset_advancements.json b/data/fz/tags/functions/module/health/install.json similarity index 51% rename from data/fz/tags/functions/event/player/reset_advancements.json rename to data/fz/tags/functions/module/health/install.json index fd1034a..dc1241a 100644 --- a/data/fz/tags/functions/event/player/reset_advancements.json +++ b/data/fz/tags/functions/module/health/install.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "fz:event/player/reset_advancements" + "fz:module/health/install" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/health/load.json b/data/fz/tags/functions/module/health/load.json new file mode 100644 index 0000000..c63d310 --- /dev/null +++ b/data/fz/tags/functions/module/health/load.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:module/health/load" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/health/set_health_name.json b/data/fz/tags/functions/module/health/set_health_name.json new file mode 100644 index 0000000..413b2e6 --- /dev/null +++ b/data/fz/tags/functions/module/health/set_health_name.json @@ -0,0 +1,9 @@ +{ + "__comment": "用于自定义血量单位", + "__comment_replace": "编写扩展数据包时必须为true", + "replace": false, + "__comment_values": "此处只能填写一个函数!", + "values": [ + "fz:module/health/set_health_name/default" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/health/uninstall.json b/data/fz/tags/functions/module/health/uninstall.json new file mode 100644 index 0000000..3018803 --- /dev/null +++ b/data/fz/tags/functions/module/health/uninstall.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:module/health/uninstall" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/here/custom_dimension_message.json b/data/fz/tags/functions/module/here/custom_dimension_message.json new file mode 100644 index 0000000..e88316f --- /dev/null +++ b/data/fz/tags/functions/module/here/custom_dimension_message.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "fz:module/here/custom_dimension_message/overworld", + "fz:module/here/custom_dimension_message/the_nether" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/here/uninstall.json b/data/fz/tags/functions/module/here/uninstall.json new file mode 100644 index 0000000..28e444d --- /dev/null +++ b/data/fz/tags/functions/module/here/uninstall.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:module/here/uninstall" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/install.json b/data/fz/tags/functions/module/install.json deleted file mode 100644 index b74c5bc..0000000 --- a/data/fz/tags/functions/module/install.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "__comment": "调用者:fz:install", - "replace": false, - "values": [ - "#fz:module/config/install", - "#fz:module/scoreboard/install", - "#fz:module/sweeper/install" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/activation.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/activation.json index 692d174..7f4bd51 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/activation.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/activation.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/activation" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.json index 2795de8..9fb2d9f 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/aviating_distance.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/aviating_distance" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/damage_taken.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/damage_taken.json index 9d73c5d..d66db60 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/damage_taken.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/damage_taken.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/damage_taken" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/death_count.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/death_count.json index 2cc9174..87a25c5 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/death_count.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/death_count.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/death_count" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/dig_count.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/dig_count.json index 9ec4db1..f39bd7a 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/dig_count.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/dig_count.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/dig_count" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/fishing_count.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/fishing_count.json index a6952fb..a686849 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/fishing_count.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/fishing_count.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/fishing_count" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/kill_count.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/kill_count.json index ef2adaf..b9931c3 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/kill_count.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/kill_count.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/kill_count" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/placement_count.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/placement_count.json index f0d857f..559641d 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/placement_count.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/placement_count.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/placement_count" ] diff --git a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/trade_count.json b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/trade_count.json index 1d135d2..d0fb556 100644 --- a/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/trade_count.json +++ b/data/fz/tags/functions/module/scoreboard/assign/scoreboard/general/trade_count.json @@ -1,5 +1,7 @@ { + "__comment_replace": "编写扩展数据包时必须为true", "replace": false, + "__comment_values": "此处只能填写一个函数!", "values": [ "fz:module/scoreboard/assign/scoreboard/general/trade_count" ] diff --git a/data/fz/tags/functions/module/scoreboard/config/display/buttons.json b/data/fz/tags/functions/module/scoreboard/config/display.json similarity index 63% rename from data/fz/tags/functions/module/scoreboard/config/display/buttons.json rename to data/fz/tags/functions/module/scoreboard/config/display.json index 0060eb2..60469f9 100644 --- a/data/fz/tags/functions/module/scoreboard/config/display/buttons.json +++ b/data/fz/tags/functions/module/scoreboard/config/display.json @@ -1,7 +1,7 @@ { - "__comment": "调用者:#fz:module/config/display", "replace": false, "values": [ + "fz:module/scoreboard/config/display/head", "fz:module/scoreboard/config/display/buttons" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/config/display/head.json b/data/fz/tags/functions/module/scoreboard/config/display/head.json deleted file mode 100644 index 6ce6cd3..0000000 --- a/data/fz/tags/functions/module/scoreboard/config/display/head.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "__comment": "调用者:#fz:module/config/display", - "replace": false, - "values": [ - "fz:module/scoreboard/config/display/head" - ] -} \ 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 deleted file mode 100644 index aec410f..0000000 --- a/data/fz/tags/functions/module/scoreboard/config/on_click.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "__comment": "调用者:fz:module/config/on_click", - "replace": false, - "values": [ - "fz:module/scoreboard/config/on_click" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display.json index aa567f6..5db99b4 100644 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display.json +++ b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display.json @@ -1,15 +1,15 @@ { "replace": false, "values": [ - "#fz:module/scoreboard/display/carousel/try_display/activation", - "#fz:module/scoreboard/display/carousel/try_display/aviating_distance", - "#fz:module/scoreboard/display/carousel/try_display/damage_taken", - "#fz:module/scoreboard/display/carousel/try_display/death_count", - "#fz:module/scoreboard/display/carousel/try_display/dig_count", - "#fz:module/scoreboard/display/carousel/try_display/fishing_count", - "#fz:module/scoreboard/display/carousel/try_display/general", - "#fz:module/scoreboard/display/carousel/try_display/kill_count", - "#fz:module/scoreboard/display/carousel/try_display/placement_count", - "#fz:module/scoreboard/display/carousel/try_display/trade_count" + "fz:module/scoreboard/display/carousel/try_display/activation", + "fz:module/scoreboard/display/carousel/try_display/aviating_distance", + "fz:module/scoreboard/display/carousel/try_display/damage_taken", + "fz:module/scoreboard/display/carousel/try_display/death_count", + "fz:module/scoreboard/display/carousel/try_display/dig_count", + "fz:module/scoreboard/display/carousel/try_display/fishing_count", + "fz:module/scoreboard/display/carousel/try_display/general", + "fz:module/scoreboard/display/carousel/try_display/kill_count", + "fz:module/scoreboard/display/carousel/try_display/placement_count", + "fz:module/scoreboard/display/carousel/try_display/trade_count" ] } \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/activation.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/activation.json deleted file mode 100644 index 26a6596..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/activation.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/activation" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/aviating_distance.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/aviating_distance.json deleted file mode 100644 index f8cf85d..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/aviating_distance.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/aviating_distance" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/damage_taken.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/damage_taken.json deleted file mode 100644 index 69849cf..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/damage_taken.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/damage_taken" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/death_count.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/death_count.json deleted file mode 100644 index bb61d87..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/death_count.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/death_count" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/dig_count.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/dig_count.json deleted file mode 100644 index 5c9bdbd..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/dig_count.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/dig_count" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/fishing_count.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/fishing_count.json deleted file mode 100644 index 4e3435c..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/fishing_count.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/fishing_count" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/general.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/general.json deleted file mode 100644 index 3aa495d..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/general.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/general" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/kill_count.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/kill_count.json deleted file mode 100644 index b07fdb0..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/kill_count.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/kill_count" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/placement_count.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/placement_count.json deleted file mode 100644 index 3a91330..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/placement_count.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "fz:module/scoreboard/display/carousel/try_display/placement_count" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/trade_count.json b/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/trade_count.json deleted file mode 100644 index 75907b5..0000000 --- a/data/fz/tags/functions/module/scoreboard/display/carousel/try_display/trade_count.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "__comment_replace": "编写扩展数据包时必须为true", - "replace": false, - "__comment_values": "此处只能填入一个函数!", - "values": [ - "fz:module/scoreboard/display/carousel/try_display/trade_count" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/sweeper/install.json b/data/fz/tags/functions/module/sweeper/install.json deleted file mode 100644 index 943cb08..0000000 --- a/data/fz/tags/functions/module/sweeper/install.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "__comment": "调用者:#fz:module/install", - "replace": false, - "values": [ - "fz:module/sweeper/install" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/sweeper/load.json b/data/fz/tags/functions/module/sweeper/load.json deleted file mode 100644 index 769beed..0000000 --- a/data/fz/tags/functions/module/sweeper/load.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "__comment": "调用者:fz:module/try_load", - "replace": false, - "values": [ - "fz:module/sweeper/load" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/sweeper/uninstall.json b/data/fz/tags/functions/module/sweeper/uninstall.json deleted file mode 100644 index a92a242..0000000 --- a/data/fz/tags/functions/module/sweeper/uninstall.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "__comment": "调用者:#fz:module/uninstall", - "replace": false, - "values": [ - "fz:module/sweeper/uninstall" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/module/try_install.json b/data/fz/tags/functions/module/try_install.json new file mode 100644 index 0000000..f6b5da7 --- /dev/null +++ b/data/fz/tags/functions/module/try_install.json @@ -0,0 +1,7 @@ +{ + "__comment": "调用者:fz:load", + "replace": false, + "values": [ + "fz:module/try_install" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/module/uninstall.json b/data/fz/tags/functions/module/uninstall.json deleted file mode 100644 index 9ea7622..0000000 --- a/data/fz/tags/functions/module/uninstall.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "__comment": "调用者:fz:uninstall", - "replace": false, - "values": [ - "#fz:module/config/uninstall", - "#fz:module/scoreboard/uninstall", - "#fz:module/sweeper/uninstall" - ] -} \ No newline at end of file diff --git a/data/fz/tags/functions/system/install/installed.json b/data/fz/tags/functions/system/install/installed.json new file mode 100644 index 0000000..a705943 --- /dev/null +++ b/data/fz/tags/functions/system/install/installed.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:system/installed" + ] +} \ 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 new file mode 100644 index 0000000..80da7aa --- /dev/null +++ b/data/fz/tags/functions/system/install/module.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "#fz:module/try_install" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/install/system.json b/data/fz/tags/functions/system/install/system.json new file mode 100644 index 0000000..23bf0ee --- /dev/null +++ b/data/fz/tags/functions/system/install/system.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "fz:system/install", + "fz:logger/install", + "fz:logger/load", + "fz:game_event/install" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/load/loaded.json b/data/fz/tags/functions/system/load/loaded.json new file mode 100644 index 0000000..e7cf16e --- /dev/null +++ b/data/fz/tags/functions/system/load/loaded.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:system/loaded" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/load/module.json b/data/fz/tags/functions/system/load/module.json new file mode 100644 index 0000000..cb8a6c3 --- /dev/null +++ b/data/fz/tags/functions/system/load/module.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "#fz:module/try_load" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/load/system.json b/data/fz/tags/functions/system/load/system.json new file mode 100644 index 0000000..0c9ffbd --- /dev/null +++ b/data/fz/tags/functions/system/load/system.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "fz:system/load", + "fz:logger/load" + ] +} \ 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 new file mode 100644 index 0000000..7d02ff7 --- /dev/null +++ b/data/fz/tags/functions/system/uninstall/module.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "#fz:module/config/uninstall", + "#fz:module/health/uninstall", + "#fz:module/here/uninstall", + "#fz:module/scoreboard/uninstall" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/uninstall/system.json b/data/fz/tags/functions/system/uninstall/system.json new file mode 100644 index 0000000..799e85b --- /dev/null +++ b/data/fz/tags/functions/system/uninstall/system.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "fz:system/uninstall", + "fz:game_event/uninstall", + "fz:logger/uninstall" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/system/uninstall/uninstalled.json b/data/fz/tags/functions/system/uninstall/uninstalled.json new file mode 100644 index 0000000..c31f26b --- /dev/null +++ b/data/fz/tags/functions/system/uninstall/uninstalled.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fz:system/uninstalled" + ] +} \ No newline at end of file diff --git a/data/fz/tags/functions/uninstall.json b/data/fz/tags/functions/uninstall.json index 777f5b9..3196d1b 100644 --- a/data/fz/tags/functions/uninstall.json +++ b/data/fz/tags/functions/uninstall.json @@ -1,7 +1,8 @@ { - "__comment": "调用者:fz:entry", "replace": false, "values": [ - "fz:uninstall" + "#fz:system/uninstall/module", + "#fz:system/uninstall/system", + "#fz:system/uninstall/uninstalled" ] } \ No newline at end of file