Ejemplo n.º 1
0
 @Override
 public boolean canMateWith(EntityAnimal par1EntityAnimal) {
   if (par1EntityAnimal == this) {
     return false;
   } else if (!this.isTamed()) {
     return false;
   } else if (!(par1EntityAnimal instanceof GCMarsEntitySlimeling)) {
     return false;
   } else {
     GCMarsEntitySlimeling slimeling = (GCMarsEntitySlimeling) par1EntityAnimal;
     return !slimeling.isTamed()
         ? false
         : slimeling.isSitting() ? false : this.isInLove() && slimeling.isInLove();
   }
 }
Ejemplo n.º 2
0
  @Override
  public boolean func_142018_a(
      EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) {
    if (!(par1EntityLivingBase instanceof EntityCreeper)
        && !(par1EntityLivingBase instanceof EntityGhast)) {
      if (par1EntityLivingBase instanceof GCMarsEntitySlimeling) {
        GCMarsEntitySlimeling slimeling = (GCMarsEntitySlimeling) par1EntityLivingBase;

        if (slimeling.isTamed() && slimeling.func_130012_q() == par2EntityLivingBase) {
          return false;
        }
      }

      return par1EntityLivingBase instanceof EntityPlayer
              && par2EntityLivingBase instanceof EntityPlayer
              && !((EntityPlayer) par2EntityLivingBase)
                  .canAttackPlayer((EntityPlayer) par1EntityLivingBase)
          ? false
          : !(par1EntityLivingBase instanceof EntityHorse)
              || !((EntityHorse) par1EntityLivingBase).isTame();
    } else {
      return false;
    }
  }