标签游戏(兼容 Vanilla Tweaks)
像在 Hermitcraft 中一样玩捉人游戏! 由一名玩家作为“抓人者”开始, 目标是将另一名玩家变成新的抓人者。 他们只需要用带有标签的拳套击中另一名玩家即可。 这个标签是一个自定义名称牌,名为 "Tag!"
其他玩家可以识别抓人者, 因为他们的名字会显示为红色。
此数据包包含配置选项,可以设置抓人者在再次标记其他玩家之前的冷却时间 (默认值为 1 分钟),以及禁用玩家被标记时的公告消息。
兼容 Vanilla Tweaks
在 Vanilla Tweaks 宣布不再支持此数据包后, 我创建了此版本作为延续。 代码完全由我编写, 但设置保留了相同的数据和大部分相同的函数名。
如果您之前使用过 Vanilla Tweaks 的标签数据包, 只需改用此数据包即可更新。 当您首次使用此数据包打开世界时, 您的设置将被迁移到此数据包中, 并删除旧的未使用数据。
与 Vanilla Tweaks 版本一样, 如果玩家被 Vanilla Tweaks AFK Display 数据包标记为挂机状态, 此数据包也不会允许玩家标记挂机玩家。
兼容 Detect AFK Players 数据包
此数据包将不允许玩家标记来自 Detect AFK Players 数据包的挂机玩家。 它应将这些玩家视为与由 Vanilla Tweaks AFK Display 数据包标记为挂机的玩家相同。
使用指南
要将某人添加到抓人者的队伍并给予他们标签,
管理员可以使用命令 /execute as <playername> run function tag:become_tagger
要使某人不再是抓人者(并移除其标签),
管理员可以使用命令 /execute as <playername> run function tag:become_normal
管理员可以随时使用命令 function tag:spawn_tag 创建新标签
只要玩家是抓人者,他们的名字就会显示为红色。 这仅在玩家不属于其他队伍时有效。 每 5 秒,游戏会将所有不在队伍中的抓人者的红色名字恢复。
此数据包会记录每个玩家被标记的次数。
管理员可以使用命令
/scoreboard objectives setdisplay below_name tg_timesTagged
在玩家名字下方显示该次数。
要在多人游戏菜单标签页中显示被标记次数,
请使用命令 /scoreboard objectives setdisplay list tg_timesTagged
这些显示分别可以通过使用命令
/scoreboard objectives setdisplay below_name 和
/scoreboard objectives setdisplay list 来隐藏。
任何玩家都可以使用命令查看配置设置,
/trigger tg_help
这将显示一个包含当前冷却时间(以刻、秒和分钟显示)的菜单,
并提供更改冷却时间和启用/禁用标签公告的选项。
只有管理员才能实际更改这些设置。
要移除冷却时间,管理员可以打开帮助菜单, 选择更改冷却时间,并将其设置为 0 刻、秒或分钟。
尝试在菜单中更改冷却时间会将一条命令复制到管理员的聊天栏。
例如,如果管理员点击“SECONDS”,他们将拥有命令
/function tag:update_cooldown {conversion:20,cooldown:#seconds_here#}
要关闭冷却时间,管理员可以将 #seconds_here# 替换为 0:
/function tag:update_cooldown {conversion:20,cooldown:0}
如果要设置 30 秒的冷却时间,则将其更改为 30:
/function tag:update_cooldown {conversion:20,cooldown:30}
与 Vanilla Tweaks 的差异
Vanilla Tweaks 列出停止支持此数据包的主要原因之一是代码存在许多错误。 由于我是从头开始编写代码, 我决定也更改一些我认为原版数据包存在的问题。
- 抓人者受到荆棘伤害不会标记自己
- 如果有多个抓人者,他们各自拥有独立的冷却时间
- 标签仅从标记了其他玩家的抓人者身上移除, 而不是从任何其他抓人者身上移除
- 只有管理员才能更改冷却时间和标签公告的设置
- 当抓人者仍处于冷却时间内时,尝试标记玩家将会 向抓人者显示剩余的冷却时间
- 抓人者不能通过切换/移除其队伍变为普通玩家
- 相反,管理员必须调用
/execute as <player> run function tag:become_normal
- 相反,管理员必须调用
问题
请在 GitHub 仓库中报告任何问题或变更请求
许可证
此数据包及其文件均在 GPLv3 许可下提供。您可以自由下载、编辑和分享此代码,但您必须向与您分享此数据包的人提供相同的权利。
Tag game (compatible with Vanilla Tweaks)
Play tag like on Hermitcraft! Someone starts as the tagger, with the goal of making another player the tagger instead. All they have to do is punch another player with the tag. The tag is a custom name tag named "Tag!"
Other players can recognize taggers because they will have a red name.
This pack includes configuration options to set a cooldown before the tagger can tag another player (default is 1 minute) and to disable announcement messages when players get tagged.
Vanilla Tweaks Compatible
After Vanilla Tweaks announced they were no longer supporting this pack, I created this version as a continuation. The code is entirely mine, but it is setup to keep the same data and most of the same function names.
If you previously used the Vanilla Tweaks tag datapack, you can update by simply using this pack instead. When you first open the world with this datapack, your settings will be ported over to this datapack and old unused data will be deleted.
Just like the Vanilla Tweaks version, this pack also doesn't allow players to tag AFK players, if a player is marked AFK by the Vanilla Tweaks AFK Display pack.
Detect AFK Players Compatible
This pack will not allow players to tag AFK players from the Detect AFK Players datapack. It should treat these players the same it treats players marked AFK by the Vanilla Tweaks AFK Display datapack.
Usage Guide
To add someone to the tagger's team and give them a tag,
an admin can use the command /execute as <playername> run function tag:become_tagger
To make someone no longer a tagger (and take away their tag),
an admin can use the command /execute as <playername> run function tag:become_normal
An admin can create a new tag at anytime by using the command function tag:spawn_tag
As long as a player is a tagger, they will have a red name. This only works if the player isn't on another team. Every 5 seconds, the game will give all taggers who aren't on a team back their red name.
The pack keeps track of how many times each player has been tagged.
An admin can display it under player names with the command
/scoreboard objectives setdisplay below_name tg_timesTagged
To display times tagged in the multiplayer tab menu,
use the command /scoreboard objectives setdisplay list tg_timesTagged
These displays can each be hidden by using the commands
/scoreboard objectives setdisplay below_name and
/scoreboard objectives setdisplay below_name respectively.
Any player can see the configuration settings by using the command,
/trigger tg_help
This will show a menu with the current cooldown (shown in ticks, seconds, and minutes)
and give options to change the cooldown and enable/disable tag announcements.
Only an admin can actually change these settings.
To remove the cooldown, an admin can open the help menu, choose to change the cooldown, and set it to 0 ticks, seconds, or minutes.
Trying to change the cooldown in the menu will copy a command to the admin's chat.
For example, if the admin clicks "SECONDS", they will have the command
/function tag:update_cooldown {conversion:20,cooldown:#seconds_here#}
To turn off the cooldown, the admin could replace #seconds_here# with 0:
/function tag:update_cooldown {conversion:20,cooldown:0}
To instead set a cooldown of 30 seconds, they would change it to 30:
/function tag:update_cooldown {conversion:20,cooldown:30}
Changes from Vanilla Tweaks
One of the main reasons the Vanilla Tweaks listed for discontinuing this pack was how buggy the code was. Since I was writing the code from scratch, I decided to also change some things I felt were issues with the original pack.
- A tagger taking thorns damage doesn't tag themself
- If there are multiple taggers, they each have their own cooldown
- Tags are only removed from the tagger who tagged another player, not from any other taggers
- Only the admin can change settings for the cooldown and tag announcements
- When a tagger is still under cooldown, attempting to tag a player will show the tagger how long they have left on their cooldown
- A tagger cannot become a normal player by swapping/removing their team
- Instead, an admin must call
/execute as <player> run function tag:become_normal
- Instead, an admin must call
Issues
Please report any issues or change requests on the GitHub repository
License
This datapack and its files are made available under a GPLv3 license. You can freely download, edit, and share this code, but you must provide the same rights to those you share this datapack with.
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
下载 Tag Game
更新 26.3 的标签游戏功能
从 26.3 快照 3 开始,此版本为必需版本,并且向后兼容。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
粉色方块中的千种可能!
数据包
我的“NRG”整合包的核心数据包。这个整合包的主要更新就在这里。
数据包
原版多人标签游戏
数据包
添加战斗塔(开发中)
数据包
这是《Minecraft》的一款模组,旨在将游戏体验转变为更接近现实生活的样子。它包含了诸如需求管理(饥饿、健康、能量)、经济系统、工作以及与其他玩家互动的功能。
数据包
使玩家无法将盔甲放置在盔甲架上。
评论 0
登录后参与评分
还没有评论,来抢沙发吧