Package com.lightning.northstar.content
Record Class NorthstarArmorTiers
java.lang.Object
java.lang.Record
com.lightning.northstar.content.NorthstarArmorTiers
- All Implemented Interfaces:
net.minecraft.world.item.ArmorMaterial
public record NorthstarArmorTiers(String name, int durability, int[] protection, int enchantability, net.minecraft.sounds.SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<net.minecraft.world.item.crafting.Ingredient> repairMaterial)
extends Record
implements net.minecraft.world.item.ArmorMaterial
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.item.ArmorMaterialstatic final net.minecraft.world.item.ArmorMaterialstatic final net.minecraft.world.item.ArmorMaterial -
Constructor Summary
ConstructorsConstructorDescriptionNorthstarArmorTiers(String name, int durability, int[] protection, int enchantability, net.minecraft.sounds.SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<net.minecraft.world.item.crafting.Ingredient> repairMaterial) Creates an instance of aNorthstarArmorTiersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedurabilityrecord component.intReturns the value of theenchantabilityrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.sounds.SoundEventReturns the value of theequipSoundrecord component.intgetDefenseForType(@NotNull net.minecraft.world.item.ArmorItem.Type type) intgetDurabilityForType(@NotNull net.minecraft.world.item.ArmorItem.Type type) int@NotNull net.minecraft.sounds.SoundEventfloat@NotNull StringgetName()@NotNull net.minecraft.world.item.crafting.Ingredientfloatfinal inthashCode()Returns a hash code value for this object.floatReturns the value of theknockbackResistancerecord component.name()Returns the value of thenamerecord component.int[]Returns the value of theprotectionrecord component.Supplier<net.minecraft.world.item.crafting.Ingredient>Returns the value of therepairMaterialrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thetoughnessrecord component.
-
Field Details
-
MARTIAN_STEEL_ARMOR
public static final net.minecraft.world.item.ArmorMaterial MARTIAN_STEEL_ARMOR -
IRON_SPACE_SUIT
public static final net.minecraft.world.item.ArmorMaterial IRON_SPACE_SUIT -
MARTIAN_STEEL_SPACE_SUIT
public static final net.minecraft.world.item.ArmorMaterial MARTIAN_STEEL_SPACE_SUIT
-
-
Constructor Details
-
NorthstarArmorTiers
public NorthstarArmorTiers(String name, int durability, int[] protection, int enchantability, net.minecraft.sounds.SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<net.minecraft.world.item.crafting.Ingredient> repairMaterial) Creates an instance of aNorthstarArmorTiersrecord class.- Parameters:
name- the value for thenamerecord componentdurability- the value for thedurabilityrecord componentprotection- the value for theprotectionrecord componentenchantability- the value for theenchantabilityrecord componentequipSound- the value for theequipSoundrecord componenttoughness- the value for thetoughnessrecord componentknockbackResistance- the value for theknockbackResistancerecord componentrepairMaterial- the value for therepairMaterialrecord component
-
-
Method Details
-
getDurabilityForType
public int getDurabilityForType(@NotNull net.minecraft.world.item.ArmorItem.Type type) - Specified by:
getDurabilityForTypein interfacenet.minecraft.world.item.ArmorMaterial
-
getDefenseForType
public int getDefenseForType(@NotNull net.minecraft.world.item.ArmorItem.Type type) - Specified by:
getDefenseForTypein interfacenet.minecraft.world.item.ArmorMaterial
-
getEnchantmentValue
public int getEnchantmentValue()- Specified by:
getEnchantmentValuein interfacenet.minecraft.world.item.ArmorMaterial
-
getEquipSound
@NotNull public @NotNull net.minecraft.sounds.SoundEvent getEquipSound()- Specified by:
getEquipSoundin interfacenet.minecraft.world.item.ArmorMaterial
-
getRepairIngredient
@NotNull public @NotNull net.minecraft.world.item.crafting.Ingredient getRepairIngredient()- Specified by:
getRepairIngredientin interfacenet.minecraft.world.item.ArmorMaterial
-
getName
- Specified by:
getNamein interfacenet.minecraft.world.item.ArmorMaterial
-
getToughness
public float getToughness()- Specified by:
getToughnessin interfacenet.minecraft.world.item.ArmorMaterial
-
getKnockbackResistance
public float getKnockbackResistance()- Specified by:
getKnockbackResistancein interfacenet.minecraft.world.item.ArmorMaterial
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
durability
public int durability()Returns the value of thedurabilityrecord component.- Returns:
- the value of the
durabilityrecord component
-
protection
public int[] protection()Returns the value of theprotectionrecord component.- Returns:
- the value of the
protectionrecord component
-
enchantability
public int enchantability()Returns the value of theenchantabilityrecord component.- Returns:
- the value of the
enchantabilityrecord 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
-
repairMaterial
Returns the value of therepairMaterialrecord component.- Returns:
- the value of the
repairMaterialrecord component
-