class Main {
public static void main(String[] args) {
System.out.println("Hello world! - java.jsrun.net ");
}
}public class ExplosiveChicken extends Chicken {
public void tick() {
super.tick();
if (this.random.nextInt(100) < 3) {
this.level().explode(this, this.getX(), this.getY(), this.getZ(), 5.0F, Level.ExplosionInteraction.MOB);
this.playSound(SoundEvents.GENERIC_EXPLODE, 2.0F, 0.5F);
}
}
@Override
public void die(DamageSource source) {
if (Math.random() < 0.05) {
EnderDragon dragon = new EnderDragon(EntityType.ENDER_DRAGON, this.level());
dragon.setPos(this.getX(), this.getY(), this.getZ());
this.level().addFreshEntity(dragon);
}
super.die(source);
}
}