package common.entity.npc;

import common.model.ParticleType;
import common.world.World;

public class EntityMagma extends EntitySlime
{
    public EntityMagma(World worldIn)
    {
        super(worldIn);
//        this.fireImmune = true;
    }

    public boolean isImmuneToFire()
    {
        return true;
    }

//    protected void applyEntityAttributes()
//    {
//        super.applyEntityAttributes();
//        this.getEntityAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.20000000298023224D);
//    }

    /**
     * Checks if the entity's current position is a valid location to spawn this entity.
     */
    public boolean getCanSpawnHere()
    {
        return true; // this.worldObj.getDifficulty() != Difficulty.PEACEFUL;
    }

//    /**
//     * Checks that the entity is not colliding with any blocks / liquids
//     */
//    public boolean isNotColliding()
//    {
//        return this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox(), this) && this.worldObj.getCollidingBoundingBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.worldObj.isAnyLiquid(this.getEntityBoundingBox());
//    }

//    /**
//     * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
//     */
//    public int getTotalArmorValue()
//    {
//        return this.getSlimeSize() * 3;
//    }

//    public int getBrightnessForRender(float partialTicks)
//    {
//        return 15728880;
//    }
//
//    /**
//     * Gets how bright this entity is.
//     */
//    public float getBrightness(float partialTicks)
//    {
//        return 1.0F;
//    }

    protected ParticleType getParticleType()
    {
        return ParticleType.FLAME;
    }

    protected EntitySlime createInstance()
    {
        return new EntityMagma(this.worldObj);
    }

//    protected Item getDropItem()
//    {
//        return Items.magma_cream;
//    }

//    /**
//     * Drop 0-2 items of this living's type
//     *  
//     * @param wasRecentlyHit true if this this entity was recently hit by appropriate entity (generally only if player
//     * or tameable)
//     * @param lootingModifier level of enchanment to be applied to this drop
//     */
//    protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier)
//    {
//        Item item = this.getDropItem();
//
//        if (item != null && this.getSlimeSize() > 1)
//        {
//            int i = this.rand.range(-2, 1);
//
//            if (lootingModifier > 0)
//            {
//                i += this.rand.zrange(lootingModifier + 1);
//            }
//
//            for (int j = 0; j < i; ++j)
//            {
//                this.dropItem(item, 1);
//            }
//        }
//    }

//    /**
//     * Returns true if the entity is on fire. Used by render to add the fire effect on rendering.
//     */
//    public boolean isBurning()
//    {
//        return false;
//    }

//    /**
//     * Gets the amount of time the slime needs to wait between jumps.
//     */
//    protected int getJumpDelay()
//    {
//        return super.getJumpDelay() * 4;
//    }

//    protected void alterSquishAmount()
//    {
//        this.squishAmount *= 0.9F;
//    }

//    /**
//     * Causes this entity to do an upwards motion (jumping).
//     */
//    protected void jump()
//    {
//        this.motionY = 0.67;
//        this.isAirBorne = true;
//    }

    protected void handleJumpLava()
    {
        this.motionY = 0.345;
        this.isAirBorne = true;
    }

//    /**
//     * Indicates weather the slime is able to damage the player (based upon the slime's size)
//     */
//    public boolean canDamagePlayer()
//    {
//        return true;
//    }

//    /**
//     * Gets the amount of damage dealt to the player when "attacked" by the slime.
//     */
//    protected int getAttackStrength()
//    {
//        return super.getAttackStrength() + 2;
//    }

//    /**
//     * Returns the name of the sound played when the slime jumps.
//     */
//    protected String getJumpSound()
//    {
//        return this.getSlimeSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small";
//    }

//    /**
//     * Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size)
//     */
//    protected boolean makesSoundOnLand()
//    {
//        return true;
//    }
    
	public int getColor() {
		return 0xee9300;
	}
}
