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

@@ -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={"<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")})
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={"<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, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound, CallbackInfo ci) {
this.explosionPower = power;
}