Search in sources :

Example 6 with PigZombie

use of org.bukkit.entity.PigZombie in project Glowstone by GlowstoneMC.

the class GlowPig method damage.

@Override
public void damage(double amount, Entity source, @NotNull DamageCause cause) {
    if (!DamageCause.LIGHTNING.equals(cause)) {
        super.damage(amount, source, cause);
        return;
    }
    PigZombie pigZombie = world.spawn(this.location, PigZombie.class);
    pigZombie.damage(amount, source, cause);
    remove();
}
Also used : PigZombie(org.bukkit.entity.PigZombie)

Aggregations

PigZombie (org.bukkit.entity.PigZombie)6 Entity (org.bukkit.entity.Entity)5 UndoList (com.elmakers.mine.bukkit.api.block.UndoList)4 Location (org.bukkit.Location)4 Ageable (org.bukkit.entity.Ageable)4 LivingEntity (org.bukkit.entity.LivingEntity)4 Player (org.bukkit.entity.Player)4 Slime (org.bukkit.entity.Slime)4 Zombie (org.bukkit.entity.Zombie)4 Skeleton (org.bukkit.entity.Skeleton)3 MageController (com.elmakers.mine.bukkit.api.magic.MageController)2 Target (com.elmakers.mine.bukkit.utility.Target)2 GlowWorld (net.glowstone.GlowWorld)1 BedEntity (net.glowstone.block.entity.BedEntity)1 BlockEntity (net.glowstone.block.entity.BlockEntity)1 GlowBed (net.glowstone.block.entity.state.GlowBed)1 Biome (org.bukkit.block.Biome)1 Block (org.bukkit.block.Block)1 Creature (org.bukkit.entity.Creature)1 Bed (org.bukkit.material.Bed)1