mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Fixed mobs not going after entities with items that are want it need it but aren't equipment
This commit is contained in:
parent
318ef70228
commit
a3abee6765
1 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,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<LivingEntity> HAS_WANT_IT_NEED_IT = e -> EnchantmentHelper.getEquipmentLevel(UEnchantments.WANT_IT_NEED_IT, e) > 0;
|
||||
Predicate<LivingEntity> HAS_WANT_IT_NEED_IT = e -> {
|
||||
return EnchantmentHelper.getEquipmentLevel(UEnchantments.WANT_IT_NEED_IT, e) > 0
|
||||
|| EnchantmentHelper.getLevel(UEnchantments.WANT_IT_NEED_IT, e.getOffHandStack()) > 0
|
||||
|| EnchantmentHelper.getLevel(UEnchantments.WANT_IT_NEED_IT, e.getMainHandStack()) > 0;
|
||||
};
|
||||
|
||||
Predicate<Entity> VALID_FOR_DISGUISE = EntityPredicates.EXCEPT_SPECTATOR.and(e -> !(e instanceof LightningEntity || e instanceof AbstractDecorationEntity));
|
||||
|
||||
|
|
Loading…
Reference in a new issue