potion cleanup

This commit is contained in:
Sen 2025-03-26 21:07:23 +01:00
parent 460a58e062
commit e108650cd4
30 changed files with 644 additions and 968 deletions

View file

@ -108,7 +108,7 @@ public class EntityBox extends EntityProjectile
//
// if (i > 0)
// {
((EntityLiving)movingObject.entity).addEffect(new PotionEffect(Potion.moveSlowdown.id, 20 * this.rand.range(35, 55), this.rand.chance(1, 2, 5)));
((EntityLiving)movingObject.entity).addEffect(new PotionEffect(Potion.SLOWNESS, 20 * this.rand.range(35, 55), this.rand.chance(1, 2, 5)));
// }
}
}

View file

@ -124,11 +124,13 @@ public class EntityPotion extends EntityThrowable implements IObjectData
for (PotionEffect potioneffect : list)
{
int i = potioneffect.getPotionID();
Potion i = potioneffect.getPotion();
if(!entitylivingbase.isPotionApplicable(i))
continue;
if (Potion.POTION_TYPES[i].isInstant())
if (i.isInstant())
{
Potion.POTION_TYPES[i].affectEntity(this, this.getThrower(), entitylivingbase, potioneffect.getAmplifier(), d1);
i.onImpact(this, this.getThrower(), entitylivingbase, potioneffect.getAmplifier(), d1);
}
else
{