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();
}
Aggregations