ZEEG — Zap's Enhanced Enchantment Glints
一个轻量级的 Fabric 客户端模组,允许你无需资源包即可动态自定义附魔光泽。
功能
- 颜色选择器:设置任意 RGB 或 Hex 值
- 多种循环模式:
- 静态:单一纯色自定义颜色。
- 彩虹:平滑遍历光谱。
- 双色:在两种自定义颜色之间交替平滑过渡。
- 物品特定覆盖:为特定物品分配独特的光泽颜色(例如,下界合金剑设为绿色,弓设为红色)。
- 自定义名称覆盖:根据砧中重命名后的物品名称动态调整光泽颜色。
- 资源包配置:资源包制作者可以通过自定义资源包提供默认的光泽配置。
- 直观 GUI:易于使用的配置界面,可直接通过 Mod Menu 访问。
- 原生集成:兼容游戏内置的光泽强度和速度设置。
- 模组兼容性:适用于任何模组物品。
- 开发者与数据包友好:暴露自定义的
zeeg:glint 数据组件,允许其他模组、数据包和 /give 命令轻松为任何物品设置自定义光泽属性。
版本支持与分支
ZEEG 支持多个 Minecraft 版本:
使用方法
- 在 Fabric 上安装 ZEEG(需要 Fabric API 和 Mod Menu)。
- 打开 Mod Menu -> ZEEG -> Configure。
- 自定义你的颜色、速度、覆盖规则或循环模式。
- 点击 Save & Reload 以在游戏中即时应用更改。
资源包用法
资源包制作者可以在其包中捆绑默认配置预设、物品特定覆盖或名称覆盖。如果启用,ZEEG 将自动检测并加载这些配置。
在你的资源包中创建名为 config.zg 的 JSON 文件,路径如下:
assets/zeeg/config.zg
config.zg 结构示例:
{
"red": 0,
"green": 255,
"blue": 128,
"strength": 255,
"cycleMode": 1,
"rainbowSpeed": 25,
"itemColors": [
{
"itemId": "minecraft:netherite_sword",
"red": 255,
"green": 0,
"blue": 0
}
],
"namedColors": [
{
"name": "Excalibur",
"red": 255,
"green": 215,
"blue": 0,
"strength": 255,
"cycleMode": 2,
"red2": 255,
"green2": 255,
"blue2": 255
}
]
}
命令用法
你可以使用 /give 命令获取预先配置好自定义光泽的物品,方法是指定 zeeg:glint 数据组件。
格式:
- 附魔时的自定义光泽:
/give @s minecraft:diamond_sword[zeeg:glint={r:255,g:255,b:0}]
- 彩虹光泽:
/give @s minecraft:diamond_sword[zeeg:glint={cycle_mode:1,speed:50}]
- 双色光泽: 在红色和蓝色之间平滑过渡:
/give @s minecraft:diamond_sword[zeeg:glint={cycle_mode:2,r:255,g:0,b:0,r2:0,g2:0,b2:255,speed:30}]
可用组件字段:
r, g, b (整数 0-255):主 RGB 颜色(默认值:255)。
strength (整数 0-255):光泽不透明度/强度(默认值:255)。
cycle_mode (整数 0-2):0 = 静态,1 = 彩虹,2 = 双色(默认值:0)。
speed (整数 1-100):循环变化速度(默认值:25)。
r2, g2, b2 (整数 0-255):双色模式的次要目标 RGB 颜色(默认值:255)。
数据包用法
数据包制作者可以在战利品表、自定义配方结果或进度奖励中使用 zeeg:glint 组件。
示例战利品表物品:
{
"type": "minecraft:item",
"name": "minecraft:netherite_sword",
"functions": [
{
"function": "minecraft:set_components",
"components": {
"minecraft:enchantment_glint_override": true,
"zeeg:glint": {
"r": 255,
"g": 0,
"b": 0,
"cycle_mode": 2,
"r2": 255,
"g2": 128,
"b2": 0,
"speed": 15
}
}
}
]
}
模组开发用法
模组开发者可以使用 API 直接读取和修改 ItemStack 实例上的光泽组件。
检索光泽数据:
import com.zapaxe.zeeg.GlintComponent;
GlintComponent glint = stack.get(GlintComponent.TYPE);
if (glint != null) {
int red = glint.r();
int green = glint.g();
int blue = glint.b();
}
应用光泽数据:
import com.zapaxe.zeeg.GlintComponent;
// 参数:r, g, b, strength, cycleMode, speed, r2, g2, b2
GlintComponent customGlint = new GlintComponent(255, 0, 255, 255, 1, 20, 255, 255, 255);
stack.set(GlintComponent.TYPE, customGlint);
ZEEG — Zap's Enhanced Enchantment Glints
A lightweight client-side Fabric mod that allows you to customize your enchantment glints dynamically without resource packs.
Features
- Color Picker: Set any RGB or Hex Value
- Multiple Cycle Modes:
- Static: Single solid custom color.
- Rainbow: Smooth cycle through the spectrum.
- Duo-Tone: Alternating smooth transition between two custom colors.
- Item-Specific Overrides: Assign unique glint colors to specific items (e.g., green for a Netherite Sword, red for a Bow).
- Custom Name Overrides: Color your glints dynamically based on item names renamed in an anvil.
- Resource Pack Configs: Pack creators can supply default glint configurations via custom resource packs.
- Intuitive GUI: Easy-to-use configuration screen accessible directly via Mod Menu.
- Native Integration: Compatible with the game's built-in glint strength and speed settings.
- Mod Compatibility: Works with any modded item.
- Developer & Datapack Friendly: Exposes the custom
zeeg:glint data component, allowing other mods, datapacks, and /give commands to easily set custom glint properties on any item.
Version Support & Branches
ZEEG supports multiple Minecraft versions:
Usage
- Install ZEEG on Fabric (requires Fabric API and Mod Menu).
- Open Mod Menu -> ZEEG -> Configure.
- Customize your colors, speeds, overrides, or cycle modes.
- Click Save & Reload to apply changes instantly in-game.
Resource Pack Usage
Resource pack creators can bundle default configuration presets, item-specific overrides, or named overrides within their packs. ZEEG will automatically detect and load these configs if enabled.
Create a JSON file named config.zg in your resource pack at:
assets/zeeg/config.zg
Example config.zg structure:
{
"red": 0,
"green": 255,
"blue": 128,
"strength": 255,
"cycleMode": 1,
"rainbowSpeed": 25,
"itemColors": [
{
"itemId": "minecraft:netherite_sword",
"red": 255,
"green": 0,
"blue": 0
}
],
"namedColors": [
{
"name": "Excalibur",
"red": 255,
"green": 215,
"blue": 0,
"strength": 255,
"cycleMode": 2,
"red2": 255,
"green2": 255,
"blue2": 255
}
]
}
Commands Usage
You can use the /give command to obtain items with pre-configured custom glints by specifying the zeeg:glint data component.
Formats:
- Custom Glint on Enchanting:
/give @s minecraft:diamond_sword[zeeg:glint={r:255,g:255,b:0}]
- Rainbow Glint:
/give @s minecraft:diamond_sword[zeeg:glint={cycle_mode:1,speed:50}]
- Duo-Tone Glint: Transitions smoothly between red and blue:
/give @s minecraft:diamond_sword[zeeg:glint={cycle_mode:2,r:255,g:0,b:0,r2:0,g2:0,b2:255,speed:30}]
Available Component Fields:
r, g, b (Integer 0-255): The primary RGB color (Default: 255).
strength (Integer 0-255): Glint opacity/strength (Default: 255).
cycle_mode (Integer 0-2): 0 = Static, 1 = Rainbow, 2 = Duo-Tone (Default: 0).
speed (Integer 1-100): Shifting cycle speed (Default: 25).
r2, g2, b2 (Integer 0-255): Secondary target RGB color for Duo-Tone mode (Default: 255).
Datapack Usage
Datapack creators can use the zeeg:glint component in loot tables, custom recipe results, or advancement rewards.
Example Loot Table Item:
{
"type": "minecraft:item",
"name": "minecraft:netherite_sword",
"functions": [
{
"function": "minecraft:set_components",
"components": {
"minecraft:enchantment_glint_override": true,
"zeeg:glint": {
"r": 255,
"g": 0,
"b": 0,
"cycle_mode": 2,
"r2": 255,
"g2": 128,
"b2": 0,
"speed": 15
}
}
}
]
}
Mod Usage
Mod developers can read and modify glint components directly on ItemStack instances using the API.
Retrieve Glint Data:
import com.zapaxe.zeeg.GlintComponent;
GlintComponent glint = stack.get(GlintComponent.TYPE);
if (glint != null) {
int red = glint.r();
int green = glint.g();
int blue = glint.b();
}
Apply Glint Data:
import com.zapaxe.zeeg.GlintComponent;
// Params: r, g, b, strength, cycleMode, speed, r2, g2, b2
GlintComponent customGlint = new GlintComponent(255, 0, 255, 255, 1, 20, 255, 255, 255);
stack.set(GlintComponent.TYPE, customGlint);
评论 0
登录后参与评分
还没有评论,来抢沙发吧