Examples of canApplyTogether()


Examples of net.minecraft.enchantment.Enchantment.canApplyTogether()

              canEnchantmentBeAdded = true;
            }
           
            for(Integer existingEnchId : existingEnchantments.keySet())
            {
              if(existingEnchId != addedEnchId && !enchantment.canApplyTogether(Enchantment.enchantmentsList[existingEnchId]))
              {
                canEnchantmentBeAdded = false;
                totalEnchCost += levelDifference;
              }
            }
View Full Code Here

Examples of net.minecraft.enchantment.Enchantment.canApplyTogether()

    if(!ench.canApply(itemToEnchant) || !ench.type.canEnchantItem(itemToEnchant.getItem()))
      return false;

    for(EnchantmentData data : enchants) {
      Enchantment otherEnch = Enchantment.enchantmentsList[data.enchant];
      if(!otherEnch.canApplyTogether(ench) || !ench.canApplyTogether(otherEnch))
        return false;
    }

    return true;
  }
View Full Code Here

Examples of net.minecraft.enchantment.Enchantment.canApplyTogether()

                        Iterator iterator1 = enchantments.keySet().iterator();

                        while (iterator1.hasNext()) {
                            int l2 = ((Integer) iterator1.next()).intValue();

                            if (l2 != j1 && !enchantment.canApplyTogether(Enchantment.enchantmentsList[l2])) {
                                isEnchantmentValid = false;
                                i += k2;
                            }
                        }
View Full Code Here

Examples of net.minecraft.enchantment.Enchantment.canApplyTogether()

            if (j1 == enchantment.effectId &&
                EnchantmentHelper.getEnchantmentLevel(j1, central)>=ench.getMaxLevel())
              return false;
            if (enchantment.effectId != ench.effectId &&
              (!enchantment.canApplyTogether(ench) ||
              !ench.canApplyTogether(enchantment))) {
              return false;
            }
        }
   
    ItemStack i2 = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.