diff --git a/data/fz/functions/carpet/carpet.mcfunction b/data/fz/functions/carpet/carpet.mcfunction new file mode 100644 index 0000000..a987a7f --- /dev/null +++ b/data/fz/functions/carpet/carpet.mcfunction @@ -0,0 +1,2 @@ +execute store result score carpet carpet run carpet optimizedTNT +execute if score carpet carpet matches 1 run function fz:carpet/scarpet \ No newline at end of file diff --git a/data/fz/functions/carpet/install.mcfunction b/data/fz/functions/carpet/install.mcfunction new file mode 100644 index 0000000..8f81d15 --- /dev/null +++ b/data/fz/functions/carpet/install.mcfunction @@ -0,0 +1,3 @@ +scoreboard objectives add carpet dummy +scoreboard players reset carpet carpet +function fz:carpet/carpet \ No newline at end of file diff --git a/data/fz/functions/carpet/scarpet.mcfunction b/data/fz/functions/carpet/scarpet.mcfunction new file mode 100644 index 0000000..ab74b2c --- /dev/null +++ b/data/fz/functions/carpet/scarpet.mcfunction @@ -0,0 +1,2 @@ +#带标签的假玩家# +script run __config() -> m('stay_loaded': true);__command() -> (p = player();summon(slice(p,0,12)+'_bot');'';);global_tag = 'carpetBot';summon(player_name) ->(player_name = slice(player_name, 0, 16);s_player = player();if (player(player_name), exit('Player '+player_name+' already exists'));player_name = replace(player_name, '\\s','');run(str('player %s spawn at %f %f %f', player_name, s_player~'x', s_player~'y', s_player~'z'));if (!(player(player_name)), exit('failed to spawn player '+player_name));modify(player(player_name), 'tag', global_tag);logger('fake player tag added to player '+player_name); '';);kill(player_name) ->( player_name = slice(player_name, 0, 16); if (!(player (player_name)), exit('Player '+player_name+' is not aviable')); modify(player(player_name), 'clear_tag', global_tag);run(str('player %s kill', player_name)); logger('fake player tag remove from player '+player_name);); \ No newline at end of file diff --git a/data/fz/functions/carpet/uninstall.mcfunction b/data/fz/functions/carpet/uninstall.mcfunction new file mode 100644 index 0000000..135ead5 --- /dev/null +++ b/data/fz/functions/carpet/uninstall.mcfunction @@ -0,0 +1 @@ +scoreboard objectives remove carpet \ No newline at end of file diff --git a/data/fz/functions/config/configs.mcfunction b/data/fz/functions/config/configs.mcfunction index de04c7e..1dc1798 100644 --- a/data/fz/functions/config/configs.mcfunction +++ b/data/fz/functions/config/configs.mcfunction @@ -4,8 +4,8 @@ execute if score carpet carpet matches 1.. run tellraw @s {"text":"--不计入 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":"/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 +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"}}] diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction index 34f1997..f58c7fb 100644 --- a/data/fz/functions/install.mcfunction +++ b/data/fz/functions/install.mcfunction @@ -5,18 +5,24 @@ # @License: GNU General Public License, version 3 (GPL-3.0) # This project is licensed under the terms of the GNU General Public License v3.0. -# Copyright (C)2019 Harvey.Kang - +# Copyright (C)2019-2020 Harvey.Kang +scoreboard objectives add version dummy +#升级用# +scoreboard players operation version version = version version +execute if score version version matches ..132 run function fz:updatebeforeinstall +#### scoreboard objectives add timeCounter dummy scoreboard objectives add 20 dummy -scoreboard objectives add carpet dummy scoreboard players set 20 20 20 -scoreboard players reset carpet carpet -function fz:carpet +function fz:carpet/install function fz:score/install function fz:health/install function fz:sleep/install function fz:cleaner/install function fz:logintips/install function fz:config/install +#升级用# +execute if score installed installed matches ..132 run function fz:updateafterinstall +scoreboard players set version version 133 +#### 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/main.mcfunction b/data/fz/functions/main.mcfunction new file mode 100644 index 0000000..0876a75 --- /dev/null +++ b/data/fz/functions/main.mcfunction @@ -0,0 +1,6 @@ +function fz:score/main +function fz:sleep/main +function fz:cleaner/trigger +function fz:logintips/main +function fz:noai/main +function fz:config/main \ No newline at end of file diff --git a/data/fz/functions/score/activationcarry.mcfunction b/data/fz/functions/score/activationcarry.mcfunction new file mode 100644 index 0000000..68671a6 --- /dev/null +++ b/data/fz/functions/score/activationcarry.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset @s actCounter +scoreboard players add @s activation 1 \ No newline at end of file diff --git a/data/fz/functions/score/delscores.mcfunction b/data/fz/functions/score/delscores.mcfunction index 0c89637..d65d979 100644 --- a/data/fz/functions/score/delscores.mcfunction +++ b/data/fz/functions/score/delscores.mcfunction @@ -5,6 +5,8 @@ scoreboard objectives remove killCounter scoreboard objectives remove tradingCounter scoreboard objectives remove damageTaken scoreboard objectives remove fishingCounter +scoreboard objectives remove activation +scoreboard objectives remove actCounter scoreboard objectives remove totalList scoreboard objectives remove tDigC scoreboard objectives remove tDeathC diff --git a/data/fz/functions/score/install.mcfunction b/data/fz/functions/score/install.mcfunction index cd3f05a..725507d 100644 --- a/data/fz/functions/score/install.mcfunction +++ b/data/fz/functions/score/install.mcfunction @@ -1,6 +1,3 @@ -#安装活跃度排行# -function fz:score/activation/install -#### #安装记分项目# scoreboard objectives add digCounter dummy scoreboard objectives add deathCounter deathCount @@ -8,7 +5,9 @@ scoreboard objectives add killCounter totalKillCount scoreboard objectives add tradingCounter minecraft.custom:minecraft.traded_with_villager scoreboard objectives add fishingCounter minecraft.custom:minecraft.fish_caught scoreboard objectives add damageTaken minecraft.custom:minecraft.damage_taken +scoreboard objectives add actCounter minecraft.custom:minecraft.play_one_minute scoreboard objectives add totalList dummy +scoreboard objectives add activation dummy #### #编辑记分项目# scoreboard objectives modify digCounter displayname {"text":"挖掘榜","color":"gray"} @@ -18,6 +17,7 @@ scoreboard objectives modify tradingCounter displayname {"text":"PY榜","color": scoreboard objectives modify fishingCounter displayname {"text":"钓鱼榜","color":"blue"} scoreboard objectives modify damageTaken displayname [{"text":"奥利给榜","color":"yellow"},{"text":"(受伤害*10)","color":"gole"}] scoreboard objectives modify totalList displayname {"text":"统计总量","color":"light_purple"} + scoreboard objectives modify activation displayname [{"text":"活跃度排行","color":"aqua"},{"text":"(小时)","color":"gold"}] #### #安装工具项目# scoreboard objectives add diamond_pickaxe minecraft.used:minecraft.diamond_pickaxe @@ -37,14 +37,16 @@ scoreboard objectives add totalDeath dummy scoreboard objectives add totalTraded dummy scoreboard objectives add totalFished dummy scoreboard objectives add totalHurt dummy +scoreboard objectives add totalActivation dummy #### -###实验性###在分项目下显示总量### -scoreboard players set totalDug totalDug 1 -scoreboard players set totalKilled totalKilled 1 -scoreboard players set totalDeath totalDeath 1 -scoreboard players set totalTraded totalTraded 1 -scoreboard players set totalFished totalFished 1 -scoreboard players set totalHurt totalHurt 1 +###实验性###在分项目下显示总量###活跃度的该项在其自己的安装文件内 +scoreboard players set 总挖掘数 totalDug 1 +scoreboard players set 总击杀数 totalKilled 1 +scoreboard players set 总死亡数 totalDeath 1 +scoreboard players set 总交易数 totalTraded 1 +scoreboard players set 总钓鱼数 totalFished 1 +scoreboard players set 总受伤害量 totalHurt 1 +scoreboard players set 总活跃时间 totalActivation 1 #### #安装记分板显示# #安装队伍 @@ -57,14 +59,17 @@ team add tradingCounter team add fishingCounter team add damageTaken team add totalList -team join digCounter totalDug -team join killCounter totalKilled -team join deathCounter totalDeath -team join fishingCounter totalFished -team join tradingCounter totalTraded -team join damageTaken totalHurt +team add activation +team join digCounter 总挖掘数 +team join killCounter 总击杀数 +team join deathCounter 总死亡数 +team join fishingCounter 总钓鱼数 +team join tradingCounter 总交易数 +team join damageTaken 总受伤害量 +team join activation 总活跃时间 #安装显示 team modify displayScoresOff color dark_purple +scoreboard objectives setdisplay sidebar.team.dark_purple team modify displayScoresOn color gold scoreboard objectives setdisplay sidebar.team.gold totalList team modify killCounter color red @@ -81,6 +86,8 @@ 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 +team modify activation color aqua +scoreboard objectives setdisplay sidebar.team.aqua activation scoreboard objectives add scoreSwitch trigger #### #安装缓存# @@ -90,4 +97,5 @@ scoreboard objectives add tKillC dummy scoreboard objectives add tFishC dummy scoreboard objectives add tTradeC dummy scoreboard objectives add tHurtC dummy +scoreboard objectives add tActC dummy #### \ No newline at end of file diff --git a/data/fz/functions/score/main.mcfunction b/data/fz/functions/score/main.mcfunction index 53c6719..9515403 100644 --- a/data/fz/functions/score/main.mcfunction +++ b/data/fz/functions/score/main.mcfunction @@ -1,5 +1,5 @@ #活跃度模块# -function fz:score/activation/main +execute as @a[tag=!carpetBot] if score @s actCounter matches 72000.. run function fz:score/activationcarry #### #记分板循环# scoreboard players add scoreboard timeCounter 1 @@ -15,7 +15,7 @@ execute if score scoreboard timeCounter matches 4800.. run scoreboard players se #### #记分板开关# 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=!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 @@ -23,7 +23,7 @@ execute if entity @a[scores={scoreSwitch=4},team=!deathCounter] run function fz: 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=8},team=!activation] run function fz:score/teams/activation 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 @@ -43,13 +43,13 @@ execute if entity @a[scores={stone_shovel=1..}] as @a[scores={stone_shovel=1..}] #### #计算总量# #给缓存记分板赋初始值 -execute as @a unless score @s tDigC matches -2147483648..2147483647 run scoreboard players operation @s tDigC = @s tDigC -execute as @a unless score @s tKillC matches -2147483648..2147483647 run scoreboard players operation @s tKillC = @s tKillC -execute as @a unless score @s tDeathC matches -2147483648..2147483647 run scoreboard players operation @s tDeathC = @s tDeathC -execute as @a unless score @s tTradeC matches -2147483648..2147483647 run scoreboard players operation @s tTradeC = @s tTradeC -execute as @a unless score @s tFishC matches -2147483648..2147483647 run scoreboard players operation @s tFishC = @s tFishC -execute as @a unless score @s tHurtC matches -2147483648..2147483647 run scoreboard players operation @s tHurtC = @s tHurtC -execute as @a unless score @s tActC matches -2147483648..2147483647 run scoreboard players operation @s tActC = @s tActC +execute as @a[tag=!carpetBot] unless score @s tDigC matches -2147483648..2147483647 run scoreboard players operation @s tDigC = @s tDigC +execute as @a[tag=!carpetBot] unless score @s tKillC matches -2147483648..2147483647 run scoreboard players operation @s tKillC = @s tKillC +execute as @a[tag=!carpetBot] unless score @s tDeathC matches -2147483648..2147483647 run scoreboard players operation @s tDeathC = @s tDeathC +execute as @a[tag=!carpetBot] unless score @s tTradeC matches -2147483648..2147483647 run scoreboard players operation @s tTradeC = @s tTradeC +execute as @a[tag=!carpetBot] unless score @s tFishC matches -2147483648..2147483647 run scoreboard players operation @s tFishC = @s tFishC +execute as @a[tag=!carpetBot] unless score @s tHurtC matches -2147483648..2147483647 run scoreboard players operation @s tHurtC = @s tHurtC +execute as @a[tag=!carpetBot] unless score @s tActC matches -2147483648..2147483647 run scoreboard players operation @s tActC = @s tActC #两板分数不等时运行计算函数 execute as @a[tag=!carpetBot] unless score @s tDigC = @s digCounter run function fz:score/totalcalculator/tdigc execute as @a[tag=!carpetBot] unless score @s tKillC = @s killCounter run function fz:score/totalcalculator/tkillc @@ -57,16 +57,16 @@ execute as @a[tag=!carpetBot] unless score @s tDeathC = @s deathCounter run func execute as @a[tag=!carpetBot] unless score @s tTradeC = @s tradingCounter run function fz:score/totalcalculator/ttradec execute as @a[tag=!carpetBot] unless score @s tFishC = @s fishingCounter run function fz:score/totalcalculator/tfishc execute as @a[tag=!carpetBot] unless score @s tHurtC = @s damageTaken run function fz:score/totalcalculator/thurtc -execute as @a[tag=!carpetBot] unless score @s tActC = @s activation run function fz:score/activation/totalcalculator -#总榜在分榜中显示开sc=1 -execute if score totalDug totalDug matches 1.. run scoreboard players operation totalDug digCounter = totalDug totalList -execute if score totalKilled totalKilled matches 1.. run scoreboard players operation totalKilled killCounter = totalKilled totalList -execute if score totalDeath totalDeath matches 1.. run scoreboard players operation totalDeath deathCounter = totalDeath totalList -execute if score totalTraded totalTraded matches 1.. run scoreboard players operation totalTraded tradingCounter = totalTraded totalList -execute if score totalFished totalFished matches 1.. run scoreboard players operation totalFished fishingCounter = totalFished totalList -execute if score totalHurt totalHurt matches 1.. run scoreboard players operation totalHurt damageTaken = totalHurt totalList -execute if score totalActivation totalActivation matches 1.. run scoreboard players operation totalActivation activation = totalActivation totalList -#总榜在分榜中显示关sc=0 +execute as @a[tag=!carpetBot] unless score @s tActC = @s activation run function fz:score/totalcalculator/tactc +#总榜在分榜中显示开=1 +execute if score 总挖掘数 totalDug matches 1.. run scoreboard players operation 总挖掘数 digCounter = 总挖掘数 totalList +execute if score 总击杀数 totalKilled matches 1.. run scoreboard players operation 总击杀数 killCounter = 总击杀数 totalList +execute if score 总死亡数 totalDeath matches 1.. run scoreboard players operation 总死亡数 deathCounter = 总死亡数 totalList +execute if score 总交易数 totalTraded matches 1.. run scoreboard players operation 总交易数 tradingCounter = 总交易数 totalList +execute if score 总钓鱼数 totalFished matches 1.. run scoreboard players operation 总钓鱼数 fishingCounter = 总钓鱼数 totalList +execute if score 总受伤害量 totalHurt matches 1.. run scoreboard players operation 总受伤害量 damageTaken = 总受伤害量 totalList +execute if score 总活跃时间 totalActivation matches 1.. run scoreboard players operation 总活跃时间 activation = 总活跃时间 totalList +#总榜在分榜中显示关=0 #execute if score totalDug totalDug matches ..0 run function fz:score/totalnodisplay/digcounter #execute if score totalKilled totalKilled matches ..0 run function fz:score/totalnodisplay/killcounter #execute if score totalDeath totalDeath matches ..0 run function fz:score/totalnodisplay/deathcounter diff --git a/data/fz/functions/score/teams/activation.mcfunction b/data/fz/functions/score/teams/activation.mcfunction new file mode 100644 index 0000000..af8b3a6 --- /dev/null +++ b/data/fz/functions/score/teams/activation.mcfunction @@ -0,0 +1,3 @@ +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/totalcalculator/tactc.mcfunction b/data/fz/functions/score/totalcalculator/tactc.mcfunction new file mode 100644 index 0000000..cdacb85 --- /dev/null +++ b/data/fz/functions/score/totalcalculator/tactc.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻活跃度和上一游戏刻活跃度的差 +scoreboard players operation @s tActC -= @s activation +#将两游戏刻活跃度的差之和加在总榜上 +scoreboard players operation 总活跃时间 totalList -= @s tActC +#储存当前游戏刻的活跃度 +scoreboard players operation @s tActC = @s activation \ 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 81d6a16..d4bec8e 100644 --- a/data/fz/functions/score/totalcalculator/tdeathc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tdeathc.mcfunction @@ -1,6 +1,6 @@ #计算每个玩家本游戏刻死亡数和上一游戏刻死亡数的差 scoreboard players operation @s tDeathC -= @s deathCounter #将两游戏刻玩家死亡数的差之和加在总榜上 -scoreboard players operation totalDeath totalList -= @s tDeathC +scoreboard players operation 总死亡数 totalList -= @s tDeathC #储存当前游戏刻的玩家死亡数 scoreboard players operation @s tDeathC = @s deathCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/tdigc.mcfunction b/data/fz/functions/score/totalcalculator/tdigc.mcfunction index 5cdc2cb..d043639 100644 --- a/data/fz/functions/score/totalcalculator/tdigc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tdigc.mcfunction @@ -1,6 +1,6 @@ #计算每个玩家本游戏刻挖掘量和上一游戏刻挖掘量的差 scoreboard players operation @s tDigC -= @s digCounter #将两游戏刻玩家挖掘量的差之和加在总榜上 -scoreboard players operation totalDug totalList -= @s tDigC +scoreboard players operation 总挖掘数 totalList -= @s tDigC #储存当前游戏刻的玩家挖掘量 scoreboard players operation @s tDigC = @s digCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/tfishc.mcfunction b/data/fz/functions/score/totalcalculator/tfishc.mcfunction index cd5f2a9..63f67ac 100644 --- a/data/fz/functions/score/totalcalculator/tfishc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tfishc.mcfunction @@ -1,6 +1,6 @@ #计算每个玩家本游戏刻钓鱼数和上一游戏刻钓鱼数的差 scoreboard players operation @s tFishC -= @s fishingCounter #将两游戏刻玩家钓鱼数的差之和加在总榜上 -scoreboard players operation totalFished totalList -= @s tFishC +scoreboard players operation 总钓鱼数 totalList -= @s tFishC #储存当前游戏刻的玩家钓鱼数 scoreboard players operation @s tFishC = @s fishingCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/thurtc.mcfunction b/data/fz/functions/score/totalcalculator/thurtc.mcfunction index c266256..4a49e3e 100644 --- a/data/fz/functions/score/totalcalculator/thurtc.mcfunction +++ b/data/fz/functions/score/totalcalculator/thurtc.mcfunction @@ -1,6 +1,6 @@ #计算每个玩家本游戏刻玩家受伤害量和上一游戏刻受伤害量的差 scoreboard players operation @s tHurtC -= @s damageTaken #将两游戏刻玩家受伤害量的差之和加在总榜上 -scoreboard players operation totalHurt totalList -= @s tHurtC +scoreboard players operation 总受伤害量 totalList -= @s tHurtC #储存当前游戏刻的玩家受伤害量 scoreboard players operation @s tHurtC = @s damageTaken \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/tkillc.mcfunction b/data/fz/functions/score/totalcalculator/tkillc.mcfunction index 4cd0f17..6e90d5e 100644 --- a/data/fz/functions/score/totalcalculator/tkillc.mcfunction +++ b/data/fz/functions/score/totalcalculator/tkillc.mcfunction @@ -1,6 +1,6 @@ #计算每个玩家本游戏刻玩家击杀数和上一游戏刻击杀数的差 scoreboard players operation @s tKillC -= @s killCounter #将两游戏刻玩家击杀数的差之和加在总榜上 -scoreboard players operation totalKilled totalList -= @s tKillC +scoreboard players operation 总击杀数 totalList -= @s tKillC #储存当前游戏刻的玩家击杀数 scoreboard players operation @s tKillC = @s killCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/ttradec.mcfunction b/data/fz/functions/score/totalcalculator/ttradec.mcfunction index 7d361e9..43b122d 100644 --- a/data/fz/functions/score/totalcalculator/ttradec.mcfunction +++ b/data/fz/functions/score/totalcalculator/ttradec.mcfunction @@ -1,6 +1,6 @@ #计算每个玩家本游戏刻玩家交易数和上一游戏刻交易数的差 scoreboard players operation @s tTradeC -= @s tradingCounter #将两游戏刻玩家交易数的差之和加在总榜上 -scoreboard players operation totalTraded totalList -= @s tTradeC +scoreboard players operation 总交易数 totalList -= @s tTradeC #储存当前游戏刻的玩家交易数 scoreboard players operation @s tTradeC = @s tradingCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/activation.mcfunction b/data/fz/functions/score/totalnodisplay/activation.mcfunction new file mode 100644 index 0000000..6d2d1b4 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/activation.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总活跃时间 activation +scoreboard players reset 总活跃时间 totalActivation \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction b/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction index 0634d24..961e126 100644 --- a/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction +++ b/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction @@ -1,2 +1,2 @@ -scoreboard players reset totalHurt damageTaken -scoreboard players reset totalHurt totalHurt \ No newline at end of file +scoreboard players reset 总受伤害量 damageTaken +scoreboard players reset 总受伤害量 totalHurt \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction b/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction index dc4975a..6291a9b 100644 --- a/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction +++ b/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction @@ -1,2 +1,2 @@ -scoreboard players reset totalDeath deathCounter -scoreboard players reset totalDeath totalDeath \ No newline at end of file +scoreboard players reset 总死亡数 deathCounter +scoreboard players reset 总死亡数 totalDeath \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/digcounter.mcfunction b/data/fz/functions/score/totalnodisplay/digcounter.mcfunction index 18cf87c..f5bc6b1 100644 --- a/data/fz/functions/score/totalnodisplay/digcounter.mcfunction +++ b/data/fz/functions/score/totalnodisplay/digcounter.mcfunction @@ -1,2 +1,2 @@ -scoreboard players reset totalDug digCounter -scoreboard players reset totalDug totalDug \ No newline at end of file +scoreboard players reset 总挖掘数 digCounter +scoreboard players reset 总挖掘数 totalDug \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction b/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction index 12f8d4d..1c6b16f 100644 --- a/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction +++ b/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction @@ -1,2 +1,2 @@ -scoreboard players reset totalFished fishingCounter -scoreboard players reset totalFished totalFished \ No newline at end of file +scoreboard players reset 总钓鱼数 fishingCounter +scoreboard players reset 总钓鱼数 totalFished \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/killcounter.mcfunction b/data/fz/functions/score/totalnodisplay/killcounter.mcfunction index 0eee927..6642ed2 100644 --- a/data/fz/functions/score/totalnodisplay/killcounter.mcfunction +++ b/data/fz/functions/score/totalnodisplay/killcounter.mcfunction @@ -1,2 +1,2 @@ -scoreboard players reset totalKilled killCounter -scoreboard players reset totalKilled totalKilled \ No newline at end of file +scoreboard players reset 总击杀数 killCounter +scoreboard players reset 总击杀数 totalKilled \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction b/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction index b6f92fa..5e76705 100644 --- a/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction +++ b/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction @@ -1,2 +1,2 @@ -scoreboard players reset totalTraded tradingCounter -scoreboard players reset totalTraded totalTraded \ No newline at end of file +scoreboard players reset 总交易数 tradingCounter +scoreboard players reset 总交易数 totalTraded \ No newline at end of file diff --git a/data/fz/functions/score/uninstall.mcfunction b/data/fz/functions/score/uninstall.mcfunction index f3e5625..7581e58 100644 --- a/data/fz/functions/score/uninstall.mcfunction +++ b/data/fz/functions/score/uninstall.mcfunction @@ -1,4 +1,5 @@ #取消记分板显示# +scoreboard objectives setdisplay sidebar.team.gold scoreboard objectives setdisplay sidebar.team.red scoreboard objectives setdisplay sidebar.team.gray scoreboard objectives setdisplay sidebar.team.dark_red @@ -25,6 +26,7 @@ scoreboard objectives remove totalDeath scoreboard objectives remove totalTraded scoreboard objectives remove totalFished scoreboard objectives remove totalHurt +scoreboard objectives remove totalActivation #### #移除队伍# team remove displayScoresOff @@ -35,10 +37,20 @@ team remove deathCounter team remove tradingCounter team remove fishingCounter team remove damageTaken +team remove activation #### #移除开关# -scoreboard objectives remove scoreswitch +scoreboard objectives remove scoreSwitch +#### +#移除缓存# +scoreboard objectives remove tDigC +scoreboard objectives remove tDeathC +scoreboard objectives remove tKillC +scoreboard objectives remove tFishC +scoreboard objectives remove tTradeC +scoreboard objectives remove tHurtC +scoreboard objectives remove tActC #### #询问是否移除记分板# -tellraw @a [{"text":"是否删除记分板数据?","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"点此删除","color":"dark_red","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/function fz:score/delscores"},"hoverEvent":{"action":"show_text","value":"删除所有记分板数据"}},{"text":"(仅op)","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}] +tellraw @a [{"text":"是否删除记分板数据?"},{"text":"(不可恢复!!)","color":"red","bold":true},{"text":"点此删除","color":"dark_red","underlined":true,"clickEvent":{"action":"run_command","value":"/function fz:score/delscores"},"hoverEvent":{"action":"show_text","value":"删除所有记分板数据"}},{"text":"(仅op)"}] #### \ No newline at end of file diff --git a/data/fz/functions/uninstall.mcfunction b/data/fz/functions/uninstall.mcfunction index 492c7de..c942a5b 100644 --- a/data/fz/functions/uninstall.mcfunction +++ b/data/fz/functions/uninstall.mcfunction @@ -1,6 +1,7 @@ scoreboard objectives remove timeCounter scoreboard objectives remove 20 -scoreboard objectives remove carpet +scoreboard objectives remove version +function fz:carpet/uninstall function fz:health/uninstall function fz:sleep/uninstall function fz:cleaner/uninstall @@ -8,4 +9,5 @@ function fz:logintips/uninstall function fz:score/uninstall function fz:logintips/uninstall function fz:config/uninstall +scoreboard objectives remove installed tellraw @a {"text":"FZ'sDataPack卸载成功!","color":"dark_green"} \ No newline at end of file diff --git a/data/fz/functions/updatebeforeinstall.mcfunction b/data/fz/functions/updatebeforeinstall.mcfunction new file mode 100644 index 0000000..8be1b5b --- /dev/null +++ b/data/fz/functions/updatebeforeinstall.mcfunction @@ -0,0 +1,17 @@ +scoreboard objectives remove installed +scoreboard players operation 总挖掘数 totalList = totalDug totalList +scoreboard players operation 总击杀数 totalList = totalKilled totalList +scoreboard players operation 总死亡数 totalList = totalDeath totalList +scoreboard players operation 总交易数 totalList = totalTraded totalList +scoreboard players operation 总钓鱼数 totalList = totalFished totalList +scoreboard players operation 总受伤害量 totalList = totalHurt totalList +scoreboard players operation 总活跃时间 totalList = totalActivation totalList +scoreboard players reset totalDug +scoreboard players reset totalKilled +scoreboard players reset totalDeath +scoreboard players reset totalTraded +scoreboard players reset totalFished +scoreboard players reset totalHurt +scoreboard players reset totalActivation +scoreboard objectives remove scoreswitch +scoreboard objectives remove actCounter \ No newline at end of file diff --git a/data/minecraft/tags/functions/tick.json b/data/minecraft/tags/functions/tick.json index 9d7da0f..05fc054 100644 --- a/data/minecraft/tags/functions/tick.json +++ b/data/minecraft/tags/functions/tick.json @@ -1,10 +1,5 @@ { "values": [ - "fz:score/main", - "fz:sleep/main", - "fz:cleaner/trigger", - "fz:logintips/main", - "fz:noai/main", - "fz:config/main" + "fz:main" ] } \ No newline at end of file