From 18b7b81844e423900523815b16aa894fa80c89a4 Mon Sep 17 00:00:00 2001 From: Harveykang <46108547+Harveykang@users.noreply.github.com> Date: Mon, 30 Dec 2019 16:34:27 +0800 Subject: [PATCH] Add files via upload --- README.txt | 5 ++++ data/fz/functions/carpet.mcfunction | 2 ++ data/fz/functions/config/configs.mcfunction | 11 ++++++++ data/fz/functions/config/install.mcfunction | 1 + data/fz/functions/config/main.mcfunction | 2 ++ data/fz/functions/config/uninstall.mcfunction | 1 + data/fz/functions/install.mcfunction | 6 ++-- data/fz/functions/logintips/main.mcfunction | 9 +++--- data/fz/functions/noai/configs.mcfunction | 28 +++++++++++++++++++ data/fz/functions/noai/main.mcfunction | 10 +++++++ .../score/activation/team.mcfunction | 4 +-- .../activation/totalcalculator.mcfunction | 6 ++-- data/fz/functions/score/install.mcfunction | 2 +- data/fz/functions/score/main.mcfunction | 28 +++++++++---------- .../score/teams/damagetaken.mcfunction | 4 +-- .../score/teams/deathcounter.mcfunction | 4 +-- .../score/teams/digcounter.mcfunction | 4 +-- .../score/teams/displayscoresoff.mcfunction | 4 +-- .../score/teams/displayscoreson.mcfunction | 4 +-- .../score/teams/fishingcounter.mcfunction | 4 +-- .../score/teams/killcounter.mcfunction | 4 +-- .../score/teams/totallist.mcfunction | 4 +-- .../score/teams/tradingcounter.mcfunction | 4 +-- .../score/totalcalculator/tdeathc.mcfunction | 2 +- .../score/totalcalculator/tfishc.mcfunction | 2 +- .../score/totalcalculator/thurtc.mcfunction | 2 +- .../score/totalcalculator/tkillc.mcfunction | 2 +- .../score/totalcalculator/ttradec.mcfunction | 2 +- data/fz/functions/uninstall.mcfunction | 3 ++ data/minecraft/tags/functions/tick.json | 4 ++- 30 files changed, 117 insertions(+), 51 deletions(-) create mode 100644 data/fz/functions/carpet.mcfunction create mode 100644 data/fz/functions/config/configs.mcfunction create mode 100644 data/fz/functions/config/install.mcfunction create mode 100644 data/fz/functions/config/main.mcfunction create mode 100644 data/fz/functions/config/uninstall.mcfunction create mode 100644 data/fz/functions/noai/configs.mcfunction create mode 100644 data/fz/functions/noai/main.mcfunction diff --git a/README.txt b/README.txt index d356a1a..3730601 100644 --- a/README.txt +++ b/README.txt @@ -7,10 +7,15 @@ 记分板:/trigger scoreswitch set -1关;1循环播放;2-9订阅单独的记分板 扫地姬:/trigger cleaner set -1关;>=30开 +设置界面:/trigger options 如果您在使用carpet mod的话: 务必使用“/script invoke summon 玩家名”召唤假人,可以避免将他们计入记分板总分! 务必使用“/script invoke kill 玩家名”移除假人,否则其标签无法删除! +v1.3.3 +-添加鳕鱼、鲑鱼、热带鱼、河豚、蝙蝠的AI开关 +-添加设置界面 + v1.3.2 -为carpet mod小人添加防止计入记分板总分的生成/删除命令 diff --git a/data/fz/functions/carpet.mcfunction b/data/fz/functions/carpet.mcfunction new file mode 100644 index 0000000..f4c243d --- /dev/null +++ b/data/fz/functions/carpet.mcfunction @@ -0,0 +1,2 @@ +execute store result score carpet carpet run carpet +execute if score carpet carpet matches 1 run function fz:scarpet \ No newline at end of file diff --git a/data/fz/functions/config/configs.mcfunction b/data/fz/functions/config/configs.mcfunction new file mode 100644 index 0000000..de04c7e --- /dev/null +++ b/data/fz/functions/config/configs.mcfunction @@ -0,0 +1,11 @@ +scoreboard players reset @s options +function fz:noai/configs +execute if score carpet carpet matches 1.. run tellraw @s {"text":"--不计入计分板总分的假人--","color":"dark_green","bold":true} +execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 生成假人:"},{"text":"/script invoke summon 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 删除假人:"},{"text":"/script invoke kill 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"--扫地姬--","color":"dark_green","bold":true}] +tellraw @s [{"text":"- 指令:"},{"text":"/trigger cleaner set -1为关;秒数(≥30)为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 预设:"},{"text":"[OFF]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleaner set -1"}},{"text":"[30s]","color":"red","clickEvent":{"action":"run_command","value":"/trigger cleaner set 30"}},{"text":"[1min]","color":"gold","clickEvent":{"action":"run_command","value":"/trigger cleaner set 60"}},{"text":"[2min]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger cleaner set 120"}},{"text":"[3min]","color":"green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 180"}},{"text":"[5min]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 300"}}] +tellraw @s {"text":"--记分板--","color":"dark_green","bold":true} +tellraw @s [{"text":"- 指令:"},{"text":"/trigger scoreSwitch set -1为关/1-9为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger scoreSwitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"[OFF]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set -1"}},{"text":"[轮播]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 1"}},{"text":"[击杀榜]","color":"red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 2"}},{"text":"[挖掘榜]","color":"gray","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 3"}},{"text":"[死亡榜]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 4"}},{"text":"[交易榜]","color":"green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 5"}},{"text":"[钓鱼榜]","color":"blue","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 6"}},{"text":"[奥里给!]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 7"}},{"text":"[活跃度]","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 8"}},{"text":"[统计总量]","color":"light_purple","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 9"}}] \ No newline at end of file diff --git a/data/fz/functions/config/install.mcfunction b/data/fz/functions/config/install.mcfunction new file mode 100644 index 0000000..8d0614b --- /dev/null +++ b/data/fz/functions/config/install.mcfunction @@ -0,0 +1 @@ +scoreboard objectives add options trigger \ No newline at end of file diff --git a/data/fz/functions/config/main.mcfunction b/data/fz/functions/config/main.mcfunction new file mode 100644 index 0000000..799f0df --- /dev/null +++ b/data/fz/functions/config/main.mcfunction @@ -0,0 +1,2 @@ +scoreboard players enable @a options +execute as @a if score @s options matches 1.. run function fz:config/configs diff --git a/data/fz/functions/config/uninstall.mcfunction b/data/fz/functions/config/uninstall.mcfunction new file mode 100644 index 0000000..c2987c3 --- /dev/null +++ b/data/fz/functions/config/uninstall.mcfunction @@ -0,0 +1 @@ +scoreboard objectives remove options \ No newline at end of file diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction index f073180..34f1997 100644 --- a/data/fz/functions/install.mcfunction +++ b/data/fz/functions/install.mcfunction @@ -12,11 +12,11 @@ scoreboard objectives add 20 dummy scoreboard objectives add carpet dummy scoreboard players set 20 20 20 scoreboard players reset carpet carpet -execute store result score carpet carpet run carpet -execute if score carpet carpet matches 1 run function fz:scarpet +function fz:carpet function fz:score/install function fz:health/install function fz:sleep/install function fz:cleaner/install function fz:logintips/install -tellraw @a [{"text":"[Datapack]"},{"text":" FZ'sDataPack v1.3.2 installed successfully","color":"gold"}] \ No newline at end of file +function fz:config/install +tellraw @a [{"text":"[Datapack]"},{"text":" FZ'sDataPack v1.3.3 installed successfully","color":"gold"}] \ No newline at end of file diff --git a/data/fz/functions/logintips/main.mcfunction b/data/fz/functions/logintips/main.mcfunction index 7da063a..a12d2ec 100644 --- a/data/fz/functions/logintips/main.mcfunction +++ b/data/fz/functions/logintips/main.mcfunction @@ -1,5 +1,6 @@ -tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger cleaner set -1或≥30(单位:秒)","underlined":true,"strikethrough":false,"obfuscated":false,"insertion":"/trigger cleaner set","hoverEvent":{"action":"show_text","value":"shift点击写入聊天栏"}},{"text":"来关/开扫地姬"}] -tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger scoreswitch set -1或1-9","underlined":true,"insertion":"/trigger scoreswitch set","hoverEvent":{"action":"show_text","value":"shift点击写入聊天栏"}},{"text":"来关/开记分板"}] -execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke summon 玩家名","underlined":true,"color":"red","insertion":"/script invoke summon ","hoverEvent":{"action":"show_text","value":"shift点击写入聊天栏"}},{"text":"召唤假人,可以避免将他们计入记分板总分!","color":"dark_red"}] -execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke kill 玩家名","underlined":true,"color":"red","insertion":"/script invoke kill ","hoverEvent":{"action":"show_text","value":"shift点击写入聊天栏"}},{"text":"删除假人,否则其标签无法删除!","color":"dark_red"}] +tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger cleaner set -1或≥30(单位:秒)","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开扫地姬"}] +tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger scoreswitch set -1或1-9","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger scoreswitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开记分板"}] +execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke summon 玩家名","underlined":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"召唤假人,可以避免将他们计入记分板总分!","color":"dark_red"}] +execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke kill 玩家名","underlined":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"删除假人,否则其标签无法删除!","color":"dark_red"}] +tellraw @a[scores={leaveGame=0..}] [{"text":"使用","color":"gold"},{"text":"/trigger options","underlined":true,"clickEvent":{"action":"run_command","value":"/trigger options"},"hoverEvent":{"action":"show_text","value":"点击以访问全部设置"}},{"text":"以访问全部设置"}] scoreboard players set @a[scores={leaveGame=0..}] leaveGame -1 \ No newline at end of file diff --git a/data/fz/functions/noai/configs.mcfunction b/data/fz/functions/noai/configs.mcfunction new file mode 100644 index 0000000..901b584 --- /dev/null +++ b/data/fz/functions/noai/configs.mcfunction @@ -0,0 +1,28 @@ +#title +tellraw @s {"text":"--卡顿生物AI开关(本项仅op可用)--","color":"dark_green","bold":true} +tellraw @s {"text":"注意!无AI的实体不会自然下落且不会因流体或实体挤压而运动!","color":"dark_red"} +#除非鳕鱼ai为关否则显示关闭按钮 +execute unless data storage minecraft:cod {ai:0b} run tellraw @s [{"text":"- "},{"text":"鳕鱼[minecraft:cod]","hoverEvent":{"action":"show_text","value":"状态:开启"}},{"text":" "},{"text":"[✔]","color":"gray","hoverEvent":{"action":"show_text","value":"已开启"}},{"text":" "},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:cod ai set value 0b"},"hoverEvent":{"action":"show_text","value":"点击以关闭"}}] +#如果鳕鱼ai为开则显示开启按钮 +execute if data storage minecraft:cod {ai:0b} run tellraw @s [{"text":"- "},{"text":"鳕鱼[minecraft:cod]","hoverEvent":{"action":"show_text","value":"状态:关闭"}},{"text":" "},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:cod ai set value 1b"},"hoverEvent":{"action":"show_text","value":"点击以开启"}},{"text":" "},{"text":"[✘]","color":"gray","hoverEvent":{"action":"show_text","value":"已关闭"}}] +#除非鲑鱼ai为关否则显示关闭按钮 +execute unless data storage minecraft:salmon {ai:0b} run tellraw @s [{"text":"- "},{"text":"鲑鱼[minecraft:salmon]","hoverEvent":{"action":"show_text","value":"状态:开启"}},{"text":" "},{"text":"[✔]","color":"gray","hoverEvent":{"action":"show_text","value":"已开启"}},{"text":" "},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:salmon ai set value 0b"},"hoverEvent":{"action":"show_text","value":"点击以关闭"}}] +#如果鲑鱼ai为开则显示开启按钮 +execute if data storage minecraft:salmon {ai:0b} run tellraw @s [{"text":"- "},{"text":"鲑鱼[minecraft:salmon]","hoverEvent":{"action":"show_text","value":"状态:关闭"}},{"text":" "},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:salmon ai set value 1b"},"hoverEvent":{"action":"show_text","value":"点击以开启"}},{"text":" "},{"text":"[✘]","color":"gray","hoverEvent":{"action":"show_text","value":"已关闭"}}] +#除非热带鱼ai为关否则显示关闭按钮 +execute unless data storage minecraft:tropical_fish {ai:0b} run tellraw @s [{"text":"- "},{"text":"热带鱼[minecraft:tropical_fish]","hoverEvent":{"action":"show_text","value":"状态:开启"}},{"text":" "},{"text":"[✔]","color":"gray","hoverEvent":{"action":"show_text","value":"已开启"}},{"text":" "},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:tropical_fish ai set value 0b"},"hoverEvent":{"action":"show_text","value":"点击以关闭"}}] +#如果热带鱼ai为开则显示开启按钮 +execute if data storage minecraft:tropical_fish {ai:0b} run tellraw @s [{"text":"- "},{"text":"热带鱼[minecraft:tropical_fish]","hoverEvent":{"action":"show_text","value":"状态:关闭"}},{"text":" "},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:tropical_fish ai set value 1b"},"hoverEvent":{"action":"show_text","value":"点击以开启"}},{"text":" "},{"text":"[✘]","color":"gray","hoverEvent":{"action":"show_text","value":"已关闭"}}] +#除非河豚ai为关否则显示关闭按钮 +execute unless data storage minecraft:pufferfish {ai:0b} run tellraw @s [{"text":"- "},{"text":"河豚[minecraft:pufferfish]","hoverEvent":{"action":"show_text","value":"状态:开启"}},{"text":" "},{"text":"[✔]","color":"gray","hoverEvent":{"action":"show_text","value":"已开启"}},{"text":" "},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:pufferfish ai set value 0b"},"hoverEvent":{"action":"show_text","value":"点击以关闭"}}] +#如果河豚ai为开则显示开启按钮 +execute if data storage minecraft:pufferfish {ai:0b} run tellraw @s [{"text":"- "},{"text":"河豚[minecraft:pufferfish]","hoverEvent":{"action":"show_text","value":"状态:关闭"}},{"text":" "},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:pufferfish ai set value 1b"},"hoverEvent":{"action":"show_text","value":"点击以开启"}},{"text":" "},{"text":"[✘]","color":"gray","hoverEvent":{"action":"show_text","value":"已关闭"}}] +#除非蝙蝠ai为关否则显示关闭按钮 +execute unless data storage minecraft:bat {ai:0b} run tellraw @s [{"text":"- "},{"text":"蝙蝠[minecraft:bat]","hoverEvent":{"action":"show_text","value":"状态:开启"}},{"text":" "},{"text":"[✔]","color":"gray","hoverEvent":{"action":"show_text","value":"已开启"}},{"text":" "},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:bat ai set value 0b"},"hoverEvent":{"action":"show_text","value":"点击以关闭"}}] +#如果蝙蝠ai为开则显示开启按钮 +execute if data storage minecraft:bat {ai:0b} run tellraw @s [{"text":"- "},{"text":"蝙蝠[minecraft:bat]","hoverEvent":{"action":"show_text","value":"状态:关闭"}},{"text":" "},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/data modify storage minecraft:bat ai set value 1b"},"hoverEvent":{"action":"show_text","value":"点击以开启"}},{"text":" "},{"text":"[✘]","color":"gray","hoverEvent":{"action":"show_text","value":"已关闭"}}] + + + + + diff --git a/data/fz/functions/noai/main.mcfunction b/data/fz/functions/noai/main.mcfunction new file mode 100644 index 0000000..f1f4a5b --- /dev/null +++ b/data/fz/functions/noai/main.mcfunction @@ -0,0 +1,10 @@ +execute if data storage minecraft:cod {ai:0b} as @e[type=minecraft:cod,nbt={}] run data modify entity @s NoAI set value 1b +execute if data storage minecraft:salmon {ai:0b} as @e[type=minecraft:salmon,nbt={}] run data modify entity @s NoAI set value 1b +execute if data storage minecraft:tropical_fish {ai:0b} as @e[type=minecraft:tropical_fish,nbt={}] run data modify entity @s NoAI set value 1b +execute if data storage minecraft:pufferfish {ai:0b} as @e[type=minecraft:pufferfish,nbt={}] run data modify entity @s NoAI set value 1b +execute if data storage minecraft:bat {ai:0b} as @e[type=minecraft:bat,nbt={}] run data modify entity @s NoAI set value 1b +execute if data storage minecraft:cod {ai:1b} as @e[type=minecraft:cod,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b +execute if data storage minecraft:salmon {ai:1b} as @e[type=minecraft:salmon,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b +execute if data storage minecraft:tropical_fish {ai:1b} as @e[type=minecraft:tropical_fish,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b +execute if data storage minecraft:pufferfish {ai:1b} as @e[type=minecraft:pufferfish,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b +execute if data storage minecraft:bat {ai:1b} as @e[type=minecraft:bat,nbt={NoAI:1b}] run data modify entity @s NoAI set value 0b \ No newline at end of file diff --git a/data/fz/functions/score/activation/team.mcfunction b/data/fz/functions/score/activation/team.mcfunction index 5b62c8b..af8b3a6 100644 --- a/data/fz/functions/score/activation/team.mcfunction +++ b/data/fz/functions/score/activation/team.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=8},team=!activation] [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}] -team join activation @a[scores={scoreswitch=8},team=!activation] +tellraw @a[scores={scoreSwitch=8},team=!activation] [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}] +team join activation @a[scores={scoreSwitch=8},team=!activation] scoreboard objectives setdisplay sidebar.team.aqua activation \ No newline at end of file diff --git a/data/fz/functions/score/activation/totalcalculator.mcfunction b/data/fz/functions/score/activation/totalcalculator.mcfunction index 3a548d0..a4c4747 100644 --- a/data/fz/functions/score/activation/totalcalculator.mcfunction +++ b/data/fz/functions/score/activation/totalcalculator.mcfunction @@ -1,6 +1,6 @@ -#计算每个玩家本游戏刻挖掘量和上一游戏刻受伤害量的差 +#计算每个玩家本游戏刻活跃度和上一游戏刻活跃度的差 scoreboard players operation @s tActC -= @s activation -#将两游戏刻玩家受伤害量的差之和加在总榜上 +#将两游戏刻活跃度的差之和加在总榜上 scoreboard players operation totalActivation totalList -= @s tActC -#储存当前游戏刻的玩家受伤害量 +#储存当前游戏刻的活跃度 scoreboard players operation @s tActC = @s activation \ No newline at end of file diff --git a/data/fz/functions/score/install.mcfunction b/data/fz/functions/score/install.mcfunction index 9cfc60d..cd3f05a 100644 --- a/data/fz/functions/score/install.mcfunction +++ b/data/fz/functions/score/install.mcfunction @@ -81,7 +81,7 @@ team modify damageTaken color yellow scoreboard objectives setdisplay sidebar.team.yellow damageTaken team modify totalList color light_purple scoreboard objectives setdisplay sidebar.team.light_purple totalList -scoreboard objectives add scoreswitch trigger +scoreboard objectives add scoreSwitch trigger #### #安装缓存# scoreboard objectives add tDigC dummy diff --git a/data/fz/functions/score/main.mcfunction b/data/fz/functions/score/main.mcfunction index eb9606c..53c6719 100644 --- a/data/fz/functions/score/main.mcfunction +++ b/data/fz/functions/score/main.mcfunction @@ -14,20 +14,20 @@ execute if score scoreboard timeCounter matches 4800 run scoreboard objectives s execute if score scoreboard timeCounter matches 4800.. run scoreboard players set scoreboard timeCounter 0 #### #记分板开关# -scoreboard players enable @a scoreswitch -execute if entity @a[scores={scoreswitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff -execute if entity @a[scores={scoreswitch=1},team=!displayScoresOn] run function fz:score/teams/displayscoreson -execute if entity @a[scores={scoreswitch=2},team=!killCounter] run function fz:score/teams/killcounter -execute if entity @a[scores={scoreswitch=3},team=!digCounter] run function fz:score/teams/digcounter -execute if entity @a[scores={scoreswitch=4},team=!deathCounter] run function fz:score/teams/deathcounter -execute if entity @a[scores={scoreswitch=5},team=!tradingCounter] run function fz:score/teams/tradingcounter -execute if entity @a[scores={scoreswitch=6},team=!fishingCounter] run function fz:score/teams/fishingcounter -execute if entity @a[scores={scoreswitch=7},team=!damageTaken] run function fz:score/teams/damagetaken -execute if entity @a[scores={scoreswitch=8},team=!activation] run function fz:score/activation/team -execute if entity @a[scores={scoreswitch=9},team=!totalList] run function fz:score/teams/totallist -execute if entity @a[scores={scoreswitch=10..}] run tellraw @a[scores={scoreswitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}] -scoreboard players set @a[scores={scoreswitch=..-1}] scoreswitch 0 -scoreboard players set @a[scores={scoreswitch=1..}] scoreswitch 0 +scoreboard players enable @a scoreSwitch +execute as @a if entity @a[scores={scoreSwitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff +execute if entity @a[scores={scoreSwitch=1},team=!displayScoresOn] run function fz:score/teams/displayscoreson +execute if entity @a[scores={scoreSwitch=2},team=!killCounter] run function fz:score/teams/killcounter +execute if entity @a[scores={scoreSwitch=3},team=!digCounter] run function fz:score/teams/digcounter +execute if entity @a[scores={scoreSwitch=4},team=!deathCounter] run function fz:score/teams/deathcounter +execute if entity @a[scores={scoreSwitch=5},team=!tradingCounter] run function fz:score/teams/tradingcounter +execute if entity @a[scores={scoreSwitch=6},team=!fishingCounter] run function fz:score/teams/fishingcounter +execute if entity @a[scores={scoreSwitch=7},team=!damageTaken] run function fz:score/teams/damagetaken +execute if entity @a[scores={scoreSwitch=8},team=!activation] run function fz:score/activation/team +execute if entity @a[scores={scoreSwitch=9},team=!totalList] run function fz:score/teams/totallist +execute if entity @a[scores={scoreSwitch=10..}] run tellraw @a[scores={scoreSwitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}] +scoreboard players set @a[scores={scoreSwitch=..-1}] scoreSwitch 0 +scoreboard players set @a[scores={scoreSwitch=1..}] scoreSwitch 0 team join displayScoresOff @a[team=] #### #添加工具计入挖掘量# diff --git a/data/fz/functions/score/teams/damagetaken.mcfunction b/data/fz/functions/score/teams/damagetaken.mcfunction index 62c6d1f..aa1651b 100644 --- a/data/fz/functions/score/teams/damagetaken.mcfunction +++ b/data/fz/functions/score/teams/damagetaken.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=7},team=!damageTaken] [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}] -team join damageTaken @a[scores={scoreswitch=7},team=!damageTaken] +tellraw @a[scores={scoreSwitch=7},team=!damageTaken] [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}] +team join damageTaken @a[scores={scoreSwitch=7},team=!damageTaken] scoreboard objectives setdisplay sidebar.team.yellow damageTaken \ No newline at end of file diff --git a/data/fz/functions/score/teams/deathcounter.mcfunction b/data/fz/functions/score/teams/deathcounter.mcfunction index 5b62bcc..ba6524e 100644 --- a/data/fz/functions/score/teams/deathcounter.mcfunction +++ b/data/fz/functions/score/teams/deathcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=4},team=!deathCounter] [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}] -team join deathCounter @a[scores={scoreswitch=4},team=!deathCounter] +tellraw @a[scores={scoreSwitch=4},team=!deathCounter] [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}] +team join deathCounter @a[scores={scoreSwitch=4},team=!deathCounter] scoreboard objectives setdisplay sidebar.team.dark_red deathCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/digcounter.mcfunction b/data/fz/functions/score/teams/digcounter.mcfunction index 58e4a4e..e00f939 100644 --- a/data/fz/functions/score/teams/digcounter.mcfunction +++ b/data/fz/functions/score/teams/digcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=3},team=!digCounter] [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}] -team join digCounter @a[scores={scoreswitch=3},team=!digCounter] +tellraw @a[scores={scoreSwitch=3},team=!digCounter] [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}] +team join digCounter @a[scores={scoreSwitch=3},team=!digCounter] scoreboard objectives setdisplay sidebar.team.gray digCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/displayscoresoff.mcfunction b/data/fz/functions/score/teams/displayscoresoff.mcfunction index 50d8662..4f8f073 100644 --- a/data/fz/functions/score/teams/displayscoresoff.mcfunction +++ b/data/fz/functions/score/teams/displayscoresoff.mcfunction @@ -1,2 +1,2 @@ -tellraw @a[scores={scoreswitch=..-1},team=!displayScoresOff] [{"text":"您已退订记分板"}] -team join displayScoresOff @a[scores={scoreswitch=..-1},team=!displayScoresOff] \ No newline at end of file +tellraw @a[scores={scoreSwitch=..-1},team=!displayScoresOff] [{"text":"您已退订记分板"}] +team join displayScoresOff @a[scores={scoreSwitch=..-1},team=!displayScoresOff] \ No newline at end of file diff --git a/data/fz/functions/score/teams/displayscoreson.mcfunction b/data/fz/functions/score/teams/displayscoreson.mcfunction index d0d5e93..308b4c4 100644 --- a/data/fz/functions/score/teams/displayscoreson.mcfunction +++ b/data/fz/functions/score/teams/displayscoreson.mcfunction @@ -1,2 +1,2 @@ -tellraw @a[scores={scoreswitch=1},team=!displayScoresOn] [{"text":"正在循环播放记分板"}] -team join displayScoresOn @a[scores={scoreswitch=1},team=!displayScoresOn] \ No newline at end of file +tellraw @a[scores={scoreSwitch=1},team=!displayScoresOn] [{"text":"正在循环播放记分板"}] +team join displayScoresOn @a[scores={scoreSwitch=1},team=!displayScoresOn] \ No newline at end of file diff --git a/data/fz/functions/score/teams/fishingcounter.mcfunction b/data/fz/functions/score/teams/fishingcounter.mcfunction index c78e3a9..f0ba8b8 100644 --- a/data/fz/functions/score/teams/fishingcounter.mcfunction +++ b/data/fz/functions/score/teams/fishingcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=6},team=!fishingCounter] [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}] -team join fishingCounter @a[scores={scoreswitch=6},team=!fishingCounter] +tellraw @a[scores={scoreSwitch=6},team=!fishingCounter] [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}] +team join fishingCounter @a[scores={scoreSwitch=6},team=!fishingCounter] scoreboard objectives setdisplay sidebar.team.blue fishingCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/killcounter.mcfunction b/data/fz/functions/score/teams/killcounter.mcfunction index 03c7cbf..b66d8f6 100644 --- a/data/fz/functions/score/teams/killcounter.mcfunction +++ b/data/fz/functions/score/teams/killcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=2},team=!killCounter] [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}] -team join killCounter @a[scores={scoreswitch=2},team=!killCounter] +tellraw @a[scores={scoreSwitch=2},team=!killCounter] [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}] +team join killCounter @a[scores={scoreSwitch=2},team=!killCounter] scoreboard objectives setdisplay sidebar.team.red killCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/totallist.mcfunction b/data/fz/functions/score/teams/totallist.mcfunction index dd132d6..ecee7cd 100644 --- a/data/fz/functions/score/teams/totallist.mcfunction +++ b/data/fz/functions/score/teams/totallist.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=9},team=!totalList] [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}] -team join totalList @a[scores={scoreswitch=9},team=!totalList] +tellraw @a[scores={scoreSwitch=9},team=!totalList] [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}] +team join totalList @a[scores={scoreSwitch=9},team=!totalList] scoreboard objectives setdisplay sidebar.team.light_purple totalList \ No newline at end of file diff --git a/data/fz/functions/score/teams/tradingcounter.mcfunction b/data/fz/functions/score/teams/tradingcounter.mcfunction index 2ef76c9..8c4c059 100644 --- a/data/fz/functions/score/teams/tradingcounter.mcfunction +++ b/data/fz/functions/score/teams/tradingcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreswitch=5},team=!tradingCounter] [{"text":"您已订阅"},{"text":"交易榜","color":"green"}] -team join tradingCounter @a[scores={scoreswitch=5},team=!tradingCounter] +tellraw @a[scores={scoreSwitch=5},team=!tradingCounter] [{"text":"您已订阅"},{"text":"交易榜","color":"green"}] +team join tradingCounter @a[scores={scoreSwitch=5},team=!tradingCounter] scoreboard objectives setdisplay sidebar.team.green tradingCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/tdeathc.mcfunction b/data/fz/functions/score/totalcalculator/tdeathc.mcfunction index be60601..81d6a16 100644 --- a/data/fz/functions/score/totalcalculator/tdeathc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tdeathc.mcfunction @@ -1,4 +1,4 @@ -#计算每个玩家本游戏刻挖掘量和上一游戏刻死亡数的差 +#计算每个玩家本游戏刻死亡数和上一游戏刻死亡数的差 scoreboard players operation @s tDeathC -= @s deathCounter #将两游戏刻玩家死亡数的差之和加在总榜上 scoreboard players operation totalDeath totalList -= @s tDeathC diff --git a/data/fz/functions/score/totalcalculator/tfishc.mcfunction b/data/fz/functions/score/totalcalculator/tfishc.mcfunction index 642bbf1..cd5f2a9 100644 --- a/data/fz/functions/score/totalcalculator/tfishc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tfishc.mcfunction @@ -1,4 +1,4 @@ -#计算每个玩家本游戏刻挖掘量和上一游戏刻钓鱼数的差 +#计算每个玩家本游戏刻钓鱼数和上一游戏刻钓鱼数的差 scoreboard players operation @s tFishC -= @s fishingCounter #将两游戏刻玩家钓鱼数的差之和加在总榜上 scoreboard players operation totalFished totalList -= @s tFishC diff --git a/data/fz/functions/score/totalcalculator/thurtc.mcfunction b/data/fz/functions/score/totalcalculator/thurtc.mcfunction index 21820b7..c266256 100644 --- a/data/fz/functions/score/totalcalculator/thurtc.mcfunction +++ b/data/fz/functions/score/totalcalculator/thurtc.mcfunction @@ -1,4 +1,4 @@ -#计算每个玩家本游戏刻挖掘量和上一游戏刻受伤害量的差 +#计算每个玩家本游戏刻玩家受伤害量和上一游戏刻受伤害量的差 scoreboard players operation @s tHurtC -= @s damageTaken #将两游戏刻玩家受伤害量的差之和加在总榜上 scoreboard players operation totalHurt totalList -= @s tHurtC diff --git a/data/fz/functions/score/totalcalculator/tkillc.mcfunction b/data/fz/functions/score/totalcalculator/tkillc.mcfunction index 589ae20..4cd0f17 100644 --- a/data/fz/functions/score/totalcalculator/tkillc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tkillc.mcfunction @@ -1,4 +1,4 @@ -#计算每个玩家本游戏刻挖掘量和上一游戏刻击杀数的差 +#计算每个玩家本游戏刻玩家击杀数和上一游戏刻击杀数的差 scoreboard players operation @s tKillC -= @s killCounter #将两游戏刻玩家击杀数的差之和加在总榜上 scoreboard players operation totalKilled totalList -= @s tKillC diff --git a/data/fz/functions/score/totalcalculator/ttradec.mcfunction b/data/fz/functions/score/totalcalculator/ttradec.mcfunction index 08c2573..7d361e9 100644 --- a/data/fz/functions/score/totalcalculator/ttradec.mcfunction +++ b/data/fz/functions/score/totalcalculator/ttradec.mcfunction @@ -1,4 +1,4 @@ -#计算每个玩家本游戏刻挖掘量和上一游戏刻交易数的差 +#计算每个玩家本游戏刻玩家交易数和上一游戏刻交易数的差 scoreboard players operation @s tTradeC -= @s tradingCounter #将两游戏刻玩家交易数的差之和加在总榜上 scoreboard players operation totalTraded totalList -= @s tTradeC diff --git a/data/fz/functions/uninstall.mcfunction b/data/fz/functions/uninstall.mcfunction index 0147624..492c7de 100644 --- a/data/fz/functions/uninstall.mcfunction +++ b/data/fz/functions/uninstall.mcfunction @@ -1,8 +1,11 @@ scoreboard objectives remove timeCounter scoreboard objectives remove 20 +scoreboard objectives remove carpet function fz:health/uninstall function fz:sleep/uninstall function fz:cleaner/uninstall function fz:logintips/uninstall function fz:score/uninstall +function fz:logintips/uninstall +function fz:config/uninstall tellraw @a {"text":"FZ'sDataPack卸载成功!","color":"dark_green"} \ No newline at end of file diff --git a/data/minecraft/tags/functions/tick.json b/data/minecraft/tags/functions/tick.json index 007e0c6..9d7da0f 100644 --- a/data/minecraft/tags/functions/tick.json +++ b/data/minecraft/tags/functions/tick.json @@ -3,6 +3,8 @@ "fz:score/main", "fz:sleep/main", "fz:cleaner/trigger", - "fz:logintips/main" + "fz:logintips/main", + "fz:noai/main", + "fz:config/main" ] } \ No newline at end of file