Vault Loot Beams
这是广受欢迎的 Loot Beams 模组的一个分支,专为 VaultHunters 3rd Edition 整合包修改。
请注意,该模组的许多“新”功能实际上是从原版 Loot Beams 模组向后移植到新版本游戏中的。
因此,即使我为了这个分支更改或重写了它们的实现方式,我也不能独占这些功能的功劳。
功能
Loot Beams
掉落在地上的配置物品将发出彩色的掉落物光束。
此光束具有下方列出的许多可配置属性。
渲染要求
Render Distance(渲染距离) - 掉落物光束开始渲染的距离。接受 0-1024 方块,默认值为 24。
Require Ground(需要地面) - 如果启用,只有当物品在地面上而不是在半空中时才会渲染光束。
Whitelist Color Overrides(白名单颜色覆盖) - 如果启用,带有颜色覆盖的物品将被自动视为已列入白名单以进行渲染。
Render Condition(渲染条件) - 一个 ItemCondition(物品条件),用于自动判断是否应为物品渲染光束。默认为 Lists Only(仅列表)。
Render Whitelist(渲染白名单) - 一个 ItemList(物品列表),其中的物品应始终渲染掉落物光束。
Render Blacklist(渲染黑名单) - 一个 ItemList(物品列表),其中的物品绝不应渲染掉落物光束。(这将覆盖白名单。)
渲染属性
Beam Radius(光束半径) - 掉落物光束的半径,接受 0-5,默认值为 1。
Beam Height(光束高度) - 掉落物光束的高度,最大值为 10,默认值为 2。
Beam Y Offset(光束 Y 轴偏移) - 掉落物光束的垂直偏移量,最大值为 10,默认值为 0。
Beam Alpha(光束透明度) - 掉落物光束的不透明度,接受 0-1,默认值为 0.7。
White Beam Center(白色光束中心) - 光束是否具有额外的白色内部光束,默认启用。
Beam Shadow(光束阴影) - 光束是否具有彩色阴影(替换原版物品阴影),默认启用。
Shadow Radius(阴影半径) - 阴影的半径,接受 0.00001-1,默认值为 0.5。
Shadow Alpha Multiplier(阴影透明度乘数) - 阴影的不透明度乘数,阴影继承光束的不透明度并乘以该因子,接受 0.00001-3,默认值为 1。
Animate Shadow(动画阴影) - 阴影是否随物品的上下浮动而动画,默认启用。
Beam Render Mode(光束渲染模式) - 掉落物光束的渲染模式,可以设置为:
Glowing(发光) - 光束将像闪电一样渲染,使其发光(自发光)并与光影很好地配合。这是默认的渲染模式。
Beacon(信标) - 光束将具有类似信标的纹理,如果你使用过原版 Loot Beams 模组,这就是光束一直以来的渲染方式。
Solid(实心) - 光束将使用纯色。
Beam Color Mode(光束颜色模式) - 掉落物光束的默认颜色模式,任何不提供掉落物光束颜色且未配置颜色的物品,其颜色将由以下模式决定:
Default(默认) - 静态白色。
Name Color(名称颜色) - 采用物品名称的颜色。
Rarity Color(稀有度颜色) - 采用物品稀有度的颜色。
Name or Rarity Color(名称或稀有度颜色) - 如果存在则使用名称颜色,否则使用稀有度颜色。(默认)
Color Overrides(颜色覆盖) - 一个 ColorGroup(颜色组)映射,用于为特定物品提供自定义颜色。
ColorGroup
颜色组将一个 ItemList(物品列表)与一组颜色关联起来。
如果有多个颜色,它们将通过渐变效果循环切换。
颜色组可以通过多种方式定义:
Inline(内联) - 直接指向单个颜色或颜色数组的物品列表。
Full(完整) - 颜色组的标识符,包含一个 ItemList(物品列表)和一组颜色。
在颜色组内部,你可以通过以下方式定义颜色:
Integer Color(整数颜色) - 一种打包整数的单个颜色形式
- 接受直接整数
11146495 或十六进制整数 0xAA14FF
Hex Color(十六进制颜色) - 一种十六进制字符串形式的单个颜色
- 接受
"#AA14FF" 或 "0xAA14FF"
完整映射示例:
{
"color_map": {
"minecraft:diamond": 0x00FF00, // 单个物品的单个颜色
"minecraft:*_axe": ["#FF0000", "0x00FF00"], // 部分物品标识符的多种颜色
"favorites": { // 带有物品列表和内联颜色的完整颜色组
"items": [
"minecraft:diamond",
"minecraft:*_sword",
"minecraft:netherite_ingot"
],
"colors": 0xFFFF00
},
"other_favorites": { // 带有物品列表和多种颜色的完整颜色组
"items": [
"minecraft:golden_apple",
"minecraft:enchanted_golden_apple"
],
"colors": ["#FF00FF", "#00FFFF"]
}
}
}
掉落物光束粒子
Beam Particles(光束粒子) - 掉落物光束是否具有粒子效果,默认启用。
Particle Groups(粒子组) - 一个 ID 到 ParticleGroup(粒子组)的映射,用于定义特定物品掉落物光束的粒子效果。
ParticleGroup
Particle Size(粒子大小) - 粒子的大小,接受 0.00001-10,默认值为 0.25。
Particle Speed(粒子速度) - 粒子的速度,接受 0.00001-10,默认值为 0.1。
Particle Spread(粒子扩散) - 粒子的初始扩散范围,接受 0.00001-10,默认值为 0.05。
Particle Count(粒子数量) - 每秒生成的粒子数量,接受 1-20,默认值为 19。
Particle Lifetime(粒子生命周期) - 粒子的存活时间(以刻为单位),接受 1-100,默认值为 20。随着粒子老化,其不透明度会逐渐降低直到消失。
Particle Condition(粒子条件) - 一个 ItemCondition(物品条件),用于自动判断是否应为物品添加粒子。默认为 Lists Only(仅列表)。
Particle Whitelist(粒子白名单) - 一个 ItemList(物品列表),其中的物品应始终具有粒子效果。
Particle Blacklist(粒子黑名单) - 一个 ItemList(物品列表),其中的物品绝不应具有粒子效果。(这将覆盖白名单。)
光束名称标签
战利品光束可以选择渲染物品的名称标签,显示名称、数量(可选)和稀有度(可选)。
Beam Nameplate - 是否让战利品光束渲染名称标签,默认开启。
Nameplate on Look - 名称标签是否仅在玩家注视物品/光束时渲染,默认开启。
Nameplate Look Sensitivity - 玩家必须多接近注视物品才会渲染名称标签,接受 0-5 的值,默认为 0.018。数值越大,玩家的注视精度要求越低。
Nameplate Outline - 名称标签文本是否具有描边效果,默认开启。
Nameplate Include Count - 名称标签是否包含物品数量,默认开启。
Nameplate Scale - 名称标签的缩放比例,接受 -10-10 的值,默认为 1。
Nameplate Y Offset - 名称标签相对于物品实体的垂直偏移量,接受 -30-30 的值,默认为 0.75。
Nameplate Text Alpha - 名称标签文本的不透明度,接受 0-1 的值,默认为 1。
Nameplate Background Alpha - 名称标签背景的不透明度,接受 0-1 的值,默认为 0.5。
Render Vanilla Rarities - 名称标签是否渲染原版物品稀有度,默认关闭。
Custom Nameplate Rarities - 如果检测到物品工具提示中存在自定义稀有度,则渲染的自定义稀有度列表。
Nameplate Condition - 一个 ItemCondition,用于自动判断物品是否应该拥有名称标签。默认为 Lists Only。
Nameplate Whitelist - 一个 ItemList,用于指定始终应拥有名称标签的物品。
Nameplate Blacklist - 一个 ItemList,用于指定绝不应拥有名称标签的物品。(这将覆盖白名单。)
战利品光束音效
Landing Sound - 战利品光束落地时是否播放音效,默认关闭。
Sound Volume - 落地音效的音量,接受 0-1 的值,默认为 0.3。
Sound Condition - 一个 ItemCondition,用于自动判断物品落地时是否应播放音效。默认为 Lists Only。
Sound Whitelist - 一个 ItemList,用于指定始终应在落地时播放音效的物品。
Sound Blacklist - 一个 ItemList,用于指定绝不应在落地时播放音效的物品。(这将覆盖白名单。)
LootBeamHolder
这是一个简单的 API 接口,模组内的物品可以实现该接口以将物品指定为战利品光束持有者。
这允许物品在不处于渲染白名单中或不通过渲染条件的情况下也能渲染战利品光束,同时允许根据其属性动态确定光束的颜色。
该接口有两个方法:shouldRenderBeam(ItemEntity, ItemStack) 和 getBeamColor(ItemEntity, ItemStack)。
你可以选择通过 LootBeamHolderRegistry 注册 LootBeamHolder,而不是直接实现该接口。
配置
Vault Loot Beams 使用 json 配置文件来配置其功能。
你可以直接编辑文件并使用指定的热键在游戏中重新加载它,或者使用游戏中内置的配置编辑器(通过指定的热键打开)来修改配置。
下面详细介绍了一些用于多个配置选项的自定义配置选项类型。
ItemCondition
应用于物品的条件,对于相关的配置选项而言,该条件要么通过,要么失败。
Lists Only - 仅考虑提供的白名单和黑名單。
All Items - 所有物品均通过。
Equipment - 装备类物品通过。(工具、护甲、武器等。)
Rare Items - 稀有度高于 Common 的物品通过。
Rare or Equipment - 通过 Equipment 或 Rare Items 条件的物品。
ItemList
物品列表是一种特殊类型的列表,用于收集各种配置选项所需的物品。
物品列表可以作为单个条目内联,也可以作为完整的条目列表。
条目的格式可以有多种:
- Item Identifier - 针对具有所提供标识符的单个物品,例如
minecraft:diamond。
- Partial Item Identifier - 带有
* 的部分标识符,例如 minecraft:*_axe,部分标识符针对同一命名空间下路径以 * 后的后缀结尾的所有物品。
- Item Tag - 针对所提供标签内的所有物品,例如
minecraft:beds。
- Mod Id - 针对所提供模组内的所有物品,例如
minecraft 或 the_vault。
Vault Hunters 集成
当与 The Vault 模组一起使用时,Vault Loot Beams 自带默认的集成配置添加项。
该集成执行以下两项操作:
- 为以下物品实现
LootBeamHolder,允许根据物品属性动态设置颜色
- Augments、Blessings、Potions、Vault Crystals、Catalysts、Inscriptions、Jewels 和 Tools
- 向默认配置中添加许多 Vault Hunters 物品及颜色。
- 将所有 vault 护甲、主手物品、副手物品和 curios 加入白名单。
- 将宝石、钥匙碎片、空白钥匙、未识别钥匙、知识之星和古董加入白名单。
- 为 artifacts、inscriptions、lost bounty、old notes、bounty pearls、catalysts、card deck、pogs、所有 treasure keys 和所有 seals 提供颜色。
错误修复与优化
此分支中有许多新的错误修复和优化,应能让你毫无性能顾虑地使用战利品光束。
Vault Loot Beams
A fork of the Popular Loot Beams mod modified specifically for the VaultHunters 3rd Edition modpack.
Please note that multiple of this mod's "new" features were featurs backported from the original Loot Beams mod for newer game versions.
Thus, I cannot take full credit for those features, even if I did change or rewrite their implementation's for this fork.
Features
Loot Beams
Configured items dropped on the ground will have a colored loot beam projecting from them.
This beam has many configurable properties listed below.
Rendering Requirements
Render Distance - The distance at which the loot beam will render. Accepts 0-1024 blocks, defaults 24.
Require Ground - If enabled, the loot beam will only render if the item is on the ground rather than in the air.
Whitelist Color Overrides - If enabled, items with a color override will be automatically considered whitelisted for rendering.
Render Condition - An ItemCondition for automatically determining if an item should render a beam. Defaults to Lists Only.
Render Whitelist - An ItemList for items that should always render a loot beam.
Render Blacklist - An ItemList for items that should never render a loot beam. (This will override the whitelist.)
Rendering Properties
Beam Radius - The radius of the loot beam, accepts 0-5, defaults 1.
Beam Height - The height of the loot beam, maximum of 10, default of 2.
Beam Y Offset - The vertical offset of the loot beam, maximum of 10, default of 0.
Beam Alpha - The opacity of the loot beam, accepts 0-1, defaults 0.7.
White Beam Center - Should the beam have an additional white inner beam, enabled by default.
Beam Shadow - Should the beam have a colored shadow (replaces the vanilla item shadow), enabled by default.
Shadow Radius - The radius of the shadow, accepts 0.00001-1, defaults 0.5.
Shadow Alpha Multiplier - The opacity multiplier of the shadow, the shadow inherits the opacity of the beam and is multiplied by this factor, accepts 0.00001-3, defaults 1.
Animate Shadow - Should the shadow animate with the bob of the item, enabled by default.
Beam Render Mode - The render mode of the loot beam, this can be set to:
Glowing - The beam will render "like" lightning, making it glow (emissive) and work well with shaders. This is the default render mode.
Beacon - The beam will have a beacon-like texture, if you used the original Loot Beams mod, this was how beams were always rendered.
Solid - The beam will use solid colors.
Beam Color Mode - The default color mode for loot beams, any items that don't provide a loot beam color, and don't have a configured color, will have its color determined by this mode:
Default - A static white color.
Name Color - Takes the color of the item's name.
Rarity Color - Takes the color of the item's rarity.
Name or Rarity Color - If present uses name color, otherwise uses rarity. (default)
Color Overrides - A map of ColorGroups for providing custom colors for specific items.
ColorGroup
A color group associates an ItemList with a list of colors.
If there are multiple colors, they will be cycled between via a gradient effect.
Color groups can be defined in a number of ways:
Inline - An inlined item list to a singular color, or an array of colors.
Full - An identifier for the color group, with an ItemList and a list of colors.
Within the color group, you can define colors in the following ways:
Integer Color - A single color in the form of a packed integer
- Accepts both direct integers
11146495 or a hex integer 0xAA14FF
Hex Color - A single color in the form of a hex string
- Accepts both
"#AA14FF" or "0xAA14FF"
Full Map Example:
{
"color_map": {
"minecraft:diamond": 0x00FF00, // Single color for a single item
"minecraft:*_axe": ["#FF0000", "0x00FF00"], // Multiple colors for a partial item identifier
"favorites": { // Full color group with an item list and inlined color
"items": [
"minecraft:diamond",
"minecraft:*_sword",
"minecraft:netherite_ingot"
],
"colors": 0xFFFF00
},
"other_favorites": { // Full color group with an item list and multiple colors
"items": [
"minecraft:golden_apple",
"minecraft:enchanted_golden_apple"
],
"colors": ["#FF00FF", "#00FFFF"]
}
}
}
Loot Beam Particles
Beam Particles - Should the loot beam have particles, enabled by default.
Particle Groups - A map of ids to ParticleGroups defining particle effects for specific item's loot beams.
ParticleGroup
Particle Size - The size of the particles, accepts 0.00001-10, defaults 0.25.
Particle Speed - The speed of the particles, accepts 0.00001-10, defaults 0.1.
Particle Spread - The initial spread of the particles, accepts 0.00001-10, defaults 0.05.
Particle Count - The number of particles to spawn every second, accepts 1-20, defaults to 19.
Particle Lifetime - The lifetime of the particles in ticks, accepts 1-100, defaults to 20, as a particle ages its opacity will decrease until it despawns.
Particle Condition - An ItemCondition for automatically determining if an item should have particles. Defaults to Lists Only.
Particle Whitelist - An ItemList for items that should always have particles.
Particle Blacklist - An ItemList for items that should never have particles. (This will override the whitelist.)
Beam Nameplates
Loot beams can optionally render a nameplate for the item as well, showing the name, its count (optional), and rarity (optional).
Beam Nameplate - Should loot beams render nameplates, enabled by default.
Nameplate on Look - Should the nameplate only render when the player is looking at the item/beam, enabled by default.
Nameplate Look Sensitivity - How closely the player must be looking at the item for the nameplate to render, accepts 0-5, defaults to 0.018. The larger the number the less precise the player can be.
Nameplate Outline - Should the nameplate text have an outline, enabled by default.
Nameplate Include Count - Should the nameplate include the item count, enabled by default.
Nameplate Scale - The scale of the nameplate, accepts -10-10, defaults to 1.
Nameplate Y Offset - The vertical offset of the nameplate from the item entity, accepts -30-30, defaults to 0.75.
Nameplate Text Alpha - The opacity of the nameplate text, accepts 0-1, defaults to 1.
Nameplate Background Alpha - The opacity of the nameplate background, accepts 0-1, defaults to 0.5.
Render Vanilla Rarities - Should the nameplate render vanilla item rarities, disabled by default.
Custom Nameplate Rarities - A list of custom rarities to be rendered if detected in the item's tooltip.
Nameplate Condition - An ItemCondition for automatically determining if an item should have a nameplate. Defaults to Lists Only.
Nameplate Whitelist - An ItemList for items that should always have a nameplate.
Nameplate Blacklist - An ItemList for items that should never have a nameplate. (This will override the whitelist.)
Loot Beam Sounds
Landing Sound - Should loot beams play a sound when they land, disabled by default.
Sound Volume - The volume of the landing sound, accepts 0-1, defaults to 0.3.
Sound Condition - An ItemCondition for automatically determining if an item should play a sound when it lands. Defaults to Lists Only.
Sound Whitelist - An ItemList for items that should always play a sound when they land.
Sound Blacklist - An ItemList for items that should never play a sound when they land. (This will override the whitelist.)
LootBeamHolder
This is a simple api interface that can be implemented by items within mods for designating an item as a loot beam holder.
This allows the item to have a loot beam rendered for it without needing to be in the render whitelist or to pass the render condition while also allowing the beams color to be dynamically determined based on the item's properties.
The interface has 2 methods, shouldRenderBeam(ItemEntity, ItemStack) and getBeamColor(ItemEntity, ItemStack).
You can optionally register a LootBeamHolder through the LootBeamHolderRegistry instead of implementing the interface directly.
Config
Vault Loot Beams uses a json config file to configure its features.
You can directly edit the file and reload it in-game using the specified hotkey, or you can use the in-game config editor (opened with the specified hotkey) to modify the config.
There are a few custom config option types used for multiple config options detailed below.
ItemCondition
A condition applied to items that will either pass or fail for the relevant config option.
Lists Only - Only consider the provided whitelist and blacklist.
All Items - All items pass.
Equipment - Equipment items pass. (Tools, Armor, Weapons, etc.)
Rare Items - Items with a rarity higher than Common pass.
Rare or Equipment - Items that pass the Equipment or Rare Items.
ItemList
An item list is a special type of list that is used to collect items for various config options.
Item lists can either be inlined as a singular entry, or as a full list of entries.
Entries can be formatted in a number of ways:
- Item Identifier - Targets a single item with the provided identifier, such as
minecraft:diamond.
- Partial Item Identifier - A partial identifier indicated with a
*, such as minecraft:*_axe, partial identifiers target all items under the same namespace whose path ends with the suffix after the *
- Item Tag - Targets all items within the provided tag, such as
minecraft:beds.
- Mod Id - Targets all items within the provided mod, such as
minecraft or the_vault.
Vault Hunters Integration
Vault Loot Beams comes with a built-in default config addition when used with The Vault mod.
The integration does 2 things:
- Implements
LootBeamHolder for the following items, allowing for dynamic colors based on the items properties
- Augments, Blessings, Potions, Vault Crystals, Catalysts, Inscriptions, Jewels, and Tools
- Adds a number of Vault Hunters items & colors to the default config.
- Whitelists all vault armor, mainhands, offhands, and curios.
- Whitelists gemstones, keypieces, blank keys, unidentified keys, knowledge stars, and antiques.
- Provides colors for artifacts, inscriptions, lost bounty, old notes, bounty pearls, catalysts, card deck, pogs, all treasure keys, and all seals.
Bug Fixes & Optimizations
There are a number of new bug fixes and optimizations in this fork that should allow you to
use loot beams without any worry for performance.
评论 0
登录后参与评分
还没有评论,来抢沙发吧