Class EquipmentTypeEntry.Builder

java.lang.Object
com.minecolonies.api.equipment.registry.EquipmentTypeEntry.Builder
Enclosing class:
EquipmentTypeEntry

public static class EquipmentTypeEntry.Builder extends Object
A builder that can construct new EquipmentTypeEntries.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setRegistryName

      public EquipmentTypeEntry.Builder setRegistryName(net.minecraft.resources.ResourceLocation registryName)
      Set the registry identifier for this equipment type.
      Parameters:
      registryName - The registry identifier
      Returns:
      this
    • setDisplayName

      public EquipmentTypeEntry.Builder setDisplayName(net.minecraft.network.chat.Component displayName)
      Set the display name for the new EquipmentTypeEntry
      Parameters:
      displayName - the new human-readable name
      Returns:
      this
    • setIsEquipment

      public EquipmentTypeEntry.Builder setIsEquipment(BiPredicate<net.minecraft.world.item.ItemStack,EquipmentTypeEntry> isEquipment)
      Set the predicate for determining whether an item stack is the equipment type
      Parameters:
      isEquipment - the predicate
      Returns:
      this
    • setEquipmentLevel

      public EquipmentTypeEntry.Builder setEquipmentLevel(BiFunction<net.minecraft.world.item.ItemStack,EquipmentTypeEntry,Integer> itemLevel)
      Set the function for getting the item level of an item stack for this tool type
      Parameters:
      itemLevel - the function
      Returns:
      this
    • build

      public EquipmentTypeEntry build()
      Constructs the actual EquipmentTypeEntry
      Returns:
      the new EquipmentTypeEntry