Fix Explosion mixin for 1.21.1
All checks were successful
Build / build (push) Successful in 9m1s

This commit is contained in:
2026-05-07 12:48:21 +02:00
parent 5f3338e8a7
commit 3187c671a2
5 changed files with 13 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
## Project ## 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: Repository:
@@ -30,7 +30,7 @@ gradlew.bat runClient
## Stack ## 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 ## Build Artifacts

View File

@@ -2,7 +2,7 @@
## Current State ## 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: The Gitea runner has been used for:
@@ -22,6 +22,7 @@ The Gitea runner has been used for:
- Repaired CFR control-flow artifacts in: - Repaired CFR control-flow artifacts in:
- `AsyncCraterManager` - `AsyncCraterManager`
- `BlockIndexManager` - `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: - Fixed runner setup issues:
- executable `gradlew` - executable `gradlew`
- tracked `gradle-wrapper.jar` - tracked `gradle-wrapper.jar`
@@ -32,6 +33,7 @@ The Gitea runner has been used for:
| Check | Result | | Check | Result |
| --- | --- | | --- | --- |
| `git diff --check` | PASS before last committed source fixes | | `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 decompile workflow | PASS |
| Gitea build workflow | FAIL, now reaches Java API migration errors | | 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`. 2. Migrate packet registration and all packet handlers away from Forge `SimpleChannel` / `NetworkEvent.Context`.
3. Replace GUI overlay events and config screen registration. 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. 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 ## Risks

View File

@@ -18,7 +18,7 @@ minecraft_version=1.21.1
# as they do not follow standard versioning conventions. # as they do not follow standard versioning conventions.
minecraft_version_range=[1.21.1] minecraft_version_range=[1.21.1]
# The Neo version must agree with the Minecraft version to get a valid artifact # 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 # The loader version range can only use the major version of FML as bounds
loader_version_range=[1,) loader_version_range=[1,)

View File

@@ -8,7 +8,10 @@ import com.vinlanx.explosionoverhaul.api.IExplosionPower;
import com.vinlanx.explosionoverhaul.mixinhelper.ExplosionAccessor; import com.vinlanx.explosionoverhaul.mixinhelper.ExplosionAccessor;
import java.util.List; import java.util.List;
import net.minecraft.core.BlockPos; 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.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Explosion;
@@ -55,8 +58,8 @@ ExplosionAccessor {
this.explosionPower = power; this.explosionPower = power;
} }
@Inject(method={"<init>(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")}) @Inject(method={"<init>(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, CallbackInfo ci) { 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<SoundEvent> explosionSound, CallbackInfo ci) {
this.explosionPower = power; this.explosionPower = power;
} }

View File

@@ -18,7 +18,7 @@ config="explosionoverhaul.mixins.json"
[[dependencies.${mod_id}]] [[dependencies.${mod_id}]]
modId="neoforge" modId="neoforge"
type="required" type="required"
versionRange="[21.1.228,)" versionRange="[${neo_version},)"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"