This commit is contained in:
Harveykang 2020-12-28 11:10:15 +08:00
parent f12afa1972
commit 9ace8501f2
9 changed files with 101 additions and 43 deletions

View File

@ -5,37 +5,61 @@ A Minecraft Datapack
#### This project is licensed under the terms of the GNU General Public License v3.0. #### This project is licensed under the terms of the GNU General Public License v3.0.
#### Copyright (C)2019-2020 Harvey.Kang #### Copyright (C)2019-2020 Harvey.Kang
#### v2.0.0 ### v2.0.0
- 重写
- 支持Minecraft1.16.x - 支持Minecraft1.16.x
- 抬头并按一下shift来打开设置界面 - 抬头并按一下shift来打开设置界面
- 压缩包中的tagplayer.sc - 提供一些地毯脚本:
- 把它放在“存档名/scripts”中然后“/script load tagplayer” - 安装方法:
- 使用/tagplayer 命令生成假人可以避免假人被数据包提供的记分板捕捉到~ - 需要carpet mod 1.4.21https://github.com/gnembon/fabric-carpet/releases
- tagplayer需要地毯mod1.4.21或以上版本来运行 - 将其放入“world/scripts”中(在客户端位于“.minecraft/saves/存档名/scripts”或“.minecraft/config/carpet/scripts”)
- 使用帮助可以在游戏中输入“/tagplayer”查看 - 这三个文件夹默认不会自动生成,直接新建即可
- 压缩包中的restore_scores.sc工具可以恢复或从1.0版本升级记分板~ - here.sc
- 把它放在“存档名/scripts”中然后“/script load restore_scores” - “/here”向所有人发送自己的位置和所在维度
- *该工具会先删除旧的记分板* - 发送的消息使用voxelmap可识别的数组格式
- 输入“/restore_scores by_whitelist”恢复白名单内的玩家的记分板 - 安装voxelmap mod后左键高亮该坐标ctrl+左键新建坐标点
- *用完记得删除它并“/script unload restore_scores”* - c.sc
- restore_scores需要地毯mod1.4.13或以上版本来运行 - “/c”修改玩家模式为旁观模式
##### - v2.0.0.8(计划) - s.sc
- 添加单独的记分板升级工具 - “/s”修改玩家模式为生存模式
##### - v2.0.0.7 - tagplayer.sc
- tagplayer添加了新版carpet新指令可以为假人切换热键栏 - 这个工具可以防止将地毯mod生成的假人计入记分板
- 现在tagplayer需要carpet1.4.21或以上版本运行! - 使用方法:
- 现在tagplayer可以给自己设置动作了 - 输入“/scripts load tagplayer”加载工具
- 添加“/tagplayer shadow”指令将自己变为前缀为“挂机”的假人 - 包含全部地毯假人自带的功能,以及新功能,如:
##### - v2.0.0.6 - “/tagplayer check xxx”检查玩家的状态
- 修复restore_scores.sc工具不能恢复受伤害榜(抖M榜)的bug - “/tagplayer checkall”检查所有玩家的状态
##### - v2.0.0.5 - “/tagplayer killall”清除所有假人
- 修复挖掘榜部分工具不起作用的bug - 其他用法可以在游戏内输入“/tagplayer”查看
- 添加restore_scores.sc工具便于恢复或从1.0版本升级记分板 - restore_scores.sc
##### - v2.0.0.4 - 从数据包1.4升级时也需要使用这个工具
- 添加彩色字体 - 这个工具可以从白名单读取玩家列表,逐一召唤假人,读取统计信息并赋值给记分板
##### - v2.0.0.3 - 悄悄说一句没白名单的服把usercache.json复制一份改成whitelist.json就可以啦
- tagplayer需要地毯mod1.4.18或以上版本来运行 - 注意:原有的记分板会被删除
- 优化了tagplayer体验及修复若干bug - 使用方法:
##### - v2.0.0.2 - 输入“/scripts load restore_scores”加载工具
- 重写 - 输入“/restore_scores by_whitelist”开始恢复
- 输入“/scripts unload restore_scores”卸载工具
- 记得用完就删掉它!
##### v2.0.0.10(计划)
- 添加单独的记分板升级工具
##### v2.0.0.9
- 修复矿车白名单状态反了的bug
##### v2.0.0.8
- 添加c.sc、s.sc、here.sc工具
##### v2.0.0.7
- tagplayer添加了新版carpet新指令可以为假人切换热键栏
- 现在tagplayer需要carpet1.4.21或以上版本运行!
- 现在tagplayer可以给自己设置动作了
- 添加“/tagplayer shadow”指令将自己变为前缀为“挂机”的假人
##### v2.0.0.6
- 修复restore_scores.sc工具不能恢复受伤害榜(抖M榜)的bug
##### v2.0.0.5
- 修复挖掘榜部分工具不起作用的bug
- 添加restore_scores.sc工具便于恢复或从1.0版本升级记分板
##### v2.0.0.4
- 添加彩色字体
##### v2.0.0.3
- tagplayer需要地毯mod1.4.18或以上版本来运行
- 优化了tagplayer体验及修复若干bug
##### v2.0.0.2
- 重写

7
c.sc Normal file
View File

@ -0,0 +1,7 @@
__config() -> {
'stay_loaded' -> true
};
__command() -> (
run('gamemode spectator');
run('execute at @s run tp @s ~ ~0.2 ~')
)

View File

@ -5,9 +5,9 @@ execute if data storage fz.installed {sweeper:1b} run tellraw @s {"text": "扫
##扫地机时间对应分数1478966210-1478966215 ##扫地机时间对应分数1478966210-1478966215
execute if data storage fz.installed {sweeper:1b} run tellraw @s [{"text": "- "},{"text": "[关]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966210"}},{"text": "[30秒]","color": "#5fff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966211"}},{"text": "[1分钟]","color": "#d7ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966212"}},{"text": "[2分钟]","color": "#ffd900","clickEvent": {"action": "run_command","value": "/trigger config set 1478966213"}},{"text": "[3分钟]","color": "#ff6100","clickEvent": {"action": "run_command","value": "/trigger config set 1478966214"}},{"text": "[4分钟]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966215"}}] execute if data storage fz.installed {sweeper:1b} run tellraw @s [{"text": "- "},{"text": "[关]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966210"}},{"text": "[30秒]","color": "#5fff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966211"}},{"text": "[1分钟]","color": "#d7ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966212"}},{"text": "[2分钟]","color": "#ffd900","clickEvent": {"action": "run_command","value": "/trigger config set 1478966213"}},{"text": "[3分钟]","color": "#ff6100","clickEvent": {"action": "run_command","value": "/trigger config set 1478966214"}},{"text": "[4分钟]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966215"}}]
##开启矿车白名单1478966216 ##开启矿车白名单1478966216
execute if data storage fz.installed {sweeper:1b} unless score sweepMinecart parameter matches 1 run tellraw @s [{"text": "- "},{"text": "矿车白名单:","color": "#8c8f91"},{"text": "[已关闭]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966216"}}] execute if data storage fz.installed {sweeper:1b} unless score keepMinecart parameter matches 1 run tellraw @s [{"text": "- "},{"text": "矿车白名单:","color": "#8c8f91"},{"text": "[已关闭]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966216"}}]
##关闭矿车白名单1478966217 ##关闭矿车白名单1478966217
execute if data storage fz.installed {sweeper:1b} if score sweepMinecart parameter matches 1 run tellraw @s [{"text": "- "},{"text": "矿车白名单:","color": "#8c8f91"},{"text": "[已开启]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966217"}}] execute if data storage fz.installed {sweeper:1b} if score keepMinecart parameter matches 1 run tellraw @s [{"text": "- "},{"text": "矿车白名单:","color": "#8c8f91"},{"text": "[已开启]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966217"}}]
execute if data storage fz.installed {scoreboards:1b} run tellraw @s {"text": "记分板:","color": "#ccff00"} execute if data storage fz.installed {scoreboards:1b} run tellraw @s {"text": "记分板:","color": "#ccff00"}
##计分板显示对应分数1838019370-1838019379 ##计分板显示对应分数1838019370-1838019379
execute if data storage fz.installed {scoreboards:1b} run tellraw @s [{"text": "- "},{"text": "[关]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1838019370"}},{"text": "[轮播]","color": "gold","clickEvent": {"action": "run_command","value": "/trigger config set 1838019371"}},{"text": "[总量]","color": "dark_aqua","clickEvent": {"action": "run_command","value": "/trigger config set 1838019379"}},{"text": "[在线时间(h)]","color": "aqua","clickEvent": {"action": "run_command","value": "/trigger config set 1838019372"}},{"text": "[抖M名单]","color": "yellow","clickEvent": {"action": "run_command","value": "/trigger config set 1838019373"}},{"text": "[死亡榜]","color": "dark_red","clickEvent": {"action": "run_command","value": "/trigger config set 1838019374"}},{"text": "[挖掘榜]","color": "gray","clickEvent": {"action": "run_command","value": "/trigger config set 1838019375"}},{"text": "[钩直饵咸]","color": "blue","clickEvent": {"action": "run_command","value": "/trigger config set 1838019376"}},{"text": "[击杀榜]","color": "red","clickEvent": {"action": "run_command","value": "/trigger config set 1838019377"}},{"text": "[交♂易榜]","color": "green","clickEvent": {"action": "run_command","value": "/trigger config set 1838019378"}}] execute if data storage fz.installed {scoreboards:1b} run tellraw @s [{"text": "- "},{"text": "[关]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1838019370"}},{"text": "[轮播]","color": "gold","clickEvent": {"action": "run_command","value": "/trigger config set 1838019371"}},{"text": "[总量]","color": "dark_aqua","clickEvent": {"action": "run_command","value": "/trigger config set 1838019379"}},{"text": "[在线时间(h)]","color": "aqua","clickEvent": {"action": "run_command","value": "/trigger config set 1838019372"}},{"text": "[抖M名单]","color": "yellow","clickEvent": {"action": "run_command","value": "/trigger config set 1838019373"}},{"text": "[死亡榜]","color": "dark_red","clickEvent": {"action": "run_command","value": "/trigger config set 1838019374"}},{"text": "[挖掘榜]","color": "gray","clickEvent": {"action": "run_command","value": "/trigger config set 1838019375"}},{"text": "[钩直饵咸]","color": "blue","clickEvent": {"action": "run_command","value": "/trigger config set 1838019376"}},{"text": "[击杀榜]","color": "red","clickEvent": {"action": "run_command","value": "/trigger config set 1838019377"}},{"text": "[交♂易榜]","color": "green","clickEvent": {"action": "run_command","value": "/trigger config set 1838019378"}}]

View File

@ -16,9 +16,9 @@ function fz:login/logintips/install
function fz:carpet/carpet function fz:carpet/carpet
#版本信息 #版本信息
data merge storage fz.installed {installed:1b} data merge storage fz.installed {installed:1b}
data merge storage fz {version:Beta-2.0.0.7} data merge storage fz {version:Beta-2.0.0.9}
data merge storage fz {date:2020-12.15} data merge storage fz {date:2020-12.27}
data merge storage fz {time:"19:32"} data merge storage fz {time:"23:32"}
data merge storage fz {snapshot:-SNAPSHOT} data merge storage fz {snapshot:-SNAPSHOT}
##data remove storage fz snapshot ##data remove storage fz snapshot
tellraw @a {"text": "[信息]启动完毕","color": "#5fff00"} tellraw @a {"text": "[信息]启动完毕","color": "#5fff00"}

View File

@ -1,8 +1,8 @@
#如果未安装且未卸载则安装 #如果未安装且未卸载则安装
execute unless data storage fz.installed {installed:1b} unless data storage fz.installed {installed:0b} run function fz:install execute unless data storage fz.installed {installed:1b} unless data storage fz.installed {installed:0b} run function fz:install
#如果版本正确且已安装则开始运行 #如果版本正确且已安装则开始运行
execute if data storage fz {version:Beta-2.0.0.7} if data storage fz.installed {installed:1b} run function fz:start execute if data storage fz {version:Beta-2.0.0.9} if data storage fz.installed {installed:1b} run function fz:start
#如果版本不符则更新 #如果版本不符则更新
execute unless data storage fz {version:Beta-2.0.0.7} run function fz:update execute unless data storage fz {version:Beta-2.0.0.9} run function fz:update
#输出版本信息 #输出版本信息
tellraw @a [{"text": "[版本信息]FZ's Datapack-","color": "#ffd900"},{"nbt":"version","storage":"fz","color": "#ffd900"},{"nbt": "snapshot", "storage": "fz","color": "red"}] tellraw @a [{"text": "[版本信息]FZ's Datapack-","color": "#ffd900"},{"nbt":"version","storage":"fz","color": "#ffd900"},{"nbt": "snapshot", "storage": "fz","color": "red"}]

View File

@ -1,4 +1,4 @@
execute if score @s config matches 1478966216 run scoreboard players set sweepMinecart parameter 1 execute if score @s config matches 1478966216 run scoreboard players set keepMinecart parameter 1
execute if score @s config matches 1478966217 run scoreboard players reset sweepMinecart parameter execute if score @s config matches 1478966217 run scoreboard players reset keepMinecart parameter
scoreboard players reset @s config scoreboard players reset @s config
function fz:config/display function fz:config/display

View File

@ -1,5 +1,5 @@
execute if score sweepMinecart parameter matches 1 run execute store result score sweeperItem parameter run kill @e[type=item] execute if score keepMinecart parameter matches 1 run execute store result score sweeperItem parameter run kill @e[type=item,predicate=!fz:sweeper/minecart]
execute unless score sweepMinecart parameter matches 1 run execute store result score sweeperItem parameter run kill @e[type=item,predicate=!fz:sweeper/minecart] execute unless score keepMinecart parameter matches 1 run execute store result score sweeperItem parameter run kill @e[type=item]
tellraw @a [{"text": "[信息]本次清理了","color": "#5fff00"},{"score": {"objective": "parameter", "name": "sweeperItem"},"color": "#5fff00"},{"text": "堆物品","color": "#5fff00"}] tellraw @a [{"text": "[信息]本次清理了","color": "#5fff00"},{"score": {"objective": "parameter", "name": "sweeperItem"},"color": "#5fff00"},{"text": "堆物品","color": "#5fff00"}]
execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2 execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2
execute if score sweeperTime parameter matches 30 run function fz:sweeper/timer/30s execute if score sweeperTime parameter matches 30 run function fz:sweeper/timer/30s

21
here.sc Normal file
View File

@ -0,0 +1,21 @@
__config() -> {
'stay_loaded' -> true
};
__command() -> (
s_player = player();
pos = query(s_player, 'pos');
dim = query(s_player, 'dimension');
scoreboard_add('here_pos_x');
scoreboard_add('here_pos_y');
scoreboard_add('here_pos_z');
scoreboard('here_pos_x',s_player,round(get(pos, 0)));
scoreboard('here_pos_y',s_player,round(get(pos, 1)));
scoreboard('here_pos_z',s_player,round(get(pos, 2)));
run(str('tellraw @s [{"selector": "@s"},{"text":"说:我在[x:","color": "aqua"},{"score": {"objective": "here_pos_x","name": "%s"}},{"text": ", y:"},{"score": {"objective": "here_pos_y","name": "%s"}},{"text": ", z:"},{"score": {"objective": "here_pos_z","name": "%s"}},{"text": ", dim:%s]"}]',
s_player, s_player, s_player, dim
));
scoreboard_remove('here_pos_x');
scoreboard_remove('here_pos_y');
scoreboard_remove('here_pos_z');
exit()
)

6
s.sc Normal file
View File

@ -0,0 +1,6 @@
__config() -> {
'stay_loaded' -> true
};
__command() -> (
run('gamemode survival')
)