Record Class ArmorItemRegistryName

java.lang.Object
java.lang.Record
fr.alasdiablo.diolib.api.item.armor.ArmorItemRegistryName
Record Components:
modId - ID of the mod used to create the domaine of the ResourceLocation
name - Actual armor name use to create the complete registry name

public record ArmorItemRegistryName(String modId, String name) extends Record
This record is use as a registry name provider use to create each registry name of an armor set
  • Constructor Details

    • ArmorItemRegistryName

      public ArmorItemRegistryName(String modId, String name)
      Creates an instance of a ArmorItemRegistryName record class.
      Parameters:
      modId - the value for the modId record component
      name - the value for the name record component
  • Method Details

    • getHelmet

      @Contract(" -> new") @NotNull public @NotNull net.minecraft.resources.ResourceLocation getHelmet()
      Create the registry name with the given arguments
      Returns:
      The registry name of the helmet
    • getHelmetName

      @NotNull public @NotNull String getHelmetName()
    • getChestplate

      @Contract(" -> new") @NotNull public @NotNull net.minecraft.resources.ResourceLocation getChestplate()
      Create the registry name with the given arguments
      Returns:
      The registry name of the chestplate
    • getChestplateName

      @NotNull public @NotNull String getChestplateName()
    • getLeggings

      @Contract(" -> new") @NotNull public @NotNull net.minecraft.resources.ResourceLocation getLeggings()
      Create the registry name with the given arguments
      Returns:
      The registry name of the leggings
    • getLeggingsName

      @NotNull public @NotNull String getLeggingsName()
    • getBoots

      @Contract(" -> new") @NotNull public @NotNull net.minecraft.resources.ResourceLocation getBoots()
      Create the registry name with the given arguments
      Returns:
      The registry name of the boots
    • getBootsName

      @NotNull public @NotNull String getBootsName()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • modId

      public String modId()
      Returns the value of the modId record component.
      Returns:
      the value of the modId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component