Commit graph

14 commits

Author SHA1 Message Date
645896ca4b
feat(mod): Stage 3 steps 1-8 — DrawStats, SharedDepthFbos, AnimFreeze, ItemLod/Bounds, HudCache, raw vertices, ParallelModels 2026-10-12 14:51:41 +02:00
LoVisual AI
8ef46e4560
feat(mod): Stage 3 (continued 3) — ParticleMixin + BlockEntityRenderStateMixin + ChestRendererMixin
Some checks failed
CI / backend (cargo test + clippy) (push) Successful in 3m5s
CI / frontend (lint + test + build) (push) Failing after 27s
CI / mod (gradle test + checkFolderLimit) (push) Successful in 2m36s
Per mod/docs/optimize-layer-design.md Stage 3 (continued). Three more mixin'ов
that consume the Stage 3-continued-2 contract mixins (CachedLight, TickCached)
on actual renderers, plus the ParticleMixin that adds its own per-particle
light cache + far-particle physics skip.

mixins/optimize/particle/ParticleMixin.java:
- @Inject HEAD/RETURN on Particle.getLightCoords — caches the per-particle
  light lookup by game tick (light only changes on tick boundaries). Gated
  on the Stage 1 'particleLight' toggle.
- @Inject HEAD/RETURN on Particle.move — temporarily sets hasPhysics=false
  for far particles (>16 blocks from camera) and three always-skip
  subclasses (BaseAshSmokeParticle, CampfireSmokeParticle,
  BubbleColumnUpParticle). Gated on the 'particlePhysics' toggle.
- Ported from zako.opt.mixin.particle.ParticleMixin.

features/.../optimize/particle/camera/CameraPosition.java (new helper):
- Single point where the camera position is sampled. ParticleMixin reads it
  instead of re-walking Minecraft.getInstance().gameRenderer.mainCamera()
  per particle per tick. Ported from zako.opt.particle.CameraPosition.
- Moved into particle/camera/ subfolder so optimize/particle/ stays under
  the ≤4 .java-per-folder limit after adding ParticleMixin.

mixins/optimize/block/BlockEntityRenderStateMixin.java:
- WrapOperation on BlockEntityRenderState.extractBase's
  LightCoordsUtil.getLightCoords — consults the per-tick light cache slot
  on the BlockEntity (via the CachedLight mixin from Stage 3-continued-2)
  before falling through to the original. Gated on 'blockEntityCache'.
- Ported from zako.opt.mixin.block.BlockEntityRenderStateMixin.

mixins/optimize/block/ChestRendererMixin.java:
- Two WrapOperations on ChestRenderer.extractRenderState:
  * ChestBlock.combine — caches the double-chest neighbor-lookup result by
    game tick (via the TickCached mixin). Gated on 'blockEntityCache'.
  * Int2IntFunction.applyAsInt — caches the second (pair) light lookup
    done for double chests (via the CachedLight.lovisual$pairLight slot).
    Gated on 'microOpts'.
- Ported from zako.opt.mixin.block.ChestRendererMixin.

lovisual.mixins.json: three new entries in the 'client' array:
  optimize.block.BlockEntityRenderStateMixin
  optimize.block.ChestRendererMixin
  optimize.particle.ParticleMixin

Tests: no new tests in this batch (mixins are pure side-effect field-bags /
WrapOperation wrappers without unit-testable logic). Existing suite still green.
Total: 866 tests, 0 failures. checkFolderLimit: OK (0 папок >4).
2026-10-11 10:23:03 +02:00
LoVisual AI
135628c2f1
feat(mod): Stage 3 (continued 2) — entity + block + Sodium contract mixins
Per mod/docs/optimize-layer-design.md Stage 3 (continued). This batch
implements the Stage 1 mixin-contract interfaces on their target MC classes
so CachedName, StateEntity, TickCached, CachedLight, CachedValidity and
CachedStack actually get used. Seven new mixin'ов; no new helpers (the
helpers were all written in Stage 1 already).

Entity-contract mixins (mixins/optimize/entity/):
- EntityNameMixin: implements CachedName on Entity — adds the per-tick
  cached name-tag fields (Component + tick). Vanilla Entity.getDisplayName()
  rebuilds the team prefix + name + suffix on every call.
- EntityRenderStateEntityMixin: implements StateEntity on EntityRenderState —
  adds the back-reference field to the source Entity. Render-states are
  rebuilt every frame so they can't keep their own pointer; this is captured
  by EntityRendererStateMixin.
- EntityRendererStateMixin: Inject at RETURN on EntityRenderer.createRenderState
  — captures the source Entity on the freshly-built state via the StateEntity
  contract. ZakoOpt used @ModifyReturnValue; we use plain @Inject because the
  MixinExtras ModifyReturnValue transformer is more fragile across MC versions.
- EntityRendererNameMixin: WrapOperation on EntityRenderer.getNameTag's
  Entity.getDisplayName call — caches by game tick so the per-frame cost is
  one identity check + read instead of a full Component rebuild.
- SodiumEntityRendererMixin: WrapOperation on Sodium EntityRenderer.renderCuboid's
  MemoryStack.stackPush — uses CachedStack (Stage 1) to skip the ThreadLocal
  lookup on the render thread. Registered as optional via LoVisualMixinPlugin
  (only applied when Sodium is loaded); remap = false because the target is
  a Sodium class, not a Mojang one.

BlockEntity-contract mixins (mixins/optimize/block/):
- BlockEntityMixin: implements TickCached + CachedLight + CachedValidity on
  BlockEntity — adds the per-tick cache slot, per-tick block-light lookups
  (single + pair for double-chests), per-tick should-render distance check,
  and per-state validity cache. All four are read by the (Stage 3, future)
  ChestRendererMixin / BlockEntityRenderStateMixin / BlockEntityRenderDispatcherMixin.
- BaseSpawnerMixin: implements TickCached on BaseSpawner — adds the per-tick
  cache slot that SpawnerCache (Stage 1) reads back.

Folder limit (≤4 .java per folder):
- mixins/optimize/entity/ hit 6 files after this batch — split into
  mixins/optimize/entity/renderer/ for EntityRendererStateMixin +
  EntityRendererNameMixin (the two that target EntityRenderer rather than
  Entity/EntityRenderState directly). The other 4 stay in entity/.

lovisual.mixins.json: seven new entries in the 'client' array, alphabetical:
  optimize.block.BaseSpawnerMixin
  optimize.block.BlockEntityMixin
  optimize.entity.EntityNameMixin
  optimize.entity.EntityRenderStateEntityMixin
  optimize.entity.SodiumEntityRendererMixin
  optimize.entity.renderer.EntityRendererNameMixin
  optimize.entity.renderer.EntityRendererStateMixin

LoVisualMixinPlugin: added SodiumEntityRendererMixin to OPTIONAL_SODIUM_MIXINS
so the mixin is only applied when Sodium is loaded (matches the existing
convention for sodium.* mixins).

Tests: no new tests in this batch (the new mixins are pure side-effect
field-bags — they don't have unit-testable logic). Existing suite still green.
Total: 866 tests, 0 failures. checkFolderLimit: OK (0 папок >4).
2026-10-11 10:23:03 +02:00
LoVisual AI
5e1864fed1
refactor(mod): restructure mixins/optimize/ into gl/hud/entity/particle/world subfolders
Per mod/docs/optimize-layer-design.md Stage 3 (continued). The mixins/optimize/
folder hit the project's ≤4 .java-files-per-folder rule when we tried to add
the next batch of mixin'ов (LivingEntityLodMixin, BubbleColumnUpParticleMixin,
LevelRendererOutlineMixin). Move the existing 4 mixin'ов into semantic subfolders:

- mixins/optimize/gl/GlCommandEncoderClearMixin.java (was mixins/optimize/)
- mixins/optimize/gl/GlCommandEncoderTexBufferMixin.java
- mixins/optimize/gl/RenderTypesMixin.java
- mixins/optimize/hud/OptimizeDebugHudMixin.java

lovisual.mixins.json: the 'client' array entries are updated to use the
new dotted paths (optimize.gl.*, optimize.hud.*). The package field in
each mixin file is updated to match.

No functional changes — this is purely a code-organization commit to make
room for the new Stage 3 mixin'ов in the next commit.
2026-10-10 18:53:38 +02:00
LoVisual AI
e88718a32d
feat(mod): Stage 3 (partial) — RenderBackendOps interface + 3 GL mixins
Per mod/docs/optimize-layer-design.md Stage 3 (partial). This commit ships
the simplest GL mixins and the strategy interface that splits GL/Vulkan
backends. SkinAtlas/AnimFreeze/HudCache/FrameFence deferred to a later pass
because they're more complex (vertex-format / glCopyImageSubData /
RenderPipeline+RenderPass).

RenderBackendOps interface (features/.../optimize/gl/RenderBackendOps.java):
- Backend-agnostic surface for lazy clear, TBO cache, RenderTypes cache.
- current() resolves the active backend — returns GlRenderBackendOps on GL,
  null on Vulkan (so all WrapOperations fall through to the vanilla call).
- Stage 4 will add a VulkanRenderBackendOps no-op implementation.

GlRenderBackendOps (features/.../optimize/gl/GlRenderBackendOps.java):
- Concrete GL implementation. Three caches ported from ZakoOpt:
  * Lazy clear (from zako.opt.mixin.gl.GlCommandEncoderClearMixin).
  * TBO cache (from zako.opt.gl.TexBufferCache + the TexBufferMixin).
  * RenderTypes cache (from zako.opt.mixin.gl.RenderTypesMixin).
- All three gated on OptimizeToggles.microOpts() (the Stage 1 'micro_opts'
  toggle wired in Optimize.java).
- Includes test helpers (resetForTesting, boundTboTextureForTesting,
  cachedRenderTypeCountForTesting).

Three new mixins (mixins/optimize/):
- RenderTypesMixin: WrapOperation on RenderTypes.entityTranslucent's
  BiFunction.apply — cache by Identifier when flag=true (the common case).
  Drops the per-call Objects.hash(Pair) hit.
- GlCommandEncoderClearMixin: WrapOperation on GlCommandEncoder's
  clearColorAndDepthTextures → GlStateManager._glBindFramebuffer — skip the
  bind-framebuffer-0 because the next render pass binds its own target
  anyway and GlStateManager's cache already skips redundant binds.
- GlCommandEncoderTexBufferMixin: WrapOperation on GlCommandEncoder's
  trySetup → glBindTexture (track bound) and glTexBuffer (skip re-attach
  when the same (format, buffer) pair is already attached). Re-attaching
  makes the driver revalidate the texture (clouds: ~2% of a frame).

lovisual.mixins.json:
- Register all three mixins + OptimizeDebugHudMixin in the 'client' array,
  alphabetically under optimize.* (before accessors.*).

OptimizeDebugHudMixin (mixins/optimize/OptimizeDebugHudMixin.java):
- F3 overlay for the Optimize layer — Stage 2 of the design doc.
- Adds three blocks of lines to F3 (after the existing LoVisual Engine block):
  * 'LoVisual Optimize' — toggles summary + budget mode + scale + frame time.
  * 'frame:' — EMA-averaged per-section timings (entities/particles/HUD/effects/text).
  * 'props:' — when any -Dlovisual.opt.* is set, list which ones.
- Mirrors the existing hud.DebugHudMixin pattern (ModifyArg on extractLines).

Tests (JUnit 5): 11 new tests in GlRenderBackendOpsTest — pure-logic pieces
of RenderBackendOps + Identifier equality/hash. Total suite: 849 tests,
0 failures. checkFolderLimit: OK (0 folders >4).
2026-10-10 18:53:38 +02:00
f4e15b45c9
fix: CI workflow, password reset flow, health/limits in services, session refactor, dead mixin stub cleanup 2026-10-09 19:21:17 +02:00
8bc884c297
feat(mod): GodRays, Knife melee skins, Wings Bedrock models, EnchantGlint animated styles, shader theme backdrop
- GodRays: PostProcessPass PRE_HAND, godrays.frag (radial sky blur to the sun over the scene, depth from mainDepth),
  GodRaysUniforms, GodRaysSkyMixin takes sunAngle/sunset colour from SkyRenderState; off under shaderpacks (Iris)
- Knife (Melee Skins): 33 skins from Bedrock geo/anim in assets/lovisual/knife, animator (static_idle, draw/inspect/melee/run,
  0.2 s crossfade, Catmull-Rom) with background baking, first/third-person render, sounds, mixins ItemInHand/PlayerItemInHand/Minecraft
- Wings: wingSource Procedural/Model with 14 textured Bedrock models (WingModelDef/WingModels/WingModelRenderer, BedrockClip +
  procedural angel/demon/dragon); shared Bedrock parser util/bedrock (GeoParser, GeoFaces, Channel, Clip)
- EnchantGlint: Pulse/Fire/Galaxy/Hologram/Glitch/Sparkle/Aurora styles in glint/style, coverage setting, custom animated
  texture matrix via GlintTextureMixin.styleMotion; lang en/ru for all new settings
- Themes: shader backdrop for ClickGUI (Backdrop record, 6 modes, intensity/speed/scale, ui_theme_backdrop_batch.frag with
  700 ms REVEAL/ERASE wipe, ThemeBackdrop2D in BackgroundComponent), ThemeEntry.backdrop persisted in JSON and profile codec,
  6 presets with backdrops, backdrop settings in the theme editor
- tests: GodRaysSun, GlintStyles, Knife assets/animator, WingModel, Backdrop, bedrock Channel; ./gradlew build green
2026-10-05 19:55:49 +02:00
6c641c4a94
feat(mod): P1 modules (AutoSprint, TotemCounter, EnchantGlint, ArmorColor, PlaceAnimation), CustomModels, KineticLyrics fix
- AutoSprint, TotemCounter, EnchantGlint (styles, texture repaint, scroll speed/scale mixin), ArmorColor (durability colouring, targets, pulse),
  PlaceAnimation (block slides in from the hand; chunk-mesh hiding incl. Sodium, moving-block render), aligned with evo behaviour
- CustomModels: Chicken, Rabbit and Verity (Blockbench) models for chosen players, bundled assets, render-state carrier + submit redirect
- KineticLyrics: fix track key wiped by reset() (lyrics never applied, lrclib hammered every tick); new LyricsFinder with ranked lrclib search,
  unsynced timing estimate, NetEase fallback and retry on busy services; tests for the pure parts
- fix mode()/modeSetting() misuse for new modules; TODO updated
2026-10-02 19:54:27 +02:00
60b4fedb29
feat(mod): align ElytraTrails and Blizzard with evo (real wing-tip matrices, ribbon styles, ground-aware snow, whiteout fog, hide vanilla weather), spec tests 2026-10-02 15:58:33 +02:00
a4638d386d
fix(mod): SpatialGui transparent inventory (no dim overlay in capture, premultiplied composite) 2026-10-02 13:55:27 +02:00
0504be5b57
feat(mod): scripted HoldMyItems on LuaJ (hand/item/model scripts, addons, vanilla overrides, particles, camera)
Claude-Session: https://claude.ai/code/session_01F1M1Jic1wTSn4igUENynmZ
2026-10-02 09:47:30 +02:00
e00ea8eb11
feat: frontend perf and a11y pass, plus mod visuals, hero main menu, Simple Voice Chat and vanilla chat autocomplete
Frontend:
- replace the i18next stack with a small typed i18n module
- hero clouds removed, llms.txt, HUD widget ARIA fixes and tests

Mod:
- TargetESP constellation mode; tracker and colors extracted
- JumpCircles: 7 new shapes, shared animation and color pipeline
- KillEffect blood mode with Burst/Fountain/Ring/Spray styles
- main menu: menuLayout setting (orbs/hero) and hero screen
- Simple Voice Chat soft integration: VoiceChat module and HUD panel
- renderer/quick: static Draw facade with glass outline
- vanilla chat: Baritone-style autocomplete popup for the % command prefix
2026-10-01 21:29:54 +02:00
10d90dce93 feat(mod): backend integration, module cleanup, and SpatialGui port 2026-09-28 10:17:36 +02:00
9d08fa910a chore(history): squash 59 commit(s) from 2026-09-23
- refactor(hud/weather/render): Scoreboard 931→240 + Rain 903→159 + UiMeshGeometry 956→99 (8.5.2)
- refactor(chams): Chams 985 → 129 + 4×≤195 (8.5.2)
- refactor(module): Module 1031 → 139 + 4×≤134 (8.5.2)
- refactor(tooltips): BetterTooltips 960 → 181 + 4×≤199 (8.5.2)
- refactor(clickgui): ClickGuiPickerState 970→166 + ModulesMenuScreen 966→145 (8.5.2)
- refactor(clickgui): CombatProtocolHeuristicsEditorState 932→79 + 4×≤192 (8.5.2)
- refactor(hud): CompactHudStatModel 894 → 125 + 4×≤175 (8.5.2)
- refactor(iris): ShaderPatchCompiler 843→66 + 4×≤174 (8.5.2)
- refactor(tab): CustomTabList 834→136 + 4×≤166 (8.5.2)
- refactor(relations): OnlineRelationPlayerPickerComponent 837→74 + 4×≤192 (8.5.2)
- refactor(hits): HitEffect 770→120 + 4×≤176 (8.5.2)
- refactor(predict): Predictions 815→150 + 4×≤195 (8.5.2)
- refactor(config): ConfigProfilesComponent 799→125 + 4×≤195 (8.5.2)
- refactor(sim): PlayerMovementSimulation 757→157 + 4×≤194 (8.5.2)
- refactor(predict): ProjectilePuncher 747→104 + 3×≤134 (8.5.2)
- refactor(crosshair): Crosshair 743→143 + 4×≤167 (8.5.2)
- refactor(mediaplayer): MediaPlayer 743→174 + 4×≤196 (8.5.2)
- refactor(hud): Itemizer 699→193 + Cooldowns 707→151 (8.5.2)
- refactor(hud): Potions 617→176 + 4×≤166 (8.5.2)
- refactor(hud): Admins 702→118 + 4×≤138 (8.5.2)
- refactor(hud): Keybinds 611→157 + 4×≤160 (8.5.2)
- refactor(hud): ModuleList 499→181 + 3×≤150 (8.5.2)
- refactor(hud): Radar 392→161 + 2×≤124 (8.5.2)
- refactor(hud): Fps 309→168 + 3×≤107 (8.5.2)
- refactor(hud): Memory 304→151 + 3×≤144 (8.5.2)
- refactor(hud): Tps 339→154 + 3×≤143 (8.5.2)
- refactor(hud): Ping 309→145 + 3×≤125 (8.5.2)
- refactor(hud): SpeedBps 334→156 + 3×≤142 (8.5.2)
- refactor(hud): GameTime 314→150 + 3×≤127 (8.5.2)
- refactor(hud): SystemTime 300→136 + 3×≤130 (8.5.2)
- refactor(hud): Coordinates 337→174 + 2×≤172 (8.5.2)
- refactor(hud): Armor 324→162 + 2×≤148 (8.5.2)
- refactor(hud): Inventory 476→153 + 3×≤181 (8.5.2)
- docs(todo): обновлён 8.5.2 — отмечены готовые гиганты (BetterButtons/InventorySwap/Svg/Темы/WorldParticles/Module/Chams и хвост)
- docs(api): папка combatant-client-26.2/docs + addons.md (API можно ломать при рефакторе)
- refactor(visuals): BlockHighlight 692→271 + 4×≤200 (8.5.2)
- refactor(mixins): GameRendererMixin 830→344 (хуки) + 4 хелпера (8.5.2)
- refactor(visuals): WorldParticles 821→260 + 6×≤200, режимы добиты (8.5.2)
- docs(todo): 8.5.2 — WorldParticles/GameRendererMixin/BlockHighlight отмечены ГОТОВО
- refactor(render): MeshBuilder 738→447 (фасад write-API) + 3 хелпера, FrameStats снесён (8.5.2)
- docs(todo): Фаза 10 — дизайн платформы (аккаунты/конфиги/аватарки), backlog RPC-чата
- docs(todo): Подсистема 3 — Аддоны 2.0 (скрипты/версии) + витрина аддонов + админка
- docs(todo): Подсистема 2 — RPC-чат/друзья/виджеты-телеметрия + рейт-лимиты, доп. правки Подсистемы 3
- chore: переименование combatant-client-26.2 -> mod, добавлены backend/ и frontend/
- docs(backend): implementation plan for accounts-service (Подсистема 1, часть 1)
- chore: пересоздать backend/frontend через cargo new и bun create vite + tailwind; убрать таблицу компонентов из TODO.md
- docs(backend): edition 2024 в плане вместо 2021
- chore: обновить версии до реально актуальных (проверено компиляцией)
- docs: правила платформы (лимит 250 строк, антипаттерны backend/frontend по итогам ресёрча) + frontend/ARCHITECTURE.md
- docs: добавить правило ≤4 файла на папку в правила платформы (backend/frontend)
- docs: commit messages in English from now on
- chore: gitignore .superpowers/ scratch directory
- docs: commit messages in English from now on (mod)
- feat(backend): scaffold accounts-service with health check
- chore(backend): remove target/ build artifacts from git, add gitignore
- chore: track docs/ in git (was accidentally gitignored, never committed)
- chore(backend): convert to Cargo workspace, plan full microservice layout
- feat(backend): accounts/avatars/device_links schema + migration
- feat(backend): argon2id password hashing
2026-09-23 22:38:08 +02:00
Renamed from combatant-client-26.2/src/main/resources/lovisual.mixins.json (Browse further)