From eebf126bac2203d9cd82e5ef0ba16b33fc31ba12 Mon Sep 17 00:00:00 2001 From: MrSphay Date: Thu, 7 May 2026 17:25:12 +0200 Subject: [PATCH] Fix channel lowpass source shadow --- docs/agent-handoff.md | 3 +++ .../explosionoverhaul/mixin/ChannelLowpassMixin.java | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/agent-handoff.md b/docs/agent-handoff.md index 1b3a69b..7a2efe8 100644 --- a/docs/agent-handoff.md +++ b/docs/agent-handoff.md @@ -25,6 +25,7 @@ The Gitea runner has been used for: - Updated the `ExplosionMixin` complex constructor injection descriptor for Minecraft `1.21.1` after a client bootstrap crash showed the old Forge `1.20.1` constructor target no longer exists. - Updated `GameRendererBlurMixin` render callback and invoke descriptors for Minecraft `1.21.1` after the next client crash showed `GameRenderer#render` now receives `DeltaTracker, boolean`. - Replaced client tick subscriber parameters that used the temporary `compat.TickEvent.ClientTickEvent` placeholder with NeoForge `ClientTickEvent.Post` after mod loading rejected non-Event subscriber parameters. +- Updated `ChannelLowpassMixin` to shadow `Channel#source` instead of the old obfuscated `f_83642_` field after the sound engine failed to apply the mixin. - Fixed runner setup issues: - executable `gradlew` - tracked `gradle-wrapper.jar` @@ -38,6 +39,7 @@ The Gitea runner has been used for: | `git diff --check` | PASS after NeoForge `21.1.225` metadata change and `ExplosionMixin` runtime crash fix | | `git diff --check` | PASS after `GameRendererBlurMixin` runtime crash fix | | `git diff --check` | PASS after client tick subscriber event migration | +| `git diff --check` | PASS after `ChannelLowpassMixin` source field migration | | Gitea decompile workflow | PASS | | Gitea build workflow | FAIL, now reaches Java API migration errors | @@ -69,6 +71,7 @@ The remaining failures are real Forge-to-NeoForge/API-porting work, not runner s 5. Retest the client jar after the `ExplosionMixin` descriptor fix; the next crash, if any, should be a later runtime/API issue rather than the bootstrap constructor mismatch. 6. Retest the client jar after the `GameRendererBlurMixin` descriptor fix; the next crash, if any, should be the next stale mixin/API target. 7. Retest the client jar after the client tick event migration; the next crash, if any, should be a later mod-loading/runtime issue. +8. Retest the client jar after the `ChannelLowpassMixin` source field migration; watch for remaining audio mixin/accessor issues. ## Risks diff --git a/src/main/java/com/vinlanx/explosionoverhaul/mixin/ChannelLowpassMixin.java b/src/main/java/com/vinlanx/explosionoverhaul/mixin/ChannelLowpassMixin.java index 452a7bf..9319e44 100644 --- a/src/main/java/com/vinlanx/explosionoverhaul/mixin/ChannelLowpassMixin.java +++ b/src/main/java/com/vinlanx/explosionoverhaul/mixin/ChannelLowpassMixin.java @@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class ChannelLowpassMixin { @Shadow @Final - private int f_83642_; + private int source; @Inject(method={"play"}, at={@At(value="HEAD")}) private void onPlay(CallbackInfo ci) { @@ -28,7 +28,7 @@ public class ChannelLowpassMixin { SoundEngineAudioQueue.drainNow(); } if (active) { - SoundEngineAudioQueue.enqueueAudio(() -> LowPassConcussionEffect.attachFilterToSource(this.f_83642_)); + SoundEngineAudioQueue.enqueueAudio(() -> LowPassConcussionEffect.attachFilterToSource(this.source)); if ("Sound engine".equals(Thread.currentThread().getName())) { SoundEngineAudioQueue.drainNow(); } @@ -42,10 +42,10 @@ public class ChannelLowpassMixin { @Inject(method={"stop"}, at={@At(value="HEAD")}) private void onStop(CallbackInfo ci) { if (SoundPhysicsCompatibility.isCompatibilityEnabled()) { - SoundPhysicsCompatibility.onSourceStop(this.f_83642_); + SoundPhysicsCompatibility.onSourceStop(this.source); } try { - SoundEngineAudioQueue.enqueueAudio(() -> LowPassConcussionEffect.detachFilterFromSource(this.f_83642_)); + SoundEngineAudioQueue.enqueueAudio(() -> LowPassConcussionEffect.detachFilterFromSource(this.source)); if ("Sound engine".equals(Thread.currentThread().getName())) { SoundEngineAudioQueue.drainNow(); }