fix potions
This commit is contained in:
parent
821a46b720
commit
669fc77eab
2 changed files with 8 additions and 2 deletions
|
@ -48,7 +48,10 @@ public class EntityMage extends EntityNPC
|
|||
{
|
||||
for (PotionEffect potioneffect : list)
|
||||
{
|
||||
this.addEffect(new PotionEffect(potioneffect));
|
||||
if(potioneffect.getPotion().isInstant())
|
||||
potioneffect.getPotion().onImpact(null, null, this, potioneffect.getAmplifier(), 1.0);
|
||||
else
|
||||
this.addEffect(new PotionEffect(potioneffect));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,10 @@ public class ItemPotion extends Item
|
|||
{
|
||||
for (PotionEffect potioneffect : list)
|
||||
{
|
||||
playerIn.addEffect(new PotionEffect(potioneffect));
|
||||
if(potioneffect.getPotion().isInstant())
|
||||
potioneffect.getPotion().onImpact(null, null, playerIn, potioneffect.getAmplifier(), 1.0);
|
||||
else
|
||||
playerIn.addEffect(new PotionEffect(potioneffect));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue