Fixed the focused/unfocused forms of magic missile (whoops)

This commit is contained in:
Sollace 2021-01-29 19:02:04 +02:00
parent b43ed1975b
commit 615e4c3788

View file

@ -102,7 +102,7 @@ public class ShieldSpell extends AbstractRangedAreaSpell implements Attached {
Entity owner = source.getMaster();
boolean ownerIsValid = source.getAffinity() != Affinity.BAD && EquinePredicates.PLAYER_UNICORN.test(owner);
boolean ownerIsValid = source.getAffinity() != Affinity.BAD && (EquinePredicates.PLAYER_UNICORN.test(owner) && owner.isSneaking());
return source.findAllEntitiesInRange(radius)
.filter(entity -> {
@ -115,8 +115,7 @@ public class ShieldSpell extends AbstractRangedAreaSpell implements Attached {
|| ProjectileUtil.isFlyingProjectile(entity)
|| entity instanceof AbstractMinecartEntity)
&& !(entity instanceof ArmorStandEntity)
&& !(owner.isConnectedThroughVehicle(entity))
&& !(ownerIsValid && Pony.equal(entity, owner));
&& !(ownerIsValid && (Pony.equal(entity, owner) || owner.isConnectedThroughVehicle(entity)));
})
.collect(Collectors.toList());
}