use of net.glowstone.entity.monster.GlowBlaze in project Glowstone by GlowstoneMC.
the class GlowSnowball method collide.
/**
* Process collide with a living entity.
*
* @param entity the eneity that the snowball collides with
*/
@Override
public void collide(LivingEntity entity) {
ProjectileSource source = getShooter();
// the entity receives fake damage.
if (source instanceof Entity) {
if (entity instanceof GlowBlaze) {
entity.damage(3, (Entity) source, EntityDamageEvent.DamageCause.PROJECTILE);
} else {
entity.damage(0, (Entity) source, EntityDamageEvent.DamageCause.PROJECTILE);
}
} else {
entity.damage(0, EntityDamageEvent.DamageCause.PROJECTILE);
}
collide(location.getBlock());
}
Aggregations