From 8fd71444d0881630ab05b50008858e3bee52f5ef Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 20 Jun 2023 22:48:21 -0500 Subject: [PATCH] Update changes.md, include magic projectiles in projectile event --- .../ironsspellbooks/entity/spells/AbstractMagicProjectile.java | 2 +- .../ironsspellbooks/entity/spells/fireball/MagicFireball.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/AbstractMagicProjectile.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/AbstractMagicProjectile.java index aeb9c1205..4b2b2d326 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/AbstractMagicProjectile.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/AbstractMagicProjectile.java @@ -73,7 +73,7 @@ public void tick() { } HitResult hitresult = ProjectileUtil.getHitResult(this, this::canHitEntity); - if (hitresult.getType() != HitResult.Type.MISS) { + if (hitresult.getType() != HitResult.Type.MISS && !net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, hitresult)) { onHit(hitresult); } setPos(position().add(getDeltaMovement())); diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/fireball/MagicFireball.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/fireball/MagicFireball.java index d18b788e1..7dca7737d 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/fireball/MagicFireball.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/fireball/MagicFireball.java @@ -1,6 +1,5 @@ package io.redspace.ironsspellbooks.entity.spells.fireball; -import io.redspace.ironsspellbooks.capabilities.magic.MagicManager; import io.redspace.ironsspellbooks.damage.DamageSources; import io.redspace.ironsspellbooks.entity.spells.AbstractMagicProjectile; import io.redspace.ironsspellbooks.registries.EntityRegistry; @@ -8,7 +7,6 @@ import io.redspace.ironsspellbooks.spells.SpellType; import io.redspace.ironsspellbooks.util.ParticleHelper; import io.redspace.ironsspellbooks.util.Utils; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.entity.Entity; @@ -50,7 +48,6 @@ public void trailParticles() { @Override public void impactParticles(double x, double y, double z) { - MagicManager.spawnParticles(level, ParticleTypes.LAVA, x, y, z, 50, .1, .1, .1, 0.5 * getExplosionRadius(), false); } @Override