Package tschipp.linear.client
Record Class LinePreview.Counter
java.lang.Object
java.lang.Record
tschipp.linear.client.LinePreview.Counter
- Enclosing class:
LinePreview
public static record LinePreview.Counter(net.minecraft.world.item.ItemStack icon, int count, boolean incomplete)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCounter(net.minecraft.world.item.ItemStack icon, int count, boolean incomplete) Creates an instance of aCounterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackicon()Returns the value of theiconrecord component.booleanReturns the value of theincompleterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Counter
public Counter(net.minecraft.world.item.ItemStack icon, int count, boolean incomplete) Creates an instance of aCounterrecord class.- Parameters:
icon- the value for theiconrecord componentcount- the value for thecountrecord componentincomplete- the value for theincompleterecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
icon
public net.minecraft.world.item.ItemStack icon()Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
incomplete
public boolean incomplete()Returns the value of theincompleterecord component.- Returns:
- the value of the
incompleterecord component
-