Record Class TierSet
java.lang.Object
java.lang.Record
info.u_team.u_team_core.item.tier.TierSet
- All Implemented Interfaces:
Iterable<RegistryEntry<? extends net.minecraft.world.item.TieredItem>>
public record TierSet(RegistryEntry<UAxeItem> axe, RegistryEntry<UHoeItem> hoe, RegistryEntry<UPickaxeItem> pickaxe, RegistryEntry<UShovelItem> shovel, RegistryEntry<USwordItem> sword)
extends Record
implements Iterable<RegistryEntry<? extends net.minecraft.world.item.TieredItem>>
-
Constructor Summary
ConstructorsConstructorDescriptionTierSet(RegistryEntry<UAxeItem> axe, RegistryEntry<UHoeItem> hoe, RegistryEntry<UPickaxeItem> pickaxe, RegistryEntry<UShovelItem> shovel, RegistryEntry<USwordItem> sword) Creates an instance of aTierSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaxe()Returns the value of theaxerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hoe()Returns the value of thehoerecord component.Iterator<RegistryEntry<? extends net.minecraft.world.item.TieredItem>>iterator()pickaxe()Returns the value of thepickaxerecord component.shovel()Returns the value of theshovelrecord component.sword()Returns the value of theswordrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TierSet
public TierSet(RegistryEntry<UAxeItem> axe, RegistryEntry<UHoeItem> hoe, RegistryEntry<UPickaxeItem> pickaxe, RegistryEntry<UShovelItem> shovel, RegistryEntry<USwordItem> sword) Creates an instance of aTierSetrecord class.- Parameters:
axe- the value for theaxerecord componenthoe- the value for thehoerecord componentpickaxe- the value for thepickaxerecord componentshovel- the value for theshovelrecord componentsword- the value for theswordrecord component
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<RegistryEntry<? extends net.minecraft.world.item.TieredItem>>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
axe
Returns the value of theaxerecord component.- Returns:
- the value of the
axerecord component
-
hoe
Returns the value of thehoerecord component.- Returns:
- the value of the
hoerecord component
-
pickaxe
Returns the value of thepickaxerecord component.- Returns:
- the value of the
pickaxerecord component
-
shovel
Returns the value of theshovelrecord component.- Returns:
- the value of the
shovelrecord component
-
sword
Returns the value of theswordrecord component.- Returns:
- the value of the
swordrecord component
-