fixed soulstrider armor applying an effect that reaches towards 0, 0, 0

closes #336
This commit is contained in:
Ell 2023-12-17 18:11:05 +01:00
parent 7b17349917
commit 323fadab82

View file

@ -80,7 +80,7 @@ public class ItemArmor extends ArmorItem implements IModItem {
if (source instanceof LivingEntity)
((LivingEntity) source).addEffect(new MobEffectInstance(MobEffects.WITHER, 40));
} else if (ItemArmor.isFullSetEquipped(entity, ModArmorMaterial.DEPTH)) {
for (var other : entity.level().getEntitiesOfClass(LivingEntity.class, new AABB(entity.position(), Vec3.ZERO).inflate(2))) {
for (var other : entity.level().getEntitiesOfClass(LivingEntity.class, new AABB(entity.position(), entity.position()).inflate(2))) {
if (other != entity && (!(entity instanceof Player player) || !player.isAlliedTo(other)))
other.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 60, 255));
}