@Override public boolean canMateWith(IAnimal animal) { if (animal.getGender() != this.getGender() && animal.isAdult() && animal.getAnimalTypeID() == this.getAnimalTypeID()) return true; return false; }
public EntityChickenTFC(World world, IAnimal mother, ArrayList<Float> data) { this(world); float father_size = data.get(0); this.posX = ((EntityLivingBase) mother).posX; this.posY = ((EntityLivingBase) mother).posY; this.posZ = ((EntityLivingBase) mother).posZ; size_mod = (((rand.nextInt(degreeOfDiversion + 1) * 10 * (rand.nextBoolean() ? 1 : -1)) / 100f) + 1F) * (1.0F - 0.1F * sex) * (float) Math.sqrt((mother.getSize() + father_size) / 1.9F); size_mod = Math.min(Math.max(size_mod, 0.7F), 1.3f); // We hijack the growingAge to hold the day of birth rather // than number of ticks to next growth event. // this.setAge((int) TFC_Time.getTotalDays()); }