Migrate client tick subscribers
All checks were successful
Build / build (push) Successful in 11m0s

This commit is contained in:
2026-05-07 15:15:33 +02:00
parent a4274380cb
commit aeef00f24d
4 changed files with 13 additions and 15 deletions

View File

@@ -24,6 +24,7 @@ The Gitea runner has been used for:
- `BlockIndexManager`
- 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.
- Fixed runner setup issues:
- executable `gradlew`
- tracked `gradle-wrapper.jar`
@@ -36,6 +37,7 @@ The Gitea runner has been used for:
| `git diff --check` | PASS before last committed source fixes |
| `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 |
| Gitea decompile workflow | PASS |
| Gitea build workflow | FAIL, now reaches Java API migration errors |
@@ -66,6 +68,7 @@ The remaining failures are real Forge-to-NeoForge/API-porting work, not runner s
4. Re-run the Gitea build after each API family rather than attempting all files at once.
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.
## Risks

View File

@@ -4,7 +4,7 @@
package com.vinlanx.explosionoverhaul;
import net.neoforged.neoforge.client.event.sound.PlaySoundEvent;
import com.vinlanx.explosionoverhaul.compat.TickEvent;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.bus.api.EventPriority;
import net.neoforged.bus.api.SubscribeEvent;
@@ -18,13 +18,11 @@ public class ClientSoundHandler {
}
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase == TickEvent.Phase.END) {
if (suppressionTicksRemaining > 0) {
--suppressionTicksRemaining;
} else if (suppressionTicksRemaining == 0 && suppressVanillaExplosionSound) {
suppressVanillaExplosionSound = false;
}
public void onClientTick(ClientTickEvent.Post event) {
if (suppressionTicksRemaining > 0) {
--suppressionTicksRemaining;
} else if (suppressionTicksRemaining == 0 && suppressVanillaExplosionSound) {
suppressVanillaExplosionSound = false;
}
}

View File

@@ -10,7 +10,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.TitleScreen;
import net.neoforged.api.distmarker.Dist;
import com.vinlanx.explosionoverhaul.compat.TickEvent;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.common.EventBusSubscriber;
@@ -21,7 +21,7 @@ public class FirstTimeSetupHandler {
private static boolean pendingShowIntro = false;
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
public static void onClientTick(ClientTickEvent.Post event) {
}
static {

View File

@@ -5,7 +5,7 @@ package com.vinlanx.explosionoverhaul.client;
import com.vinlanx.explosionoverhaul.client.IntroMusicManager;
import net.neoforged.api.distmarker.Dist;
import com.vinlanx.explosionoverhaul.compat.TickEvent;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.common.EventBusSubscriber;
@@ -15,10 +15,7 @@ public class IntroMusicTickHandler {
private static long lastTickTime = System.currentTimeMillis();
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) {
return;
}
public static void onClientTick(ClientTickEvent.Post event) {
IntroMusicManager musicManager = IntroMusicManager.getInstance();
if (musicManager.isPlaying() || musicManager.isFadingOut()) {
long currentTime = System.currentTimeMillis();