return;
double x = posX + (rand.nextDouble() - rand.nextDouble()) * SPAWN_DIST;
double y = (double) (posY + mob.height + rand.nextInt(3));
double z = posZ + (rand.nextDouble() - rand.nextDouble()) * SPAWN_DIST;
EntityLiving living = mob instanceof EntityLiving ? (EntityLiving) mob : null;
mob.setLocationAndAngles(x, y, z, rand.nextFloat() * 360.0F, 0.0F);
if (worldObj.checkNoEntityCollision(mob.boundingBox) && worldObj.getCollidingBoundingBoxes(mob, mob.boundingBox).isEmpty() && !worldObj.isAnyLiquid(mob.boundingBox)) {
if (mob instanceof EntitySkeleton) {
EntitySkeleton skel = (EntitySkeleton) mob;
if (rand.nextInt(4) == 0) {
skel.tasks.addTask(4, new EntityAIAttackOnCollide(skel, EntityPlayer.class, 0.25F, false));
skel.setSkeletonType(1);
skel.setCurrentItemOrArmor(0, new ItemStack(Items.stone_sword));
} else {
skel.tasks.addTask(4, new EntityAIArrowAttack(skel, 0.25F, 60, 10.0F));
skel.setCurrentItemOrArmor(0, new ItemStack(Items.bow));
}
mob.setCurrentItemOrArmor(4, new ItemStack(this.rand.nextFloat() < 0.25F ? Blocks.lit_pumpkin : Blocks.pumpkin));
} else if (living != null)
living.onSpawnWithEgg(null);
this.worldObj.spawnEntityInWorld(mob);
this.worldObj.playAuxSFX(2004, (int) x, (int) y, (int) z, 0);
if (living != null)
living.spawnExplosionParticle();
}
}
}