Class EnchantmentBreaking

java.lang.Object
net.minecraft.world.item.enchantment.Enchantment
org.cyclops.evilcraft.enchantment.EnchantmentBreaking
All Implemented Interfaces:
net.minecraftforge.common.extensions.IForgeEnchantment

public class EnchantmentBreaking extends net.minecraft.world.item.enchantment.Enchantment
Enchantment for letting tools break tools faster.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.enchantment.Enchantment

    net.minecraft.world.item.enchantment.Enchantment.Rarity
  • Field Summary

    Fields inherited from class net.minecraft.world.item.enchantment.Enchantment

    category, descriptionId
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    amplifyDamage(net.minecraft.world.item.ItemStack itemStack, int enchantmentListID, Random random)
    Used by ItemStack.attemptDamageItem.
    void
    breakingEvent(net.minecraftforge.event.entity.living.LivingAttackEvent event)
     
    void
    breakingEvent(net.minecraftforge.event.level.BlockEvent.BreakEvent event)
     
    boolean
    canApplyAtEnchantingTable(net.minecraft.world.item.ItemStack itemStack)
     
    int
    getMaxCost(int level)
     
    int
     
    int
    getMinCost(int level)
     
    boolean
     
    boolean
     

    Methods inherited from class net.minecraft.world.item.enchantment.Enchantment

    byId, canEnchant, checkCompatibility, doPostAttack, doPostHurt, getDamageBonus, getDamageProtection, getDescriptionId, getFullname, getMinLevel, getOrCreateDescriptionId, getRarity, getSlotItems, isCompatibleWith, isDiscoverable, isTradeable, isTreasureOnly

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeEnchantment

    allowedInCreativeTab, getDamageBonus
  • Constructor Details

    • EnchantmentBreaking

      public EnchantmentBreaking()
  • Method Details

    • breakingEvent

      public void breakingEvent(net.minecraftforge.event.entity.living.LivingAttackEvent event)
    • breakingEvent

      public void breakingEvent(net.minecraftforge.event.level.BlockEvent.BreakEvent event)
    • getMinCost

      public int getMinCost(int level)
      Overrides:
      getMinCost in class net.minecraft.world.item.enchantment.Enchantment
    • getMaxCost

      public int getMaxCost(int level)
      Overrides:
      getMaxCost in class net.minecraft.world.item.enchantment.Enchantment
    • getMaxLevel

      public int getMaxLevel()
      Overrides:
      getMaxLevel in class net.minecraft.world.item.enchantment.Enchantment
    • isCurse

      public boolean isCurse()
      Overrides:
      isCurse in class net.minecraft.world.item.enchantment.Enchantment
    • canApplyAtEnchantingTable

      public boolean canApplyAtEnchantingTable(net.minecraft.world.item.ItemStack itemStack)
      Overrides:
      canApplyAtEnchantingTable in class net.minecraft.world.item.enchantment.Enchantment
    • isAllowedOnBooks

      public boolean isAllowedOnBooks()
      Overrides:
      isAllowedOnBooks in class net.minecraft.world.item.enchantment.Enchantment
    • amplifyDamage

      public static void amplifyDamage(net.minecraft.world.item.ItemStack itemStack, int enchantmentListID, Random random)
      Used by ItemStack.attemptDamageItem. Randomly determines if a point of damage should be amplified using the enchantment level. If the ItemStack is Armor then there is a flat 60% chance for damage to be amplified no matter the enchantment level, otherwise there is a 1-(level/1) chance for damage to be amplified.
      Parameters:
      itemStack - The ItemStack.
      enchantmentListID - Enchantments.
      random - A random object.