Class ModEquipmentTypes

java.lang.Object
com.minecolonies.api.equipment.ModEquipmentTypes

public class ModEquipmentTypes extends Object
Class used for storing and registering any EquipmentTypes.
  • Field Details

  • Constructor Details

    • ModEquipmentTypes

      public ModEquipmentTypes()
  • Method Details

    • getRegistry

      public static net.minecraft.core.Registry<EquipmentTypeEntry> getRegistry()
      Get the equipmentType registry.
      Returns:
      The equipmentType registry
    • vanillaToolLevel

      public static int vanillaToolLevel(net.minecraft.world.item.ItemStack itemStack, EquipmentTypeEntry equipmentType)
      Get the equipment level for vanilla tools.
      Parameters:
      itemStack - The item stack to check
      equipmentType - The type of vanilla tool
      Returns:
      The tool level
    • durabilityBasedLevel

      public static int durabilityBasedLevel(net.minecraft.world.item.ItemStack itemStack, int vanillaItemDurability)
      Get the durability based item level.
      Parameters:
      itemStack - The item stack to check
      Returns:
      The item level
    • initRegisterEquipmentTiers

      public static void initRegisterEquipmentTiers()
      Populate the tier registry with every item currently in the game. Called once during FMLCommonSetupEvent via MineColonies.preInit.
    • canPerformDefaultActions

      public static boolean canPerformDefaultActions(net.minecraft.world.item.ItemStack itemStack, Set<net.neoforged.neoforge.common.ItemAbility> actions)
      Determine whether an item stack can perform the default actions of a given tool.
      Parameters:
      itemStack - The item stack to check
      actions - The set of actions to compare
      Returns:
      Whether the item stack can perform the actions