Record Class PonderIndexScreen.ItemEntry
java.lang.Object
java.lang.Record
net.createmod.ponder.foundation.ui.PonderIndexScreen.ItemEntry
- Enclosing class:
- PonderIndexScreen
public static record PonderIndexScreen.ItemEntry(@Nullable net.minecraft.world.level.ItemLike item, net.minecraft.resources.ResourceLocation key)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionItemEntry(net.minecraft.world.level.ItemLike item, net.minecraft.resources.ResourceLocation key) Creates an instance of aItemEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.ItemLikeitem()Returns the value of theitemrecord component.net.minecraft.resources.ResourceLocationkey()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemEntry
public ItemEntry(@Nullable net.minecraft.world.level.ItemLike item, net.minecraft.resources.ResourceLocation key) Creates an instance of aItemEntryrecord class.- Parameters:
item- the value for theitemrecord componentkey- the value for thekeyrecord component
-
-
Method Details
-
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). -
item
@Nullable public net.minecraft.world.level.ItemLike item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
key
public net.minecraft.resources.ResourceLocation key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-