Record Class SelectItemModel.UnbakedSwitch<P extends SelectItemModelProperty<T>,T>
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.SelectItemModel.UnbakedSwitch<P,T>
- Enclosing class:
SelectItemModel<T>
public static record SelectItemModel.UnbakedSwitch<P extends SelectItemModelProperty<T>,T> (P extends SelectItemModelProperty<T> property, List<SelectItemModel.SwitchCase<T>> cases)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<SelectItemModel.SwitchCase<T>> The field for thecases
record component.static final com.mojang.serialization.MapCodec
<SelectItemModel.UnbakedSwitch<?, ?>> private final P
The field for theproperty
record component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbakedSwitch
(P property, List<SelectItemModel.SwitchCase<T>> cases) Creates an instance of aUnbakedSwitch
record class. -
Method Summary
Modifier and TypeMethodDescriptionbake
(ItemModel.BakingContext p_386650_, ItemModel p_388617_) cases()
Returns the value of thecases
record component.private SelectItemModel.ModelSelector
<T> createModelGetter
(it.unimi.dsi.fastutil.objects.Object2ObjectMap<T, ItemModel> p_400045_, RegistryContextSwapper p_399763_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.property()
Returns the value of theproperty
record component.void
resolveDependencies
(ResolvableModel.Resolver p_388258_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
property
The field for theproperty
record component. -
cases
The field for thecases
record component. -
MAP_CODEC
-
-
Constructor Details
-
UnbakedSwitch
Creates an instance of aUnbakedSwitch
record class.- Parameters:
property
- the value for theproperty
record componentcases
- the value for thecases
record component
-
-
Method Details
-
bake
-
createModelGetter
private SelectItemModel.ModelSelector<T> createModelGetter(it.unimi.dsi.fastutil.objects.Object2ObjectMap<T, ItemModel> p_400045_, @Nullable RegistryContextSwapper p_399763_) -
resolveDependencies
-
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)
. -
property
Returns the value of theproperty
record component.- Returns:
- the value of the
property
record component
-
cases
Returns the value of thecases
record component.- Returns:
- the value of the
cases
record component
-