EnchantmentsByCost
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.item.enchantment.provider.type.EnchantmentsByCost;Implements
EnchantmentsByCost
implements the following interfaces:
Members
Getter
// EnchantmentsByCost.cost as IntProvidermyEnchantmentsByCost.cost
Return Type:
IntProvider
enchant(stack as ItemStack, enchantments as Mutable, random as RandomSource, difficulty as DifficultyInstance)
// EnchantmentsByCost.enchant(stack as ItemStack, enchantments as ItemEnchantmentsMutable, random as RandomSource, difficulty as DifficultyInstance);myEnchantmentsByCost.enchant(myItemStack, myMutable, myRandomSource, myDifficultyInstance);Parameters:
enchantments: ItemEnchantmentsMutable Type: ItemEnchantmentsMutable random: RandomSource Type: RandomSource difficulty: DifficultyInstance Type: DifficultyInstance Getter
myEnchantmentsByCost.enchantments
Return Type:
Enchantment[]
static of(enchantments as Enchantment[], cost as IntProvider) as EnchantmentsByCost
EnchantmentsByCost.of(myEnchantment[], myIntProvider);Parameters:
enchantments: Enchantment[] Type: Enchantment[] cost: IntProvider Type: IntProvider
Return Type:
EnchantmentsByCost