/** Returns true if the mob is currently able to mate with the specified mob. */ public boolean canMateWith(EntityAnimal par1EntityAnimal) { if (par1EntityAnimal == this) { return false; } else if (!this.isTamed()) { return false; } else if (!(par1EntityAnimal instanceof EntityWolf)) { return false; } else { EntityWolf var2 = (EntityWolf) par1EntityAnimal; return !var2.isTamed() ? false : (var2.isSitting() ? false : this.isInLove() && var2.isInLove()); } }
protected void a(EntityLiving entityliving, boolean flag) { if (!(entityliving instanceof EntityCreeper) && !(entityliving instanceof EntityGhast)) { if (entityliving instanceof EntityWolf) { EntityWolf entitywolf = (EntityWolf) entityliving; if (entitywolf.isTamed() && this.name.equals(entitywolf.getOwnerName())) { return; } } if (!(entityliving instanceof EntityHuman) || this.C()) { List list = this.world.a( EntityWolf.class, AxisAlignedBB.b( this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D) .grow(16.0D, 4.0D, 16.0D)); Iterator iterator = list.iterator(); while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); EntityWolf entitywolf1 = (EntityWolf) entity; if (entitywolf1.isTamed() && entitywolf1.I() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) { entitywolf1.setSitting(false); entitywolf1.setTarget(entityliving); } } } } }