2013-06-15 08:46:50 +00:00
|
|
|
package biomesoplenty.entities;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.entity.EntityLiving;
|
|
|
|
import net.minecraft.entity.monster.EntitySpider;
|
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
|
|
|
public class EntityJungleSpider extends EntitySpider
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
public EntityJungleSpider(World par1World)
|
|
|
|
{
|
|
|
|
super(par1World);
|
2013-07-02 03:57:49 +00:00
|
|
|
//texture = "/mods/BiomesOPlenty/textures/mobs/junglespider.png";
|
2013-05-31 10:34:02 +00:00
|
|
|
this.setSize(0.4F, 0.3F);
|
2013-07-02 03:57:49 +00:00
|
|
|
//moveSpeed = 1.1F;
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-07-02 03:57:49 +00:00
|
|
|
/*@Override
|
2013-05-31 10:34:02 +00:00
|
|
|
public int getMaxHealth()
|
|
|
|
{
|
|
|
|
return 8;
|
2013-07-02 03:57:49 +00:00
|
|
|
}*/
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
/**
|
|
|
|
* How large the spider should be scaled.
|
|
|
|
*/
|
2013-07-02 03:57:49 +00:00
|
|
|
/*@Override
|
2013-05-31 10:34:02 +00:00
|
|
|
public float spiderScaleAmount()
|
|
|
|
{
|
|
|
|
return 0.4F;
|
2013-07-02 03:57:49 +00:00
|
|
|
}*/
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public float getShadowSize()
|
|
|
|
{
|
|
|
|
return 0.0F;
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public boolean attackEntityAsMob(Entity par1Entity)
|
|
|
|
{
|
|
|
|
if (super.attackEntityAsMob(par1Entity))
|
|
|
|
{
|
|
|
|
if (par1Entity instanceof EntityLiving)
|
|
|
|
{
|
|
|
|
byte var2 = 0;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
if (worldObj.difficultySetting > 1)
|
|
|
|
{
|
|
|
|
if (worldObj.difficultySetting == 2)
|
|
|
|
{
|
|
|
|
var2 = 7;
|
|
|
|
}
|
|
|
|
else if (worldObj.difficultySetting == 3)
|
|
|
|
{
|
|
|
|
var2 = 15;
|
|
|
|
}
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
if (var2 > 0)
|
|
|
|
{
|
|
|
|
((EntityLiving)par1Entity).addPotionEffect(new PotionEffect(Potion.blindness.id, var2 * 20, 0));
|
|
|
|
}
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize this creature.
|
|
|
|
*/
|
2013-07-02 03:57:49 +00:00
|
|
|
/*@Override
|
|
|
|
public void initCreature() {}*/
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|