完善系统核心功能、添加here模块
This commit is contained in:
parent
4665599abb
commit
596ebd9d64
@ -2,7 +2,7 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
{
|
||||
"id": "fz.admin.implement:autocarpet",
|
||||
"id": "fz.admin:autocarpet",
|
||||
"required": true
|
||||
}
|
||||
]
|
||||
|
7
data/fz/advancements/game_event.json
Normal file
7
data/fz/advancements/game_event.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"criteria": {
|
||||
"root":{
|
||||
"trigger": "minecraft:impossible"
|
||||
}
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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
|
||||
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
|
@ -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": "的所有事件成就"}]
|
@ -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": "已安装系统组件:事件"}]
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_aviate_one_meter
|
@ -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
|
||||
function #fz:game_event/player/on_broke_block
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_dead
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_fished
|
@ -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
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_killed_mob_or_player
|
@ -7,4 +7,4 @@ scoreboard players set @s fz.event.leave_game 0
|
||||
|
||||
## 运行事件
|
||||
### 会调用reset_events标签,故本函数内不需要再重置事件进度
|
||||
function #fz:event/player/on_login
|
||||
function #fz:game_event/player/on_login
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_piglin_trade
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_placed_block
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_play_one_hour
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_shears_used_on_entity
|
@ -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
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_took_damage
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_tools_used_on_block
|
@ -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
|
||||
advancement revoke @s until fz:game_event/on_unsneak
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_used_tool
|
@ -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
|
||||
advancement revoke @s only fz:game_event/on_villager_trade
|
@ -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": "的所有事件进度"}]
|
@ -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": "已卸载系统组件:事件"}]
|
@ -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": "安装完成!"}]
|
@ -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": "加载完成!"}]
|
@ -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": "已安装系统组件:日志"}]
|
@ -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": "已卸载系统组件:日志"}]
|
||||
|
@ -0,0 +1,3 @@
|
||||
# 本目录用于存放向事件中注册的函数,并不用来新建事件
|
||||
|
||||
execute if entity @s[x_rotation = -90] run function #fz:module/config/on_config
|
@ -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": "已安装组件:配置"}]
|
@ -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
|
||||
|
@ -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": "已卸载组件:配置"}]
|
5
data/fz/functions/module/health/install.mcfunction
Normal file
5
data/fz/functions/module/health/install.mcfunction
Normal file
@ -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
|
5
data/fz/functions/module/health/load.mcfunction
Normal file
5
data/fz/functions/module/health/load.mcfunction
Normal file
@ -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
|
@ -0,0 +1 @@
|
||||
scoreboard objectives modify fz.module.health displayname {"text": "血量", "color": "red"}
|
@ -0,0 +1 @@
|
||||
scoreboard objectives modify fz.module.health displayname {"text": "HP"}
|
@ -0,0 +1 @@
|
||||
scoreboard objectives modify fz.module.health displayname {"text": "厘米", "color": "gold"}
|
@ -0,0 +1 @@
|
||||
scoreboard objectives modify fz.module.health displayname {"text": "cm", "color": "gold"}
|
@ -0,0 +1 @@
|
||||
scoreboard objectives modify fz.module.health displayname {"text": "节操值", "color": "green"}
|
@ -0,0 +1 @@
|
||||
scoreboard objectives modify fz.module.health displayname {"text": "沙雕值", "color": "yellow"}
|
5
data/fz/functions/module/health/uninstall.mcfunction
Normal file
5
data/fz/functions/module/health/uninstall.mcfunction
Normal file
@ -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
|
@ -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": "]"}]]'
|
@ -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": "]"}]]'
|
@ -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
|
@ -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
|
9
data/fz/functions/module/here/get_message.mcfunction
Normal file
9
data/fz/functions/module/here/get_message.mcfunction
Normal file
@ -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
|
3
data/fz/functions/module/here/global_message.mcfunction
Normal file
3
data/fz/functions/module/here/global_message.mcfunction
Normal file
@ -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"}]
|
3
data/fz/functions/module/here/private_message.mcfunction
Normal file
3
data/fz/functions/module/here/private_message.mcfunction
Normal file
@ -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"}]
|
1
data/fz/functions/module/here/uninstall.mcfunction
Normal file
1
data/fz/functions/module/here/uninstall.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
data remove storage fz:here fz
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
||||
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
|
@ -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
|
||||
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
|
@ -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
|
||||
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
|
@ -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
|
@ -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": "]"}]]
|
||||
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": "]"}]]
|
@ -1,3 +1,3 @@
|
||||
# 调用者:#fz:module/scoreboard/config/display/head
|
||||
|
||||
tellraw @s {"text": "计分板:"}
|
||||
execute if data storage fz:installed fz.module{scoreboard:1b} run tellraw @s {"text": "计分板:"}
|
@ -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": "已安装组件:计分板"}]
|
@ -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": "已卸载组件:计分板"}]
|
5
data/fz/functions/module/try_install.mcfunction
Normal file
5
data/fz/functions/module/try_install.mcfunction
Normal file
@ -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
|
@ -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
|
||||
|
2
data/fz/functions/system/install.mcfunction
Normal file
2
data/fz/functions/system/install.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
## 整数类型
|
||||
scoreboard objectives add fz.variable.integer dummy
|
5
data/fz/functions/system/installed.mcfunction
Normal file
5
data/fz/functions/system/installed.mcfunction
Normal file
@ -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": "安装完成!"}]
|
4
data/fz/functions/system/load.mcfunction
Normal file
4
data/fz/functions/system/load.mcfunction
Normal file
@ -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
|
2
data/fz/functions/system/loaded.mcfunction
Normal file
2
data/fz/functions/system/loaded.mcfunction
Normal file
@ -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": "加载完成!"}]
|
5
data/fz/functions/system/uninstall.mcfunction
Normal file
5
data/fz/functions/system/uninstall.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
## 整数类型
|
||||
scoreboard objectives remove fz.variable.integer
|
||||
|
||||
## 卸载配置信息
|
||||
data remove storage fz:config fz
|
5
data/fz/functions/system/uninstalled.mcfunction
Normal file
5
data/fz/functions/system/uninstalled.mcfunction
Normal file
@ -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": "卸载完成!"}]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user