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