Examples of StackEnchantment


Examples of net.mcft.copy.betterstorage.utils.StackUtils.StackEnchantment

     
      for (StackEnchantment bookEnch : bookEnchantments) {
        if (!StackUtils.isEnchantmentCompatible(outputStack, stackEnchants.values(), bookEnch))
          continue;
       
        StackEnchantment stackEnch = stackEnchants.get(bookEnch.ench.effectId);

        // Calculate enchantment cost.
        int level = (bookEnch.getLevel() - ((stackEnch != null) ? stackEnch.getLevel() : 0));
        experienceCost += calculateCost(bookEnch, (stackEnch == null), numEnchants);
       
        // Set enchantment level of output item.
        if (stackEnch != null) stackEnch.setLevel(bookEnch.getLevel());
        else outputStack.addEnchantment(bookEnch.ench, bookEnch.getLevel());
       
        canApply = true;
      }
     
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.