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);