enchanted_outlines-0.1.3.jar
Curse Maven Snippet
What's new
✨ Enchanted Outlines Changelog
🚀 v0.1.3 (2026-08-08)
🐛 Bug Fixes
Fixed armor/elytra outlines turning into solid blocks under shaders
- The game's native PNG reader couldn't handle palette-based transparency (tRNS) used by vanilla armor textures, making every pixel fully opaque. Outlines became solid cubes instead of following the item shape.
- Switched to
ImageIOfor proper alpha decoding — armor outlines now respect actual transparency.
Fixed wildly broken outline colors from unnormalized brightness
- Brightness values were accidentally multiplied by 255 instead of staying in the 0–1 range, causing color values to explode (scale ~55–113 instead of ~0.35–1.0). RGB channels overflowed and produced garbled neon messes.
- Now properly normalized — colors behave predictably again.
Fixed outlines collapsing into solid rectangles when color blending is off
- When "blend outline with item color" was disabled, certain textures (especially modded armor without full RGBA format) threw exceptions during shape generation. The renderer either gave up or fell back to a plain white square.
- Shape generation is now fully exception-safe: if brightness can't be read, it simply skips the darkening step instead of breaking the outline.
Fixed config screen changes not applying until restart
- Saving settings from the in-game config menu wrote to disk but forgot to refresh the internal color/setting cache. Your changes were ignored until you restarted or pressed F3+T.
- Cache now invalidates immediately on save — changes apply right away.
⚡ Performance Improvements
Cached model geometry — no more recalculating every frame
- Before: every rendered item slot re-traversed the entire model, rebuilt vertex normals, and allocated fresh HashMaps — 64 inventory slots meant 64 full rebuilds per frame.
- After: geometry is computed once per unique item model and reused across slots and frames. Significantly less CPU work and zero per-frame garbage from normal calculations.
Eliminated redundant work on the render hot path
- Cached shader uniform references instead of looking them up by name twice per slot per frame.
- Reused precomputed quad normals across all 8 outline directions instead of recalculating per direction.
- Pulled direction-independent matrix transforms out of the direction loop — 8 directions now share the base transform, only applying a single cheap translation per direction.
- Cached sprite-to-quad index mapping to remove per-frame
indexOfscans. - Reused temporary
Matrix4fobjects when rendering armor cube shells instead of allocating 3 new ones per cube.
Cut reflection overhead
- Shader compatibility checks (
needVanillaShaderFallback) were doing slow reflection calls every frame. Now cached with a 500ms refresh — shader pack switches take at most half a second to reflect. spriteOriginalImagefield lookup is now statically cached and walks the class hierarchy, so modded sprite subclasses work without repeated reflection.- Average brightness is cached per texture location — no more re-scanning the same image pixels for different outline colors.
- Shader compatibility checks (
Removed 289,000+ lines of spam debug logging per session
HumanoidArmorLayerMixinwas printing "Armor outline rendered" on every frame for every armor slot — 289,687 times in one test run alone.- Cleaned up all per-frame debug logs. Log output dropped from 289,921 lines to 212 lines. Less disk I/O, cleaner logs, same working outlines.
🎨 Visual Polish
- Added exposure reduction for solid-color outlines
- When color blending is off, bright outlines (pink, gold, white) were painfully overexposed under emissive lighting or shaders — there was no item color to naturally tone them down.
- Outlines now auto-darken based on the item's average perceived brightness (Rec.601 weighted luminance × alpha). Dark items like iron swords get noticeably dimmer outlines; bright items like golden apples stay vivid.
- Formula:
finalBrightness = 0.35 + 0.65 × itemLuma - New config option:
outlineExposureReduce(default: ON) — toggle in the General section of the config screen.
📝 Developer / Agent Safety
- Added 19 inline guardrail comments to
OutlineRenderer.java- Key lessons from past rendering regressions are now embedded directly at the code sites where mistakes happened:
- Use
ImageIO, neverNativeImage.readfor palette+tRNS textures. - Brightness must stay 0–1 normalized; overflow destroys colors.
- The three outline algorithms (flat shape texture, 3D geometry expansion, armor per-cube shell) must not be split or mixed inconsistently.
- Geometry cache must only store frame-independent inputs.
- NativeImage pixel format is ABGR — mind the byte order.
- Use
- These are comment-only changes; zero logic was altered.
- Key lessons from past rendering regressions are now embedded directly at the code sites where mistakes happened:
📦 Full File Impact
| File | Changes |
|---|---|
OutlineRenderer.java |
Bug fixes, performance caching, exposure darkening, guardrail comments |
EnchantedConfigScreen.java |
Cache invalidation on save, new exposure toggle UI |
Config.java |
New outlineExposureReduce config field |
EnchantedOutlinesClient.java |
Removed temporary debug hooks |
ItemRendererMixin.java |
Cleaned up diagnostic code |
HumanoidArmorLayerMixin.java |
Removed per-frame debug spam |
ThrownTridentRendererMixin.java |
Removed debug logging, made cache instance-local |
zh_cn.json / en_us.json |
Localization for new config option |
AGENTS.md |
New project rules documenting rendering architecture lessons |
This mod has no additional files

