mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed shields not deflecting projectiles
This commit is contained in:
parent
9c71272def
commit
e03fb016d5
1 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,7 @@ import com.minelittlepony.unicopia.item.enchantment.WantItNeedItEnchantment;
|
|||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.decoration.AbstractDecorationEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.projectile.ProjectileEntity;
|
||||
import net.minecraft.entity.vehicle.BoatEntity;
|
||||
import net.minecraft.predicate.entity.EntityPredicates;
|
||||
|
||||
|
@ -34,7 +35,11 @@ public interface EquinePredicates {
|
|||
Predicate<Entity> IS_CASTER = e -> !e.isRemoved() && (e instanceof Caster || IS_PLAYER.test(e));
|
||||
Predicate<Entity> IS_PLACED_SPELL = e -> e instanceof Caster && !e.isRemoved();
|
||||
|
||||
Predicate<Entity> IS_MAGIC_IMMUNE = e -> (e instanceof MagicImmune || !(e instanceof LivingEntity)) && !(e instanceof ItemEntity) && !(e instanceof ExperienceOrbEntity) && !(e instanceof BoatEntity);
|
||||
Predicate<Entity> IS_MAGIC_IMMUNE = e -> (e instanceof MagicImmune || !(e instanceof LivingEntity))
|
||||
&& !(e instanceof ItemEntity)
|
||||
&& !(e instanceof ExperienceOrbEntity)
|
||||
&& !(e instanceof BoatEntity)
|
||||
&& !(e instanceof ProjectileEntity);
|
||||
Predicate<Entity> EXCEPT_MAGIC_IMMUNE = IS_MAGIC_IMMUNE.negate();
|
||||
Predicate<Entity> VALID_LIVING_AND_NOT_MAGIC_IMMUNE = EntityPredicates.VALID_LIVING_ENTITY.and(EXCEPT_MAGIC_IMMUNE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue