You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			63 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Java
		
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Java
		
	
package net.minecraft.entity.monster;
 | 
						|
 | 
						|
import net.minecraft.entity.Entity;
 | 
						|
import net.minecraft.entity.EntityLivingBase;
 | 
						|
import net.minecraft.entity.IEntityLivingData;
 | 
						|
import net.minecraft.entity.SharedMonsterAttributes;
 | 
						|
import net.minecraft.potion.Potion;
 | 
						|
import net.minecraft.potion.PotionEffect;
 | 
						|
import net.minecraft.world.EnumDifficulty;
 | 
						|
import net.minecraft.world.World;
 | 
						|
 | 
						|
public class EntityCaveSpider extends EntitySpider
 | 
						|
{
 | 
						|
    private static final String __OBFID = "CL_00001683";
 | 
						|
 | 
						|
    public EntityCaveSpider(World p_i1732_1_)
 | 
						|
    {
 | 
						|
        super(p_i1732_1_);
 | 
						|
        this.setSize(0.7F, 0.5F);
 | 
						|
    }
 | 
						|
 | 
						|
    protected void applyEntityAttributes()
 | 
						|
    {
 | 
						|
        super.applyEntityAttributes();
 | 
						|
        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(12.0D);
 | 
						|
    }
 | 
						|
 | 
						|
    public boolean attackEntityAsMob(Entity p_70652_1_)
 | 
						|
    {
 | 
						|
        if (super.attackEntityAsMob(p_70652_1_))
 | 
						|
        {
 | 
						|
            if (p_70652_1_ instanceof EntityLivingBase)
 | 
						|
            {
 | 
						|
                byte b0 = 0;
 | 
						|
 | 
						|
                if (this.worldObj.difficultySetting == EnumDifficulty.NORMAL)
 | 
						|
                {
 | 
						|
                    b0 = 7;
 | 
						|
                }
 | 
						|
                else if (this.worldObj.difficultySetting == EnumDifficulty.HARD)
 | 
						|
                {
 | 
						|
                    b0 = 15;
 | 
						|
                }
 | 
						|
 | 
						|
                if (b0 > 0)
 | 
						|
                {
 | 
						|
                    ((EntityLivingBase)p_70652_1_).addPotionEffect(new PotionEffect(Potion.poison.id, b0 * 20, 0));
 | 
						|
                }
 | 
						|
            }
 | 
						|
 | 
						|
            return true;
 | 
						|
        }
 | 
						|
        else
 | 
						|
        {
 | 
						|
            return false;
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    public IEntityLivingData onSpawnWithEgg(IEntityLivingData p_110161_1_)
 | 
						|
    {
 | 
						|
        return p_110161_1_;
 | 
						|
    }
 | 
						|
} |