Class EquipmentTypeEntry.Builder
java.lang.Object
com.minecolonies.api.equipment.registry.EquipmentTypeEntry.Builder
- Enclosing class:
EquipmentTypeEntry
A builder that can construct new EquipmentTypeEntries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs the actual EquipmentTypeEntrysetDisplayName(net.minecraft.network.chat.Component displayName) Set the display name for the new EquipmentTypeEntrysetEquipmentLevel(BiFunction<net.minecraft.world.item.ItemStack, EquipmentTypeEntry, Integer> itemLevel) Set the function for getting the item level of an item stack for this tool typesetIsEquipment(BiPredicate<net.minecraft.world.item.ItemStack, EquipmentTypeEntry> isEquipment) Set the predicate for determining whether an item stack is the equipment typesetRegistryName(net.minecraft.resources.ResourceLocation registryName) Set the registry identifier for this equipment type.
-
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
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
Constructs the actual EquipmentTypeEntry- Returns:
- the new EquipmentTypeEntry
-