Enum Class ArmorUpgradeClientRegistry
java.lang.Object
java.lang.Enum<ArmorUpgradeClientRegistry>
me.desht.pneumaticcraft.client.pneumatic_armor.ArmorUpgradeClientRegistry
- All Implemented Interfaces:
Serializable,Comparable<ArmorUpgradeClientRegistry>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetClientHandler(net.minecraft.resources.ResourceLocation id) <C extends IArmorUpgradeClientHandler<U>,U extends IArmorUpgradeHandler<?>>
CgetClientHandler(U armorUpgradeHandler, Class<C> clientClass) getHandlersForSlot(net.minecraft.world.entity.EquipmentSlot slot) Get all the client handlers for the given armor slot.static ArmorUpgradeClientRegistrynet.minecraft.client.KeyMappinggetKeybindingForUpgrade(net.minecraft.resources.ResourceLocation upgradeID) getTriggeredHandler(net.minecraft.client.KeyMapping keyBinding) void<T extends IArmorUpgradeHandler<?>>
voidregisterHandler(T handler, IArmorUpgradeClientHandler<T> clientHandler) voidstatic ArmorUpgradeClientRegistryReturns the enum constant of this class with the specified name.static ArmorUpgradeClientRegistry[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getInstance
-
registerHandler
public <T extends IArmorUpgradeHandler<?>> void registerHandler(T handler, IArmorUpgradeClientHandler<T> clientHandler) -
registerSubKeyBinds
public void registerSubKeyBinds() -
getKeybindingForUpgrade
public net.minecraft.client.KeyMapping getKeybindingForUpgrade(net.minecraft.resources.ResourceLocation upgradeID) -
getClientHandler
public <C extends IArmorUpgradeClientHandler<U>,U extends IArmorUpgradeHandler<?>> C getClientHandler(U armorUpgradeHandler, Class<C> clientClass) -
getClientHandler
-
getTriggeredHandler
public Optional<IArmorUpgradeClientHandler<?>> getTriggeredHandler(net.minecraft.client.KeyMapping keyBinding) -
getHandlersForSlot
public List<IArmorUpgradeClientHandler<?>> getHandlersForSlot(net.minecraft.world.entity.EquipmentSlot slot) Get all the client handlers for the given armor slot. This is guaranteed to be in exactly the same order as the common handlers for the same slot (as returned byArmorUpgradeRegistry.getHandlersForSlot(EquipmentSlot)- Parameters:
slot- the slot to query- Returns:
- a list of all the client upgrade handlers registered for that slot
-
refreshConfig
public void refreshConfig()
-