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

@ -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
{