File Details
HyWeaponVariants-0.0.3.jar
- R
- Feb 25, 2026
- 125.78 KB
- 106
- Early Access
File Name
HyWeaponVariants-0.0.3.jar
Supported Versions
- Early Access
🆕 New Features
Randomized Variant System (0–5 effects per weapon)
- Each weapon now rolls a random number of active variants (bonus effects) on first creation, in addition to the existing stat multipliers
- Default range is 0 to 3 variants — configurable via
variantCount.min/variantCount.maxin the config - Weapons with 0 variants are perfectly plain with no bonuses, adding meaningful loot variance
- Variant selection uses a weighted shuffle so rarer effects appear less often
23 Built-in Variant Types
Added a full variantPool covering all major weapon archetypes:
| Category | Variants |
|---|---|
| Damage | Bonus Damage, Crit Chance, Crit Damage, Armor Penetration, Elemental Damage |
| On-Hit Procs | Poison, Ignite, Freeze, Stun, Bleed |
| Sustain | Life Steal, Thorns |
| Mobility / Utility | Attack Speed, Move Speed, Knockback, Reach |
| Ranged | Projectile Speed, Charge Speed, Pierce / Bounce |
| Resource | Mana Cost, Signature Energy, Stamina Cost |
| Durability | Durability (rare) |
All variants are fully configurable — add, remove, or reweight any entry in variantPool in the config with no code changes required.
New Config Fields
variantCount— controls min/max number of variants rolled per weaponvariantPool— list of available variant types with id, label, multiplier range, weight, and rating settings- Active variant ids are stored in item metadata under
activeVariantsfor tooltip and stat-sync systems to enumerate
🐛 Bug Fixes
WeaponVariantPlayerReadyListenerwas missing — referenced instart()but never defined, causing a compile error. Now implemented: strips legacy variant tags from arrow stacks onPlayerReadyEventso bows and crossbows correctly consume ammo- Duplicate stat weights in
Rating—HealingRadiusandSlowingRadiuswere registered twice in the defaultstatWeightsmap, silently overwriting themselves. Removed duplicates - Duplicate
prettifyStatIdbranches — identicalif-blocks forHealingRadiusandSlowingRadiuswere dead code. Removed and expanded to cover all new variant ids with proper display names - Triple-duplicated glob matching logic — the same glob-to-regex conversion was copy-pasted across
VariantMeta,HyWeaponVariantsPlugin, and an internal helper. Extracted into a sharedGlobUtilutility class - Bows and arrows can now be used
⚡ Optimisations
GlobUtil.matches()now has a fast path for patterns without*or?wildcards — skips regex compilation entirely and uses direct case-insensitive equalityRange.sample()clamp logic simplified- Removed a redundant
rnd == nullguard inside the stat-roll loop inensureVariant
🔧 Build
- Added
@SuppressWarnings("removal")onPlayerCraftEventusage — the event is deprecated for removal in a future patchline but remains the most reliable post-craft rescan hook for now