From 3187c671a22604ea9be4535e3ba277a90ee1b09a Mon Sep 17 00:00:00 2001 From: MrSphay Date: Thu, 7 May 2026 12:48:21 +0200 Subject: [PATCH] Fix Explosion mixin for 1.21.1 --- .codex/project.md | 4 ++-- docs/agent-handoff.md | 5 ++++- gradle.properties | 2 +- .../vinlanx/explosionoverhaul/mixin/ExplosionMixin.java | 7 +++++-- src/main/templates/META-INF/neoforge.mods.toml | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.codex/project.md b/.codex/project.md index 5b78d04..870b1ff 100644 --- a/.codex/project.md +++ b/.codex/project.md @@ -2,7 +2,7 @@ ## Project -`Explosion Overhaul` is a private porting workspace for moving the upstream Forge 1.20.1 mod `Explosion Overhaul: A new level of destruction` to NeoForge `21.1.228` for Minecraft `1.21.1`. +`Explosion Overhaul` is a private porting workspace for moving the upstream Forge 1.20.1 mod `Explosion Overhaul: A new level of destruction` to NeoForge `21.1.225` for Minecraft `1.21.1`. Repository: @@ -30,7 +30,7 @@ gradlew.bat runClient ## Stack -Minecraft mod, Java 21, NeoForge `21.1.228`, Minecraft `1.21.1`. +Minecraft mod, Java 21, NeoForge `21.1.225`, Minecraft `1.21.1`. ## Build Artifacts diff --git a/docs/agent-handoff.md b/docs/agent-handoff.md index 8776f8f..808c97f 100644 --- a/docs/agent-handoff.md +++ b/docs/agent-handoff.md @@ -2,7 +2,7 @@ ## Current State -The repository now contains a private NeoForge `21.1.228` / Minecraft `1.21.1` porting scaffold for Explosion Overhaul. +The repository now contains a private NeoForge `21.1.225` / Minecraft `1.21.1` porting scaffold for Explosion Overhaul. The Gitea runner has been used for: @@ -22,6 +22,7 @@ The Gitea runner has been used for: - Repaired CFR control-flow artifacts in: - `AsyncCraterManager` - `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. - Fixed runner setup issues: - executable `gradlew` - tracked `gradle-wrapper.jar` @@ -32,6 +33,7 @@ The Gitea runner has been used for: | Check | Result | | --- | --- | | `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 | | Gitea decompile workflow | PASS | | Gitea build workflow | FAIL, now reaches Java API migration errors | @@ -60,6 +62,7 @@ The remaining failures are real Forge-to-NeoForge/API-porting work, not runner s 2. Migrate packet registration and all packet handlers away from Forge `SimpleChannel` / `NetworkEvent.Context`. 3. Replace GUI overlay events and config screen registration. 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. ## Risks diff --git a/gradle.properties b/gradle.properties index 448e264..0e83cd2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ minecraft_version=1.21.1 # as they do not follow standard versioning conventions. minecraft_version_range=[1.21.1] # The Neo version must agree with the Minecraft version to get a valid artifact -neo_version=21.1.228 +neo_version=21.1.225 # The loader version range can only use the major version of FML as bounds loader_version_range=[1,) diff --git a/src/main/java/com/vinlanx/explosionoverhaul/mixin/ExplosionMixin.java b/src/main/java/com/vinlanx/explosionoverhaul/mixin/ExplosionMixin.java index f563a5c..3d3b73e 100644 --- a/src/main/java/com/vinlanx/explosionoverhaul/mixin/ExplosionMixin.java +++ b/src/main/java/com/vinlanx/explosionoverhaul/mixin/ExplosionMixin.java @@ -8,7 +8,10 @@ import com.vinlanx.explosionoverhaul.api.IExplosionPower; import com.vinlanx.explosionoverhaul.mixinhelper.ExplosionAccessor; import java.util.List; import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.core.particles.ParticleOptions; import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvent; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Explosion; @@ -55,8 +58,8 @@ ExplosionAccessor { this.explosionPower = power; } - @Inject(method={"(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/damagesource/DamageSource;Lnet/minecraft/world/level/ExplosionDamageCalculator;DDDFZLnet/minecraft/world/level/Explosion$BlockInteraction;)V"}, at={@At(value="RETURN")}) - private void capturePowerComplex(Level level, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float power, boolean fire, Explosion.BlockInteraction blockInteraction, CallbackInfo ci) { + @Inject(method={"(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/damagesource/DamageSource;Lnet/minecraft/world/level/ExplosionDamageCalculator;DDDFZLnet/minecraft/world/level/Explosion$BlockInteraction;Lnet/minecraft/core/particles/ParticleOptions;Lnet/minecraft/core/particles/ParticleOptions;Lnet/minecraft/core/Holder;)V"}, at={@At(value="RETURN")}) + private void capturePowerComplex(Level level, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float power, boolean fire, Explosion.BlockInteraction blockInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder explosionSound, CallbackInfo ci) { this.explosionPower = power; } diff --git a/src/main/templates/META-INF/neoforge.mods.toml b/src/main/templates/META-INF/neoforge.mods.toml index 5224893..6e99e55 100644 --- a/src/main/templates/META-INF/neoforge.mods.toml +++ b/src/main/templates/META-INF/neoforge.mods.toml @@ -18,7 +18,7 @@ config="explosionoverhaul.mixins.json" [[dependencies.${mod_id}]] modId="neoforge" type="required" -versionRange="[21.1.228,)" +versionRange="[${neo_version},)" ordering="NONE" side="BOTH"