private static boolean func_72292_n( World p_72292_0_, int p_72292_1_, int p_72292_2_, int p_72292_3_) { for (Iterator iterator = p_72292_0_ .func_72872_a( net.minecraft.src.EntityOcelot.class, AxisAlignedBB.func_72332_a() .func_72299_a( p_72292_1_, p_72292_2_ + 1, p_72292_3_, p_72292_1_ + 1, p_72292_2_ + 2, p_72292_3_ + 1)) .iterator(); iterator.hasNext(); ) { EntityOcelot entityocelot = (EntityOcelot) iterator.next(); EntityOcelot entityocelot1 = (EntityOcelot) entityocelot; if (entityocelot1.func_70906_o()) { return true; } } return false; }
/** determines if a skeleton spawns on a spider, and if a sheep is a different color */ private static void creatureSpecificInit( EntityLiving par0EntityLiving, World par1World, float par2, float par3, float par4) { if ((par0EntityLiving instanceof EntitySpider) && par1World.rand.nextInt(100) == 0) { EntitySkeleton entityskeleton = new EntitySkeleton(par1World); entityskeleton.setLocationAndAngles(par2, par3, par4, par0EntityLiving.rotationYaw, 0.0F); par1World.spawnEntityInWorld(entityskeleton); entityskeleton.mountEntity(par0EntityLiving); } else if (par0EntityLiving instanceof EntitySheep) { ((EntitySheep) par0EntityLiving) .setFleeceColor(EntitySheep.getRandomFleeceColor(par1World.rand)); } else if ((par0EntityLiving instanceof EntityOcelot) && par1World.rand.nextInt(7) == 0) { for (int i = 0; i < 2; i++) { EntityOcelot entityocelot = new EntityOcelot(par1World); entityocelot.setLocationAndAngles(par2, par3, par4, par0EntityLiving.rotationYaw, 0.0F); entityocelot.setGrowingAge(-24000); par1World.spawnEntityInWorld(entityocelot); } } }