Mojira Archive
MC-93018

Wild wolves show breeding hearts but do not breed

Wild wolfs show hearts when feed raw meat.
It's misleading if they are not meant to be breed able.

Or make them breed able, i don't see why not.
Use: Make more wild wolfs for different people to tame.

Same with Ocelots. Fixed some point in 1.14

Code Analysis

Code Analysis provided by [Mod] Anthony Cicinelli

The reasoning this is happening is because in the CanMate boolean method there are two checks for if the wolf is tamed or not. If the wolf isn't tamed it will return false. One possible fix is to remove the checks if it can be tamed or not. The method would then look like this.

Fixed Code

net/minecraft/world/entity/animal/Wolf.java
   public boolean canMate(Animal p_30392_) {
      //Removing the checks for if its tamed is a possible fix for MC-93018
      if (p_30392_ == this) {
         return false;
      } else if (!(p_30392_ instanceof Wolf)) {
         return false;
      } else {
         Wolf wolf = (Wolf)p_30392_;
         if (wolf.isInSittingPose()) {
            return false;
         } else {
            return this.isInLove() && wolf.isInLove();
         }
      }
   }