Team Auras
一个 Minecraft 数据包,允许你创建基于团队的光环头盔。佩戴光环头盔的玩家会为自己和附近的队友提供可配置的生命药水效果。
功能
- 支持 8 个可配置的团队(
team1 到 team8)
- 将任何可穿戴的头盔物品转化为光环头盔
- 可配置自身和附近队友的生命药水效果
- 可配置光环半径和效果增幅器
- 兼容原版团队的自定义设置
- 简单的设置函数,用于创建团队并分配光环头盔
- 兼容 Minecraft 1.20.1 以及从 1.21.11 到 26.3
安装
- 下载最新版本。
- 将数据包放入世界的
datapacks 文件夹中。
- 运行:
/reload
设置
创建默认团队:
/function team_auras:setup/create_teams
要将主手中的物品变为团队 1 的光环头盔:
/function team_auras:item_apply/team1
将 team1 替换为 team1 到 team8 之间的任意团队名称。
注意: 光环物品仅在装备于头盔栏位时才会提供效果。/function team_auras:apply/teamX 函数仅将光环分配给手持物品。如果该物品原本不可作为头盔佩戴,它们不会使其变为可穿戴的头盔。
如果你想使用通常不可作为头盔佩戴的物品,可以使用 Minecraft 的 /give 命令配合 equippable 物品组件,使其可以在头盔栏位中佩戴。这是原版的特性。
团队自定义
数据包创建了默认团队(team1 到 team8)。
你可以使用原版 Minecraft 的 team modify 命令自由自定义这些团队,包括:
- 显示名称
- 前缀
- 后缀
- 团队颜色
- 友军伤害
- 碰撞规则
- 名字标签可见性
- 死亡消息可见性
- 任何其他支持的
team modify 选项
例如:
team modify team1 displayName {"text":"Red Team","color":"red","bold":true}
team modify team1 prefix {"text":"[RED] ","color":"red"}
team modify team1 color red
这些自定义不会影响光环系统。只要玩家保持在正确的团队(team1 到 team8),数据包将继续正常运行。
配置
每个团队的光环配置在其对应的函数文件中:
data/team_auras/function/team1.mcfunction
...
data/team_auras/function/team8.mcfunction
默认情况下,每个光环提供:
- 自身: 发光 I
- 附近队友(10 格半径): 抗性提升 I
每个团队的函数包含两条命令:
- 一条将效果施加给佩戴者。
- 一条将效果施加给附近的队友。
例如:
# 自身效果
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] run effect give @s minecraft:glowing 2 0 true
# 附近队友
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] at @s run effect give @a[team=team1,gamemode=!spectator,distance=..10] minecraft:resistance 2 0 true
你可以自定义:
- 生命药水效果
- 效果持续时间
- 效果增幅器(
0 = I 级, 1 = II 级, 以此类推)
- 光环半径(
distance=..10, distance=..20, 以此类推)
例如,要使团队 1 向佩戴者提供 速度 II,并向 20 格内 的队友提供 再生 I:
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] run effect give @s minecraft:speed 2 1 true
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] at @s run effect give @a[team=team1,gamemode=!spectator,distance=..20] minecraft:regeneration 5 0 true
Team Auras
A Minecraft datapack that lets you create team-based aura helmets. Players wearing an aura helmet grant configurable potion effects to themselves and nearby teammates.
Features
- Supports 8 configurable teams (
team1 to team8)
- Turn any wearable helmet item into an aura helmet
- Configurable self and nearby teammate potion effects
- Configurable aura radius and effect amplifier
- Vanilla-compatible team customization
- Simple setup functions for creating teams and assigning aura helmets
- Compatible with Minecraft 1.20.1 and from 1.21.11 to 26.3
Installation
- Download the latest release.
- Place the datapack into your world's
datapacks folder.
- Run:
/reload
Setup
Create the default teams:
/function team_auras:setup/create_teams
To turn the item in your main hand into a Team 1 aura helmet:
/function team_auras:item_apply/team1
Replace team1 with any team from team1 to team8.
Note: Aura items only grant their effects while equipped in the helmet slot. The /function team_auras:apply/teamX functions only assign the aura to the held item. They do not make the item wearable as a helmet if it isn't already.
If you want to use an item that is not normally wearable as a helmet, you can use Minecraft's /give command with the equippable item component to make it wearable in the helmet slot. This is a vanilla feature.
Team Customization
The datapack creates the default teams (team1 to team8).
You can freely customize these teams using vanilla Minecraft's team modify command, including:
- Display name
- Prefix
- Suffix
- Team color
- Friendly fire
- Collision rules
- Name tag visibility
- Death message visibility
- Any other supported
team modify options
For example:
team modify team1 displayName {"text":"Red Team","color":"red","bold":true}
team modify team1 prefix {"text":"[RED] ","color":"red"}
team modify team1 color red
These customizations do not affect the aura system. As long as players remain on the correct team (team1 to team8), the datapack will continue to function normally.
Configuration
Each team's aura is configured in its corresponding function:
data/team_auras/function/team1.mcfunction
...
data/team_auras/function/team8.mcfunction
By default, each aura grants:
- Self: Glowing I
- Nearby teammates (10 block radius): Resistance I
Each team's function contains two commands:
- One that applies the effect to the wearer.
- One that applies the effect to nearby teammates.
For example:
# Self effect
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] run effect give @s minecraft:glowing 2 0 true
# Nearby teammates
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] at @s run effect give @a[team=team1,gamemode=!spectator,distance=..10] minecraft:resistance 2 0 true
You can customize:
- Potion effects
- Effect duration
- Effect amplifier (
0 = Level I, 1 = Level II, etc.)
- Aura radius (
distance=..10, distance=..20, etc.)
For example, to make Team 1 grant Speed II to the wearer and Regeneration I to teammates within 20 blocks:
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] run effect give @s minecraft:speed 2 1 true
execute as @a[team=team1,gamemode=!spectator] if items entity @s armor.head *[custom_data~{team:"team1"}] at @s run effect give @a[team=team1,gamemode=!spectator,distance=..20] minecraft:regeneration 5 0 true
评论 0
登录后参与评分
还没有评论,来抢沙发吧