Record Class ArmorMatReference
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.world.item.equipment.ArmorMatReference
public record ArmorMatReference(net.minecraft.resources.ResourceLocation id, int durability, Map<ArmorMatReference.ArmorSegment,Integer> defense, int enchantmentValue, net.minecraft.sounds.SoundEvent equipSound, float toughness, float knockbackResistance, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> repairIngredient)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionArmorMatReference(net.minecraft.resources.ResourceLocation id, int durability, Map<ArmorMatReference.ArmorSegment, Integer> defense, int enchantmentValue, net.minecraft.sounds.SoundEvent equipSound, float toughness, float knockbackResistance, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> repairIngredient) Creates an instance of aArmorMatReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondefense()Returns the value of thedefenserecord component.intReturns the value of thedurabilityrecord component.intReturns the value of theenchantmentValuerecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.sounds.SoundEventReturns the value of theequipSoundrecord component.net.minecraft.world.item.ArmorMaterialfinal inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.floatReturns the value of theknockbackResistancerecord component.static voidregsiterVanilla(ArmorMatReference ref, net.minecraft.world.item.ArmorMaterial mat) net.minecraft.tags.TagKey<net.minecraft.world.item.Item>Returns the value of therepairIngredientrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thetoughnessrecord component.
-
Constructor Details
-
ArmorMatReference
public ArmorMatReference(net.minecraft.resources.ResourceLocation id, int durability, Map<ArmorMatReference.ArmorSegment, Integer> defense, int enchantmentValue, net.minecraft.sounds.SoundEvent equipSound, float toughness, float knockbackResistance, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> repairIngredient) Creates an instance of aArmorMatReferencerecord class.- Parameters:
id- the value for theidrecord componentdurability- the value for thedurabilityrecord componentdefense- the value for thedefenserecord componentenchantmentValue- the value for theenchantmentValuerecord componentequipSound- the value for theequipSoundrecord componenttoughness- the value for thetoughnessrecord componentknockbackResistance- the value for theknockbackResistancerecord componentrepairIngredient- the value for therepairIngredientrecord component
-
-
Method Details
-
regsiterVanilla
public static void regsiterVanilla(ArmorMatReference ref, net.minecraft.world.item.ArmorMaterial mat) -
getVanilla
public net.minecraft.world.item.ArmorMaterial getVanilla() -
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. -
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. -
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
durability
public int durability()Returns the value of thedurabilityrecord component.- Returns:
- the value of the
durabilityrecord component
-
defense
Returns the value of thedefenserecord component.- Returns:
- the value of the
defenserecord component
-
enchantmentValue
public int enchantmentValue()Returns the value of theenchantmentValuerecord component.- Returns:
- the value of the
enchantmentValuerecord component
-
equipSound
public net.minecraft.sounds.SoundEvent equipSound()Returns the value of theequipSoundrecord component.- Returns:
- the value of the
equipSoundrecord component
-
toughness
public float toughness()Returns the value of thetoughnessrecord component.- Returns:
- the value of the
toughnessrecord component
-
knockbackResistance
public float knockbackResistance()Returns the value of theknockbackResistancerecord component.- Returns:
- the value of the
knockbackResistancerecord component
-
repairIngredient
public net.minecraft.tags.TagKey<net.minecraft.world.item.Item> repairIngredient()Returns the value of therepairIngredientrecord component.- Returns:
- the value of the
repairIngredientrecord component
-