Ejemplo n.º 1
0
 public EntitySheep func_90015_b(EntityAgeable par1EntityAgeable) {
   EntitySheep var2 = (EntitySheep) par1EntityAgeable;
   EntitySheep var3 = new EntitySheep(this.worldObj);
   int var4 = this.func_90014_a(this, var2);
   var3.setFleeceColor(15 - var4);
   return var3;
 }
Ejemplo n.º 2
0
 @Override
 protected int setWoolColorAndRender(EntitySheep par1EntitySheep, int par2, float par3) {
   if (par2 == 0 && !par1EntitySheep.getSheared()) {
     func_110776_a(field_110885_a);
     float f = ODNBXlite.oldLightEngine ? par1EntitySheep.getBrightness(par2) : 1.0F;
     int i = par1EntitySheep.getFleeceColor();
     GL11.glColor3f(
         f * EntitySheep.fleeceColorTable[i][0],
         f * EntitySheep.fleeceColorTable[i][1],
         f * EntitySheep.fleeceColorTable[i][2]);
     return 1;
   } else {
     return -1;
   }
 }
Ejemplo n.º 3
0
 /** 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);
     }
   }
 }