Fixed magic projectiles not affecting falling blocks

This commit is contained in:
Sollace 2024-05-28 14:32:22 +01:00
parent ce48d86fd6
commit 98714556a0
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -14,6 +14,7 @@ import com.minelittlepony.unicopia.entity.mob.UEntities;
import com.minelittlepony.unicopia.item.UItems;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.data.DataTracker;
import net.minecraft.entity.data.TrackedData;
@ -207,7 +208,7 @@ public class MagicProjectileEntity extends ThrownItemEntity implements WeaklyOwn
protected void onEntityHit(EntityHitResult hit) {
Entity entity = hit.getEntity();
if (EquinePredicates.IS_MAGIC_IMMUNE.test(entity)) {
if (!(entity instanceof FallingBlockEntity) && EquinePredicates.IS_MAGIC_IMMUNE.test(entity)) {
return;
}