示例#1
0
 /** Returns true if the mob is currently able to mate with the specified mob. */
 public boolean canMateWith(EntityAnimal p_70878_1_) {
   return p_70878_1_ == this
       ? false
       : (p_70878_1_.getClass() != this.getClass()
           ? false
           : this.isInLove() && p_70878_1_.isInLove());
 }
  /** Returns true if the mob is currently able to mate with the specified mob. */
  public boolean canMateWith(EntityAnimal p_70878_1_) {
    if (p_70878_1_ == this) {
      return false;
    } else if (p_70878_1_.getClass() != this.getClass()) {
      return false;
    } else {
      EntityHorse entityhorse = (EntityHorse) p_70878_1_;

      if (this.canMate() && entityhorse.canMate()) {
        int i = this.getHorseType();
        int j = entityhorse.getHorseType();
        return i == j || i == 0 && j == 1 || i == 1 && j == 0;
      } else {
        return false;
      }
    }
  }