Record Class RangeSelectItemModel.Entry
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.RangeSelectItemModel.Entry
- Enclosing class:
RangeSelectItemModel
public static record RangeSelectItemModel.Entry(float threshold, ItemModel.Unbaked model)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator
<RangeSelectItemModel.Entry> static final com.mojang.serialization.Codec
<RangeSelectItemModel.Entry> private final ItemModel.Unbaked
The field for themodel
record component.private final float
The field for thethreshold
record component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry
(float threshold, ItemModel.Unbaked model) Creates an instance of aEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.model()
Returns the value of themodel
record component.float
Returns the value of thethreshold
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
threshold
private final float thresholdThe field for thethreshold
record component. -
model
The field for themodel
record component. -
CODEC
-
BY_THRESHOLD
-
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
threshold
- the value for thethreshold
record componentmodel
- the value for themodel
record 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 '=='. -
threshold
public float threshold()Returns the value of thethreshold
record component.- Returns:
- the value of the
threshold
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-