Add files via upload
This commit is contained in:
commit
9085a7c974
44
README.txt
Normal file
44
README.txt
Normal file
@ -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栏和头顶的血量显示
|
||||
-增加记分版:挖掘量、造成伤害量、死亡次数、钓鱼次数、交易次数,以及记分版开关
|
4
data/fz/functions/cleaner/cleaneroff.mcfunction
Normal file
4
data/fz/functions/cleaner/cleaneroff.mcfunction
Normal file
@ -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
|
6
data/fz/functions/cleaner/cleaneron.mcfunction
Normal file
6
data/fz/functions/cleaner/cleaneron.mcfunction
Normal file
@ -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
|
5
data/fz/functions/cleaner/install.mcfunction
Normal file
5
data/fz/functions/cleaner/install.mcfunction
Normal file
@ -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
|
13
data/fz/functions/cleaner/main.mcfunction
Normal file
13
data/fz/functions/cleaner/main.mcfunction
Normal file
@ -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
|
4
data/fz/functions/cleaner/subclean.mcfunction
Normal file
4
data/fz/functions/cleaner/subclean.mcfunction
Normal file
@ -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
|
7
data/fz/functions/cleaner/trigger.mcfunction
Normal file
7
data/fz/functions/cleaner/trigger.mcfunction
Normal file
@ -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
|
5
data/fz/functions/cleaner/uninstall.mcfunction
Normal file
5
data/fz/functions/cleaner/uninstall.mcfunction
Normal file
@ -0,0 +1,5 @@
|
||||
scoreboard objectives remove cleaner
|
||||
scoreboard objectives remove cleaned
|
||||
scoreboard objectives remove cleanerBooleans
|
||||
scoreboard objectives remove setCleanTime
|
||||
scoreboard objectives remove displayCleanTime
|
4
data/fz/functions/health/install.mcfunction
Normal file
4
data/fz/functions/health/install.mcfunction
Normal file
@ -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
|
1
data/fz/functions/health/uninstall.mcfunction
Normal file
1
data/fz/functions/health/uninstall.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives remove health
|
9
data/fz/functions/install.mcfunction
Normal file
9
data/fz/functions/install.mcfunction
Normal file
@ -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"}]
|
1
data/fz/functions/logintips/install.mcfunction
Normal file
1
data/fz/functions/logintips/install.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives add leaveGame minecraft.custom:minecraft.leave_game
|
3
data/fz/functions/logintips/main.mcfunction
Normal file
3
data/fz/functions/logintips/main.mcfunction
Normal file
@ -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
|
1
data/fz/functions/logintips/uninstall.mcfunction
Normal file
1
data/fz/functions/logintips/uninstall.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives remove leaveGame
|
17
data/fz/functions/score/delscores.mcfunction
Normal file
17
data/fz/functions/score/delscores.mcfunction
Normal file
@ -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":"记分板已移除"}]
|
||||
####
|
81
data/fz/functions/score/install.mcfunction
Normal file
81
data/fz/functions/score/install.mcfunction
Normal file
@ -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
|
||||
####
|
68
data/fz/functions/score/main.mcfunction
Normal file
68
data/fz/functions/score/main.mcfunction
Normal file
@ -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
|
||||
####
|
3
data/fz/functions/score/teams/damagetaken.mcfunction
Normal file
3
data/fz/functions/score/teams/damagetaken.mcfunction
Normal file
@ -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
|
3
data/fz/functions/score/teams/deathcounter.mcfunction
Normal file
3
data/fz/functions/score/teams/deathcounter.mcfunction
Normal file
@ -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
|
3
data/fz/functions/score/teams/digcounter.mcfunction
Normal file
3
data/fz/functions/score/teams/digcounter.mcfunction
Normal file
@ -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
|
@ -0,0 +1,2 @@
|
||||
tellraw @a[scores={scoreswitch=..-1},team=!displayScoresOff] [{"text":"您已退订记分板"}]
|
||||
team join displayScoresOff @a[scores={scoreswitch=..-1},team=!displayScoresOff]
|
2
data/fz/functions/score/teams/displayscoreson.mcfunction
Normal file
2
data/fz/functions/score/teams/displayscoreson.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
tellraw @a[scores={scoreswitch=1},team=!displayScoresOn] [{"text":"正在循环播放记分板"}]
|
||||
team join displayScoresOn @a[scores={scoreswitch=1},team=!displayScoresOn]
|
3
data/fz/functions/score/teams/fishingcounter.mcfunction
Normal file
3
data/fz/functions/score/teams/fishingcounter.mcfunction
Normal file
@ -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
|
3
data/fz/functions/score/teams/killcounter.mcfunction
Normal file
3
data/fz/functions/score/teams/killcounter.mcfunction
Normal file
@ -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
|
3
data/fz/functions/score/teams/totallist.mcfunction
Normal file
3
data/fz/functions/score/teams/totallist.mcfunction
Normal file
@ -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
|
3
data/fz/functions/score/teams/tradingcounter.mcfunction
Normal file
3
data/fz/functions/score/teams/tradingcounter.mcfunction
Normal file
@ -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
|
2
data/fz/functions/score/tools/diamond_axe.mcfunction
Normal file
2
data/fz/functions/score/tools/diamond_axe.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s diamond_axe
|
||||
scoreboard players reset @s diamond_axe
|
2
data/fz/functions/score/tools/diamond_pickaxe.mcfunction
Normal file
2
data/fz/functions/score/tools/diamond_pickaxe.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s diamond_pickaxe
|
||||
scoreboard players reset @s diamond_pickaxe
|
2
data/fz/functions/score/tools/diamond_shovel.mcfunction
Normal file
2
data/fz/functions/score/tools/diamond_shovel.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s diamond_shovel
|
||||
scoreboard players reset @s diamond_shovel
|
2
data/fz/functions/score/tools/iron_axe.mcfunction
Normal file
2
data/fz/functions/score/tools/iron_axe.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s iron_axe
|
||||
scoreboard players reset @s iron_axe
|
2
data/fz/functions/score/tools/iron_pickaxe.mcfunction
Normal file
2
data/fz/functions/score/tools/iron_pickaxe.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s iron_pickaxe
|
||||
scoreboard players reset @s iron_pickaxe
|
2
data/fz/functions/score/tools/iron_shovel.mcfunction
Normal file
2
data/fz/functions/score/tools/iron_shovel.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s iron_shovel
|
||||
scoreboard players reset @s iron_shovel
|
2
data/fz/functions/score/tools/stone_axe.mcfunction
Normal file
2
data/fz/functions/score/tools/stone_axe.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s stone_axe
|
||||
scoreboard players reset @s stone_axe
|
2
data/fz/functions/score/tools/stone_pickaxe.mcfunction
Normal file
2
data/fz/functions/score/tools/stone_pickaxe.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s stone_pickaxe
|
||||
scoreboard players reset @s stone_pickaxe
|
2
data/fz/functions/score/tools/stone_shovel.mcfunction
Normal file
2
data/fz/functions/score/tools/stone_shovel.mcfunction
Normal file
@ -0,0 +1,2 @@
|
||||
scoreboard players operation @s digCounter += @s stone_shovel
|
||||
scoreboard players reset @s stone_shovel
|
@ -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
|
6
data/fz/functions/score/totalcalculator/tdigc.mcfunction
Normal file
6
data/fz/functions/score/totalcalculator/tdigc.mcfunction
Normal file
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset totalHurt damageTaken
|
||||
scoreboard players reset totalHurt totalHurt
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset totalDeath deathCounter
|
||||
scoreboard players reset totalDeath totalDeath
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset totalDug digCounter
|
||||
scoreboard players reset totalDug totalDug
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset totalFished fishingCounter
|
||||
scoreboard players reset totalFished totalFished
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset totalKilled killCounter
|
||||
scoreboard players reset totalKilled totalKilled
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset totalTraded tradingCounter
|
||||
scoreboard players reset totalTraded totalTraded
|
44
data/fz/functions/score/uninstall.mcfunction
Normal file
44
data/fz/functions/score/uninstall.mcfunction
Normal file
@ -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}]
|
||||
####
|
1
data/fz/functions/sleep/install.mcfunction
Normal file
1
data/fz/functions/sleep/install.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives add sleeper minecraft.custom:minecraft.sleep_in_bed
|
2
data/fz/functions/sleep/main.mcfunction
Normal file
2
data/fz/functions/sleep/main.mcfunction
Normal file
@ -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
|
1
data/fz/functions/sleep/uninstall.mcfunction
Normal file
1
data/fz/functions/sleep/uninstall.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives remove sleeper
|
8
data/fz/functions/uninstall.mcfunction
Normal file
8
data/fz/functions/uninstall.mcfunction
Normal file
@ -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"}
|
5
data/minecraft/tags/functions/load.json
Normal file
5
data/minecraft/tags/functions/load.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"fz:install"
|
||||
]
|
||||
}
|
8
data/minecraft/tags/functions/tick.json
Normal file
8
data/minecraft/tags/functions/tick.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"fz:score/main",
|
||||
"fz:sleep/main",
|
||||
"fz:cleaner/trigger",
|
||||
"fz:logintips/main"
|
||||
]
|
||||
}
|
6
pack.mcmeta
Normal file
6
pack.mcmeta
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "FZ's datapack - codeByHarvey_kang",
|
||||
"pack_format": 4
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user