From 9085a7c9742c9434a1093f96f426a2e6bc5025f7 Mon Sep 17 00:00:00 2001 From: Harveykang <46108547+Harveykang@users.noreply.github.com> Date: Thu, 12 Dec 2019 00:07:07 +0800 Subject: [PATCH] Add files via upload --- README.txt | 44 ++++++++++ .../functions/cleaner/cleaneroff.mcfunction | 4 + .../fz/functions/cleaner/cleaneron.mcfunction | 6 ++ data/fz/functions/cleaner/install.mcfunction | 5 ++ data/fz/functions/cleaner/main.mcfunction | 13 +++ data/fz/functions/cleaner/subclean.mcfunction | 4 + data/fz/functions/cleaner/trigger.mcfunction | 7 ++ .../fz/functions/cleaner/uninstall.mcfunction | 5 ++ data/fz/functions/health/install.mcfunction | 4 + data/fz/functions/health/uninstall.mcfunction | 1 + data/fz/functions/install.mcfunction | 9 +++ .../fz/functions/logintips/install.mcfunction | 1 + data/fz/functions/logintips/main.mcfunction | 3 + .../functions/logintips/uninstall.mcfunction | 1 + data/fz/functions/score/delscores.mcfunction | 17 ++++ data/fz/functions/score/install.mcfunction | 81 +++++++++++++++++++ data/fz/functions/score/main.mcfunction | 68 ++++++++++++++++ .../score/teams/damagetaken.mcfunction | 3 + .../score/teams/deathcounter.mcfunction | 3 + .../score/teams/digcounter.mcfunction | 3 + .../score/teams/displayscoresoff.mcfunction | 2 + .../score/teams/displayscoreson.mcfunction | 2 + .../score/teams/fishingcounter.mcfunction | 3 + .../score/teams/killcounter.mcfunction | 3 + .../score/teams/totallist.mcfunction | 3 + .../score/teams/tradingcounter.mcfunction | 3 + .../score/tools/diamond_axe.mcfunction | 2 + .../score/tools/diamond_pickaxe.mcfunction | 2 + .../score/tools/diamond_shovel.mcfunction | 2 + .../functions/score/tools/iron_axe.mcfunction | 2 + .../score/tools/iron_pickaxe.mcfunction | 2 + .../score/tools/iron_shovel.mcfunction | 2 + .../score/tools/stone_axe.mcfunction | 2 + .../score/tools/stone_pickaxe.mcfunction | 2 + .../score/tools/stone_shovel.mcfunction | 2 + .../score/totalcalculator/tdeathc.mcfunction | 6 ++ .../score/totalcalculator/tdigc.mcfunction | 6 ++ .../score/totalcalculator/tfishc.mcfunction | 6 ++ .../score/totalcalculator/thurtc.mcfunction | 6 ++ .../score/totalcalculator/tkillc.mcfunction | 6 ++ .../score/totalcalculator/ttradec.mcfunction | 6 ++ .../totalnodisplay/damagetaken.mcfunction | 2 + .../totalnodisplay/deathcounter.mcfunction | 2 + .../totalnodisplay/digcounter.mcfunction | 2 + .../totalnodisplay/fishingcounter.mcfunction | 2 + .../totalnodisplay/killcounter.mcfunction | 2 + .../totalnodisplay/tradingcounter.mcfunction | 2 + data/fz/functions/score/uninstall.mcfunction | 44 ++++++++++ data/fz/functions/sleep/install.mcfunction | 1 + data/fz/functions/sleep/main.mcfunction | 2 + data/fz/functions/sleep/uninstall.mcfunction | 1 + data/fz/functions/uninstall.mcfunction | 8 ++ data/minecraft/tags/functions/load.json | 5 ++ data/minecraft/tags/functions/tick.json | 8 ++ pack.mcmeta | 6 ++ 55 files changed, 439 insertions(+) create mode 100644 README.txt create mode 100644 data/fz/functions/cleaner/cleaneroff.mcfunction create mode 100644 data/fz/functions/cleaner/cleaneron.mcfunction create mode 100644 data/fz/functions/cleaner/install.mcfunction create mode 100644 data/fz/functions/cleaner/main.mcfunction create mode 100644 data/fz/functions/cleaner/subclean.mcfunction create mode 100644 data/fz/functions/cleaner/trigger.mcfunction create mode 100644 data/fz/functions/cleaner/uninstall.mcfunction create mode 100644 data/fz/functions/health/install.mcfunction create mode 100644 data/fz/functions/health/uninstall.mcfunction create mode 100644 data/fz/functions/install.mcfunction create mode 100644 data/fz/functions/logintips/install.mcfunction create mode 100644 data/fz/functions/logintips/main.mcfunction create mode 100644 data/fz/functions/logintips/uninstall.mcfunction create mode 100644 data/fz/functions/score/delscores.mcfunction create mode 100644 data/fz/functions/score/install.mcfunction create mode 100644 data/fz/functions/score/main.mcfunction create mode 100644 data/fz/functions/score/teams/damagetaken.mcfunction create mode 100644 data/fz/functions/score/teams/deathcounter.mcfunction create mode 100644 data/fz/functions/score/teams/digcounter.mcfunction create mode 100644 data/fz/functions/score/teams/displayscoresoff.mcfunction create mode 100644 data/fz/functions/score/teams/displayscoreson.mcfunction create mode 100644 data/fz/functions/score/teams/fishingcounter.mcfunction create mode 100644 data/fz/functions/score/teams/killcounter.mcfunction create mode 100644 data/fz/functions/score/teams/totallist.mcfunction create mode 100644 data/fz/functions/score/teams/tradingcounter.mcfunction create mode 100644 data/fz/functions/score/tools/diamond_axe.mcfunction create mode 100644 data/fz/functions/score/tools/diamond_pickaxe.mcfunction create mode 100644 data/fz/functions/score/tools/diamond_shovel.mcfunction create mode 100644 data/fz/functions/score/tools/iron_axe.mcfunction create mode 100644 data/fz/functions/score/tools/iron_pickaxe.mcfunction create mode 100644 data/fz/functions/score/tools/iron_shovel.mcfunction create mode 100644 data/fz/functions/score/tools/stone_axe.mcfunction create mode 100644 data/fz/functions/score/tools/stone_pickaxe.mcfunction create mode 100644 data/fz/functions/score/tools/stone_shovel.mcfunction create mode 100644 data/fz/functions/score/totalcalculator/tdeathc.mcfunction create mode 100644 data/fz/functions/score/totalcalculator/tdigc.mcfunction create mode 100644 data/fz/functions/score/totalcalculator/tfishc.mcfunction create mode 100644 data/fz/functions/score/totalcalculator/thurtc.mcfunction create mode 100644 data/fz/functions/score/totalcalculator/tkillc.mcfunction create mode 100644 data/fz/functions/score/totalcalculator/ttradec.mcfunction create mode 100644 data/fz/functions/score/totalnodisplay/damagetaken.mcfunction create mode 100644 data/fz/functions/score/totalnodisplay/deathcounter.mcfunction create mode 100644 data/fz/functions/score/totalnodisplay/digcounter.mcfunction create mode 100644 data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction create mode 100644 data/fz/functions/score/totalnodisplay/killcounter.mcfunction create mode 100644 data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction create mode 100644 data/fz/functions/score/uninstall.mcfunction create mode 100644 data/fz/functions/sleep/install.mcfunction create mode 100644 data/fz/functions/sleep/main.mcfunction create mode 100644 data/fz/functions/sleep/uninstall.mcfunction create mode 100644 data/fz/functions/uninstall.mcfunction create mode 100644 data/minecraft/tags/functions/load.json create mode 100644 data/minecraft/tags/functions/tick.json create mode 100644 pack.mcmeta diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..6c54dc3 --- /dev/null +++ b/README.txt @@ -0,0 +1,44 @@ +记分板:/trigger scoreswitch set -1关;1循环播放;2-7订阅单独的记分板 +扫地姬:/trigger cleaner set -1关;>=30开 + +v1.3.0 +-大修记分板,增加了总分数计算和显示 +-*不兼容*1.2.x的记分板 +-添加部分代码的注释 + +v1.2.3 +-修复记分板无法完全卸载的bug +-增加了在卸载保留记分板的选项 + +v1.2.2 +-增加记分板订阅功能 + +v1.2.1 +-修复加载时版本号与实际不一致的bug + +v1.2.0 +-现在可以自定义扫地姬清扫的时间间隔了 + +v1.1.4 +-增加登录时显示的提示文本 +-更改记分板开关队伍名称使其更易读 +-更改开关指令的数值,现在为1开、-1关 +-修复当其他玩家进入游戏时,扫地姬会关闭的bug + +v1.1.3 +-调整扫地姬清理间隔为120游戏秒 + +v1.1.2 +-调整扫地姬使其在关闭时timeCounter归零,而不是开启时 + +v1.1.1 +-修复记分板不更新的bug + +v1.1 +-增加受伤害量记分板 +-增加扫地姬,以及扫地姬开关 + +v1.0 +-增加玩家睡觉提醒 +-增加玩家tab栏和头顶的血量显示 +-增加记分版:挖掘量、造成伤害量、死亡次数、钓鱼次数、交易次数,以及记分版开关 \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleaneroff.mcfunction b/data/fz/functions/cleaner/cleaneroff.mcfunction new file mode 100644 index 0000000..6a1fe87 --- /dev/null +++ b/data/fz/functions/cleaner/cleaneroff.mcfunction @@ -0,0 +1,4 @@ +execute if score cleaner cleanerBooleans matches 1 run tellraw @a [{"text":"扫地姬已关闭~","color":"green"}] +scoreboard players set cleaner cleanerBooleans 0 +scoreboard players set cleaner setCleanTime 0 +scoreboard players set cleaner displayCleanTime 0 \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleaneron.mcfunction b/data/fz/functions/cleaner/cleaneron.mcfunction new file mode 100644 index 0000000..6c7e752 --- /dev/null +++ b/data/fz/functions/cleaner/cleaneron.mcfunction @@ -0,0 +1,6 @@ +scoreboard players operation cleaner displayCleanTime = @a[scores={cleaner=30..}] cleaner +scoreboard players operation cleaner setCleanTime = @a[scores={cleaner=30..}] cleaner +scoreboard players operation cleaner setCleanTime *= 20 20 +scoreboard players operation cleaner timeCounter = cleaner setCleanTime +tellraw @a [{"text":"扫地姬已开启~","color":"green"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后清理掉落物~","color":"yellow"}] +scoreboard players set cleaner cleanerBooleans 1 \ No newline at end of file diff --git a/data/fz/functions/cleaner/install.mcfunction b/data/fz/functions/cleaner/install.mcfunction new file mode 100644 index 0000000..9e66f10 --- /dev/null +++ b/data/fz/functions/cleaner/install.mcfunction @@ -0,0 +1,5 @@ +scoreboard objectives add cleaner trigger +scoreboard objectives add cleaned dummy +scoreboard objectives add cleanerBooleans dummy +scoreboard objectives add setCleanTime dummy +scoreboard objectives add displayCleanTime dummy \ No newline at end of file diff --git a/data/fz/functions/cleaner/main.mcfunction b/data/fz/functions/cleaner/main.mcfunction new file mode 100644 index 0000000..f2a321e --- /dev/null +++ b/data/fz/functions/cleaner/main.mcfunction @@ -0,0 +1,13 @@ +execute if score cleaner timeCounter matches ..0 run function fz:cleaner/subclean +execute if score cleaner timeCounter matches 6000 run tellraw @a [{"text":"5游戏分后清理掉落物~","color":"gold"}] +execute if score cleaner timeCounter matches 3600 run tellraw @a [{"text":"3游戏分后清理掉落物~","color":"gold"}] +execute if score cleaner timeCounter matches 2400 run tellraw @a [{"text":"2游戏分后清理掉落物~","color":"gold"}] +execute if score cleaner timeCounter matches 1200 run tellraw @a [{"text":"60游戏秒后清理掉落物~小伙伴们抓紧时间rua!","color":"gold"}] +execute if score cleaner timeCounter matches 600 run tellraw @a [{"text":"30游戏秒后清理掉落物~搞事的先停停rua!","color":"red"}] +execute if score cleaner timeCounter matches 200 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"10","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +execute if score cleaner timeCounter matches 100 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"5","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] +execute if score cleaner timeCounter matches 80 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"4","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] +execute if score cleaner timeCounter matches 60 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"3","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] +execute if score cleaner timeCounter matches 40 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"2","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] +execute if score cleaner timeCounter matches 20 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"1","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] +scoreboard players remove cleaner timeCounter 1 \ No newline at end of file diff --git a/data/fz/functions/cleaner/subclean.mcfunction b/data/fz/functions/cleaner/subclean.mcfunction new file mode 100644 index 0000000..151d50c --- /dev/null +++ b/data/fz/functions/cleaner/subclean.mcfunction @@ -0,0 +1,4 @@ +execute store result score cleaned cleaned run kill @e[type=item] +tellraw @a [{"text":"这次一共清理了","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"cleaned","name":"cleaned"},"color":"yellow","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false},{"text":"堆物品~","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"下次清理将在","color":"yellow"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后开始~","color":"yellow"}] +scoreboard players set cleaned cleaned 0 +scoreboard players operation cleaner timeCounter = cleaner setCleanTime \ No newline at end of file diff --git a/data/fz/functions/cleaner/trigger.mcfunction b/data/fz/functions/cleaner/trigger.mcfunction new file mode 100644 index 0000000..667d1ca --- /dev/null +++ b/data/fz/functions/cleaner/trigger.mcfunction @@ -0,0 +1,7 @@ +scoreboard players enable @a cleaner +execute if entity @a[scores={cleaner=..-1}] run function fz:cleaner/cleaneroff +execute if entity @a[scores={cleaner=1..29}] run tellraw @a[scores={cleaner=1..29}] [{"text":"请输入>=30的时间(单位:秒)","color":"dark_red"}] +execute if entity @a[scores={cleaner=30..}] run function fz:cleaner/cleaneron +scoreboard players set @a[scores={cleaner=..-1}] cleaner 0 +scoreboard players set @a[scores={cleaner=1..}] cleaner 0 +execute if score cleaner cleanerBooleans matches 1 run function fz:cleaner/main \ No newline at end of file diff --git a/data/fz/functions/cleaner/uninstall.mcfunction b/data/fz/functions/cleaner/uninstall.mcfunction new file mode 100644 index 0000000..02b76cb --- /dev/null +++ b/data/fz/functions/cleaner/uninstall.mcfunction @@ -0,0 +1,5 @@ +scoreboard objectives remove cleaner +scoreboard objectives remove cleaned +scoreboard objectives remove cleanerBooleans +scoreboard objectives remove setCleanTime +scoreboard objectives remove displayCleanTime \ No newline at end of file diff --git a/data/fz/functions/health/install.mcfunction b/data/fz/functions/health/install.mcfunction new file mode 100644 index 0000000..36675ac --- /dev/null +++ b/data/fz/functions/health/install.mcfunction @@ -0,0 +1,4 @@ +scoreboard objectives add health health {"text":"cm","color":"green"} +scoreboard objectives modify health rendertype hearts +scoreboard objectives setdisplay belowName health +scoreboard objectives setdisplay list health \ No newline at end of file diff --git a/data/fz/functions/health/uninstall.mcfunction b/data/fz/functions/health/uninstall.mcfunction new file mode 100644 index 0000000..8ee2586 --- /dev/null +++ b/data/fz/functions/health/uninstall.mcfunction @@ -0,0 +1 @@ +scoreboard objectives remove health \ No newline at end of file diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction new file mode 100644 index 0000000..8a8471b --- /dev/null +++ b/data/fz/functions/install.mcfunction @@ -0,0 +1,9 @@ +scoreboard objectives add timeCounter dummy +scoreboard objectives add 20 dummy +scoreboard players set 20 20 20 +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.0 installed successfully","color":"gold"}] \ No newline at end of file diff --git a/data/fz/functions/logintips/install.mcfunction b/data/fz/functions/logintips/install.mcfunction new file mode 100644 index 0000000..19fae01 --- /dev/null +++ b/data/fz/functions/logintips/install.mcfunction @@ -0,0 +1 @@ +scoreboard objectives add leaveGame minecraft.custom:minecraft.leave_game \ No newline at end of file diff --git a/data/fz/functions/logintips/main.mcfunction b/data/fz/functions/logintips/main.mcfunction new file mode 100644 index 0000000..275e382 --- /dev/null +++ b/data/fz/functions/logintips/main.mcfunction @@ -0,0 +1,3 @@ +tellraw @a[scores={leaveGame=0..}] [{"text":"使用","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/trigger cleaner set -1或>30的数字(单位:秒)","bold":false,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false,"insertion":"/trigger cleaner set","hoverEvent":{"action":"show_text","value":"shift点击写入聊天栏"}},{"text":"来关/开扫地姬","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}] +tellraw @a[scores={leaveGame=0..}] [{"text":"使用","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/trigger scoreswitch set -1或1-7的数字","bold":false,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false,"insertion":"/trigger scoreswitch set","hoverEvent":{"action":"show_text","value":"shift点击写入聊天栏"}},{"text":"来关/开记分板","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}] +scoreboard players set @a[scores={leaveGame=0..}] leaveGame -1 \ No newline at end of file diff --git a/data/fz/functions/logintips/uninstall.mcfunction b/data/fz/functions/logintips/uninstall.mcfunction new file mode 100644 index 0000000..c49b4dd --- /dev/null +++ b/data/fz/functions/logintips/uninstall.mcfunction @@ -0,0 +1 @@ +scoreboard objectives remove leaveGame \ No newline at end of file diff --git a/data/fz/functions/score/delscores.mcfunction b/data/fz/functions/score/delscores.mcfunction new file mode 100644 index 0000000..0c89637 --- /dev/null +++ b/data/fz/functions/score/delscores.mcfunction @@ -0,0 +1,17 @@ +#移除基础记分板# +scoreboard objectives remove digCounter +scoreboard objectives remove deathCounter +scoreboard objectives remove killCounter +scoreboard objectives remove tradingCounter +scoreboard objectives remove damageTaken +scoreboard objectives remove fishingCounter +scoreboard objectives remove totalList +scoreboard objectives remove tDigC +scoreboard objectives remove tDeathC +scoreboard objectives remove tKillC +scoreboard objectives remove tFishC +scoreboard objectives remove tTradeC +scoreboard objectives remove tHurtC +#提示信息 +tellraw @a [{"text":"记分板已移除"}] +#### \ No newline at end of file diff --git a/data/fz/functions/score/install.mcfunction b/data/fz/functions/score/install.mcfunction new file mode 100644 index 0000000..d100f89 --- /dev/null +++ b/data/fz/functions/score/install.mcfunction @@ -0,0 +1,81 @@ +#安装记分项目# +scoreboard objectives add digCounter dummy {"text":"挖掘榜","color":"gray"} +scoreboard objectives add deathCounter deathCount {"text":"死亡榜","color":"dark_red"} +scoreboard objectives add killCounter totalKillCount {"text":"击杀榜","color":"red"} +scoreboard objectives add tradingCounter minecraft.custom:minecraft.traded_with_villager {"text":"PY榜","color":"green"} +scoreboard objectives add fishingCounter minecraft.custom:minecraft.fish_caught {"text":"钓鱼榜","color":"blue"} +scoreboard objectives add damageTaken minecraft.custom:minecraft.damage_taken [{"text":"奥利给榜","color":"yellow"},{"text":"(伤害*10)","color":"gole"}] +scoreboard objectives add totalList dummy {"text":"统计总量","color":"light_purple"} +#### +#安装工具项目# +scoreboard objectives add diamond_pickaxe minecraft.used:minecraft.diamond_pickaxe +scoreboard objectives add diamond_axe minecraft.used:minecraft.diamond_axe +scoreboard objectives add diamond_shovel minecraft.used:minecraft.diamond_shovel +scoreboard objectives add iron_pickaxe minecraft.used:minecraft.iron_pickaxe +scoreboard objectives add iron_axe minecraft.used:minecraft.iron_axe +scoreboard objectives add iron_shovel minecraft.used:minecraft.iron_shovel +scoreboard objectives add stone_pickaxe minecraft.used:minecraft.stone_pickaxe +scoreboard objectives add stone_axe minecraft.used:minecraft.stone_axe +scoreboard objectives add stone_shovel minecraft.used:minecraft.stone_shovel +#### +#安装统计项目# +scoreboard objectives add totalDug dummy +scoreboard objectives add totalKilled dummy +scoreboard objectives add totalDeath dummy +scoreboard objectives add totalTraded dummy +scoreboard objectives add totalFished dummy +scoreboard objectives add totalHurt 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 +#### +#安装记分板显示# +#安装队伍 +team add displayScoresOff +team add displayScoresOn +team add killCounter +team add digCounter +team add deathCounter +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 modify displayScoresOff color dark_purple +team modify displayScoresOn color gold +scoreboard objectives setdisplay sidebar.team.gold totalList +team modify killCounter color red +scoreboard objectives setdisplay sidebar.team.red killCounter +team modify digCounter color gray +scoreboard objectives setdisplay sidebar.team.gray digCounter +team modify deathCounter color dark_red +scoreboard objectives setdisplay sidebar.team.dark_red deathCounter +team modify tradingCounter color green +scoreboard objectives setdisplay sidebar.team.green tradingCounter +team modify fishingCounter color blue +scoreboard objectives setdisplay sidebar.team.blue fishingCounter +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 tDigC dummy +scoreboard objectives add tDeathC dummy +scoreboard objectives add tKillC dummy +scoreboard objectives add tFishC dummy +scoreboard objectives add tTradeC dummy +scoreboard objectives add tHurtC dummy +#### \ No newline at end of file diff --git a/data/fz/functions/score/main.mcfunction b/data/fz/functions/score/main.mcfunction new file mode 100644 index 0000000..9997031 --- /dev/null +++ b/data/fz/functions/score/main.mcfunction @@ -0,0 +1,68 @@ +#记分板循环# +scoreboard players add scoreboard timeCounter 1 +execute if score scoreboard timeCounter matches 600 run scoreboard objectives setdisplay sidebar.team.gold killCounter +execute if score scoreboard timeCounter matches 1200 run scoreboard objectives setdisplay sidebar.team.gold digCounter +execute if score scoreboard timeCounter matches 1800 run scoreboard objectives setdisplay sidebar.team.gold deathCounter +execute if score scoreboard timeCounter matches 2400 run scoreboard objectives setdisplay sidebar.team.gold tradingCounter +execute if score scoreboard timeCounter matches 3000 run scoreboard objectives setdisplay sidebar.team.gold fishingCounter +execute if score scoreboard timeCounter matches 3600 run scoreboard objectives setdisplay sidebar.team.gold damageTaken +execute if score scoreboard timeCounter matches 4200 run scoreboard objectives setdisplay sidebar.team.light_purple totalList +execute if score scoreboard timeCounter matches 4200.. 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=!totalList] run function fz:score/teams/totallist +execute if entity @a[scores={scoreswitch=9..}] run tellraw @a[scores={scoreswitch=9..}] [{"text":"不存在编号为9及以上的记分板","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=] +#### +#添加工具计入挖掘量# +execute if entity @a[scores={diamond_pickaxe=1..}] as @a[scores={diamond_pickaxe=1..}] run function fz:score/tools/diamond_pickaxe +execute if entity @a[scores={iron_pickaxe=1..}] as @a[scores={iron_pickaxe=1..}] run function fz:score/tools/iron_pickaxe +execute if entity @a[scores={stone_pickaxe=1..}] as @a[scores={stone_pickaxe=1..}] run function fz:score/tools/stone_pickaxe +execute if entity @a[scores={diamond_axe=1..}] as @a[scores={diamond_axe=1..}] run function fz:score/tools/diamond_axe +execute if entity @a[scores={iron_axe=1..}] as @a[scores={iron_axe=1..}] run function fz:score/tools/iron_axe +execute if entity @a[scores={stone_axe=1..}] as @a[scores={stone_axe=1..}] run function fz:score/tools/stone_axe +execute if entity @a[scores={diamond_shovel=1..}] as @a[scores={diamond_shovel=1..}] run function fz:score/tools/diamond_shovel +execute if entity @a[scores={iron_shovel=1..}] as @a[scores={iron_shovel=1..}] run function fz:score/tools/iron_shovel +execute if entity @a[scores={stone_shovel=1..}] as @a[scores={stone_shovel=1..}] run function fz:score/tools/stone_shovel +#### +#计算总量# +#给缓存记分板赋初始值 +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 tDigC = @s digCounter run function fz:score/totalcalculator/tdigc +execute as @a unless score @s tKillC = @s killCounter run function fz:score/totalcalculator/tkillc +execute as @a unless score @s tDeathC = @s deathCounter run function fz:score/totalcalculator/tdeathc +execute as @a unless score @s tTradeC = @s tradingCounter run function fz:score/totalcalculator/ttradec +execute as @a unless score @s tFishC = @s fishingCounter run function fz:score/totalcalculator/tfishc +execute as @a unless score @s tHurtC = @s damageTaken run function fz:score/totalcalculator/thurtc +#总榜在分榜中显示开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 +#总榜在分榜中显示关sc=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 +#execute if score totalTraded totalTraded matches ..0 run function fz:score/totalnodisplay/tradingcounter +#execute if score totalFished totalFished matches ..0 run function fz:score/totalnodisplay/fishingcounter +#execute if score totalHurt totalHurt matches ..0 run function fz:score/totalnodisplay/damagetaken +#### \ No newline at end of file diff --git a/data/fz/functions/score/teams/damagetaken.mcfunction b/data/fz/functions/score/teams/damagetaken.mcfunction new file mode 100644 index 0000000..62c6d1f --- /dev/null +++ b/data/fz/functions/score/teams/damagetaken.mcfunction @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..5b62bcc --- /dev/null +++ b/data/fz/functions/score/teams/deathcounter.mcfunction @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..58e4a4e --- /dev/null +++ b/data/fz/functions/score/teams/digcounter.mcfunction @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..50d8662 --- /dev/null +++ b/data/fz/functions/score/teams/displayscoresoff.mcfunction @@ -0,0 +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 diff --git a/data/fz/functions/score/teams/displayscoreson.mcfunction b/data/fz/functions/score/teams/displayscoreson.mcfunction new file mode 100644 index 0000000..d0d5e93 --- /dev/null +++ b/data/fz/functions/score/teams/displayscoreson.mcfunction @@ -0,0 +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 diff --git a/data/fz/functions/score/teams/fishingcounter.mcfunction b/data/fz/functions/score/teams/fishingcounter.mcfunction new file mode 100644 index 0000000..c78e3a9 --- /dev/null +++ b/data/fz/functions/score/teams/fishingcounter.mcfunction @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..03c7cbf --- /dev/null +++ b/data/fz/functions/score/teams/killcounter.mcfunction @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..75422d2 --- /dev/null +++ b/data/fz/functions/score/teams/totallist.mcfunction @@ -0,0 +1,3 @@ +tellraw @a[scores={scoreswitch=8},team=!totalList] [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}] +team join totalList @a[scores={scoreswitch=8},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 new file mode 100644 index 0000000..2ef76c9 --- /dev/null +++ b/data/fz/functions/score/teams/tradingcounter.mcfunction @@ -0,0 +1,3 @@ +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/tools/diamond_axe.mcfunction b/data/fz/functions/score/tools/diamond_axe.mcfunction new file mode 100644 index 0000000..ed28ee7 --- /dev/null +++ b/data/fz/functions/score/tools/diamond_axe.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s diamond_axe +scoreboard players reset @s diamond_axe \ No newline at end of file diff --git a/data/fz/functions/score/tools/diamond_pickaxe.mcfunction b/data/fz/functions/score/tools/diamond_pickaxe.mcfunction new file mode 100644 index 0000000..aa6e747 --- /dev/null +++ b/data/fz/functions/score/tools/diamond_pickaxe.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s diamond_pickaxe +scoreboard players reset @s diamond_pickaxe \ No newline at end of file diff --git a/data/fz/functions/score/tools/diamond_shovel.mcfunction b/data/fz/functions/score/tools/diamond_shovel.mcfunction new file mode 100644 index 0000000..bc30459 --- /dev/null +++ b/data/fz/functions/score/tools/diamond_shovel.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s diamond_shovel +scoreboard players reset @s diamond_shovel \ No newline at end of file diff --git a/data/fz/functions/score/tools/iron_axe.mcfunction b/data/fz/functions/score/tools/iron_axe.mcfunction new file mode 100644 index 0000000..7d6dc26 --- /dev/null +++ b/data/fz/functions/score/tools/iron_axe.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s iron_axe +scoreboard players reset @s iron_axe \ No newline at end of file diff --git a/data/fz/functions/score/tools/iron_pickaxe.mcfunction b/data/fz/functions/score/tools/iron_pickaxe.mcfunction new file mode 100644 index 0000000..2dd5572 --- /dev/null +++ b/data/fz/functions/score/tools/iron_pickaxe.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s iron_pickaxe +scoreboard players reset @s iron_pickaxe \ No newline at end of file diff --git a/data/fz/functions/score/tools/iron_shovel.mcfunction b/data/fz/functions/score/tools/iron_shovel.mcfunction new file mode 100644 index 0000000..c8641fd --- /dev/null +++ b/data/fz/functions/score/tools/iron_shovel.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s iron_shovel +scoreboard players reset @s iron_shovel \ No newline at end of file diff --git a/data/fz/functions/score/tools/stone_axe.mcfunction b/data/fz/functions/score/tools/stone_axe.mcfunction new file mode 100644 index 0000000..c7cc8a9 --- /dev/null +++ b/data/fz/functions/score/tools/stone_axe.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s stone_axe +scoreboard players reset @s stone_axe \ No newline at end of file diff --git a/data/fz/functions/score/tools/stone_pickaxe.mcfunction b/data/fz/functions/score/tools/stone_pickaxe.mcfunction new file mode 100644 index 0000000..ebe0acf --- /dev/null +++ b/data/fz/functions/score/tools/stone_pickaxe.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s stone_pickaxe +scoreboard players reset @s stone_pickaxe \ No newline at end of file diff --git a/data/fz/functions/score/tools/stone_shovel.mcfunction b/data/fz/functions/score/tools/stone_shovel.mcfunction new file mode 100644 index 0000000..b80ec8c --- /dev/null +++ b/data/fz/functions/score/tools/stone_shovel.mcfunction @@ -0,0 +1,2 @@ +scoreboard players operation @s digCounter += @s stone_shovel +scoreboard players reset @s stone_shovel \ No newline at end of file diff --git a/data/fz/functions/score/totalcalculator/tdeathc.mcfunction b/data/fz/functions/score/totalcalculator/tdeathc.mcfunction new file mode 100644 index 0000000..be60601 --- /dev/null +++ b/data/fz/functions/score/totalcalculator/tdeathc.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻挖掘量和上一游戏刻死亡数的差 +scoreboard players operation @s tDeathC -= @s deathCounter +#将两游戏刻玩家死亡数的差之和加在总榜上 +scoreboard players operation totalDeath 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 new file mode 100644 index 0000000..5cdc2cb --- /dev/null +++ b/data/fz/functions/score/totalcalculator/tdigc.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻挖掘量和上一游戏刻挖掘量的差 +scoreboard players operation @s tDigC -= @s digCounter +#将两游戏刻玩家挖掘量的差之和加在总榜上 +scoreboard players operation totalDug 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 new file mode 100644 index 0000000..642bbf1 --- /dev/null +++ b/data/fz/functions/score/totalcalculator/tfishc.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻挖掘量和上一游戏刻钓鱼数的差 +scoreboard players operation @s tFishC -= @s fishingCounter +#将两游戏刻玩家钓鱼数的差之和加在总榜上 +scoreboard players operation totalFished 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 new file mode 100644 index 0000000..21820b7 --- /dev/null +++ b/data/fz/functions/score/totalcalculator/thurtc.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻挖掘量和上一游戏刻受伤害量的差 +scoreboard players operation @s tHurtC -= @s damageTaken +#将两游戏刻玩家受伤害量的差之和加在总榜上 +scoreboard players operation totalHurt 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 new file mode 100644 index 0000000..589ae20 --- /dev/null +++ b/data/fz/functions/score/totalcalculator/tkillc.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻挖掘量和上一游戏刻击杀数的差 +scoreboard players operation @s tKillC -= @s killCounter +#将两游戏刻玩家击杀数的差之和加在总榜上 +scoreboard players operation totalKilled 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 new file mode 100644 index 0000000..08c2573 --- /dev/null +++ b/data/fz/functions/score/totalcalculator/ttradec.mcfunction @@ -0,0 +1,6 @@ +#计算每个玩家本游戏刻挖掘量和上一游戏刻交易数的差 +scoreboard players operation @s tTradeC -= @s tradingCounter +#将两游戏刻玩家交易数的差之和加在总榜上 +scoreboard players operation totalTraded totalList -= @s tTradeC +#储存当前游戏刻的玩家交易数 +scoreboard players operation @s tTradeC = @s tradingCounter \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction b/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction new file mode 100644 index 0000000..0634d24 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset totalHurt damageTaken +scoreboard players reset totalHurt 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 new file mode 100644 index 0000000..dc4975a --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset totalDeath deathCounter +scoreboard players reset totalDeath 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 new file mode 100644 index 0000000..18cf87c --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/digcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset totalDug digCounter +scoreboard players reset totalDug 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 new file mode 100644 index 0000000..12f8d4d --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset totalFished fishingCounter +scoreboard players reset totalFished 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 new file mode 100644 index 0000000..0eee927 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/killcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset totalKilled killCounter +scoreboard players reset totalKilled 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 new file mode 100644 index 0000000..b6f92fa --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset totalTraded tradingCounter +scoreboard players reset totalTraded totalTraded \ No newline at end of file diff --git a/data/fz/functions/score/uninstall.mcfunction b/data/fz/functions/score/uninstall.mcfunction new file mode 100644 index 0000000..f3e5625 --- /dev/null +++ b/data/fz/functions/score/uninstall.mcfunction @@ -0,0 +1,44 @@ +#取消记分板显示# +scoreboard objectives setdisplay sidebar.team.red +scoreboard objectives setdisplay sidebar.team.gray +scoreboard objectives setdisplay sidebar.team.dark_red +scoreboard objectives setdisplay sidebar.team.green +scoreboard objectives setdisplay sidebar.team.blue +scoreboard objectives setdisplay sidebar.team.yellow +scoreboard objectives setdisplay sidebar.team.light_purple +#### +#移除工具项目# +scoreboard objectives remove diamond_pickaxe +scoreboard objectives remove diamond_axe +scoreboard objectives remove diamond_shovel +scoreboard objectives remove iron_pickaxe +scoreboard objectives remove iron_axe +scoreboard objectives remove iron_shovel +scoreboard objectives remove stone_pickaxe +scoreboard objectives remove stone_axe +scoreboard objectives remove stone_shovel +#### +#移除统计项目# +scoreboard objectives remove totalDug +scoreboard objectives remove totalKilled +scoreboard objectives remove totalDeath +scoreboard objectives remove totalTraded +scoreboard objectives remove totalFished +scoreboard objectives remove totalHurt +#### +#移除队伍# +team remove displayScoresOff +team remove displayScoresOn +team remove killCounter +team remove digCounter +team remove deathCounter +team remove tradingCounter +team remove fishingCounter +team remove damageTaken +#### +#移除开关# +scoreboard objectives remove scoreswitch +#### +#询问是否移除记分板# +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}] +#### \ No newline at end of file diff --git a/data/fz/functions/sleep/install.mcfunction b/data/fz/functions/sleep/install.mcfunction new file mode 100644 index 0000000..5e67813 --- /dev/null +++ b/data/fz/functions/sleep/install.mcfunction @@ -0,0 +1 @@ +scoreboard objectives add sleeper minecraft.custom:minecraft.sleep_in_bed \ No newline at end of file diff --git a/data/fz/functions/sleep/main.mcfunction b/data/fz/functions/sleep/main.mcfunction new file mode 100644 index 0000000..bc3935c --- /dev/null +++ b/data/fz/functions/sleep/main.mcfunction @@ -0,0 +1,2 @@ +execute if entity @a[scores= {sleeper=1..}] run tellraw @a [{"selector":"@a[scores={sleeper=1..}]","color":"green"},{"text":"在休息了噢,如要跳过夜晚,请在聊天栏说明噢,","bold":"true","color":"red"},{"text":"QwQ","color":"red"}] +scoreboard players set @a sleeper 0 \ No newline at end of file diff --git a/data/fz/functions/sleep/uninstall.mcfunction b/data/fz/functions/sleep/uninstall.mcfunction new file mode 100644 index 0000000..a113215 --- /dev/null +++ b/data/fz/functions/sleep/uninstall.mcfunction @@ -0,0 +1 @@ +scoreboard objectives remove sleeper \ No newline at end of file diff --git a/data/fz/functions/uninstall.mcfunction b/data/fz/functions/uninstall.mcfunction new file mode 100644 index 0000000..0147624 --- /dev/null +++ b/data/fz/functions/uninstall.mcfunction @@ -0,0 +1,8 @@ +scoreboard objectives remove timeCounter +scoreboard objectives remove 20 +function fz:health/uninstall +function fz:sleep/uninstall +function fz:cleaner/uninstall +function fz:logintips/uninstall +function fz:score/uninstall +tellraw @a {"text":"FZ'sDataPack卸载成功!","color":"dark_green"} \ No newline at end of file diff --git a/data/minecraft/tags/functions/load.json b/data/minecraft/tags/functions/load.json new file mode 100644 index 0000000..cde7c9a --- /dev/null +++ b/data/minecraft/tags/functions/load.json @@ -0,0 +1,5 @@ +{ + "values": [ + "fz:install" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/functions/tick.json b/data/minecraft/tags/functions/tick.json new file mode 100644 index 0000000..007e0c6 --- /dev/null +++ b/data/minecraft/tags/functions/tick.json @@ -0,0 +1,8 @@ +{ + "values": [ + "fz:score/main", + "fz:sleep/main", + "fz:cleaner/trigger", + "fz:logintips/main" + ] +} \ No newline at end of file diff --git a/pack.mcmeta b/pack.mcmeta new file mode 100644 index 0000000..e3396b0 --- /dev/null +++ b/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "FZ's datapack - codeByHarvey_kang", + "pack_format": 4 + } +} \ No newline at end of file