Record Class SelectItemModel.SwitchCase<T>
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.SelectItemModel.SwitchCase<T>
- Enclosing class:
SelectItemModel<T>
public static record SelectItemModel.SwitchCase<T>(List<T> values, ItemModel.Unbaked model)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ItemModel.UnbakedThe field for themodelrecord component.The field for thevaluesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSwitchCase(List<T> values, ItemModel.Unbaked model) Creates an instance of aSwitchCaserecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<SelectItemModel.SwitchCase<T>> codec(com.mojang.serialization.Codec<T> valueCodec) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord component.
-
Field Details
-
values
-
model
The field for themodelrecord component.
-
-
Constructor Details
-
SwitchCase
Creates an instance of aSwitchCaserecord class.- Parameters:
values- the value for thevaluesrecord componentmodel- the value for themodelrecord component
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<SelectItemModel.SwitchCase<T>> codec(com.mojang.serialization.Codec<T> valueCodec) -
toString
-
hashCode
-
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). -
values
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-