Fixed Jungle Spider poison, fixed Ivy and Deathbloom potion effects

This commit is contained in:
Adubbz 2013-07-03 11:30:24 +10:00
parent 9257b7a0db
commit 8da0b655ea
3 changed files with 12 additions and 9 deletions

View file

@ -9,7 +9,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -127,8 +127,10 @@ public class BlockBOPFlower extends BlockFlower
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{
int meta = world.getBlockMetadata(x, y, z);
if (!world.isRemote && meta == 2 && entity instanceof EntityLiving) {
((EntityLiving)entity).addPotionEffect(new PotionEffect(Potion.wither.id, 200));
if (!world.isRemote && meta == 2 && entity instanceof EntityLivingBase)
{
((EntityLivingBase)entity).addPotionEffect(new PotionEffect(Potion.wither.id, 200));
}
if (meta == 11) {

View file

@ -10,7 +10,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -186,8 +186,9 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
{
int meta = par1World.getBlockMetadata(x, y, z);
if (!par1World.isRemote && meta == 7 && par5Entity instanceof EntityLiving) {
((EntityLiving)par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 100));
if (!par1World.isRemote && meta == 7 && par5Entity instanceof EntityLivingBase)
{
((EntityLivingBase)par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 100));
}
}

View file

@ -1,7 +1,7 @@
package biomesoplenty.entities;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.potion.Potion;
@ -31,7 +31,7 @@ public class EntityJungleSpider extends EntitySpider
{
if (super.attackEntityAsMob(par1Entity))
{
if (par1Entity instanceof EntityLiving)
if (par1Entity instanceof EntityLivingBase)
{
byte var2 = 0;
@ -49,7 +49,7 @@ public class EntityJungleSpider extends EntitySpider
if (var2 > 0)
{
((EntityLiving)par1Entity).addPotionEffect(new PotionEffect(Potion.blindness.id, var2 * 20, 0));
((EntityLivingBase)par1Entity).addPotionEffect(new PotionEffect(Potion.blindness.id, var2 * 20, 0));
}
}