Record Class SelectItemModel.Unbaked
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.SelectItemModel.Unbaked
- All Implemented Interfaces:
ItemModel.Unbaked
,ResolvableModel
- Enclosing class:
SelectItemModel<T>
public static record SelectItemModel.Unbaked(SelectItemModel.UnbakedSwitch<?,?> unbakedSwitch, Optional<ItemModel.Unbaked> fallback)
extends Record
implements ItemModel.Unbaked
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.resources.model.ResolvableModel
ResolvableModel.Resolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional
<ItemModel.Unbaked> The field for thefallback
record component.static final com.mojang.serialization.MapCodec
<SelectItemModel.Unbaked> private final SelectItemModel.UnbakedSwitch
<?, ?> The field for theunbakedSwitch
record component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbaked
(SelectItemModel.UnbakedSwitch<?, ?> unbakedSwitch, Optional<ItemModel.Unbaked> fallback) Creates an instance of aUnbaked
record class. -
Method Summary
Modifier and TypeMethodDescriptionbake
(ItemModel.BakingContext p_388757_) final boolean
Indicates whether some other object is "equal to" this one.fallback()
Returns the value of thefallback
record component.final int
hashCode()
Returns a hash code value for this object.void
resolveDependencies
(ResolvableModel.Resolver p_386548_) final String
toString()
Returns a string representation of this record class.com.mojang.serialization.MapCodec
<SelectItemModel.Unbaked> type()
Returns the value of theunbakedSwitch
record component.
-
Field Details
-
unbakedSwitch
The field for theunbakedSwitch
record component. -
fallback
The field for thefallback
record component. -
MAP_CODEC
-
-
Constructor Details
-
Unbaked
public Unbaked(SelectItemModel.UnbakedSwitch<?, ?> unbakedSwitch, Optional<ItemModel.Unbaked> fallback) Creates an instance of aUnbaked
record class.- Parameters:
unbakedSwitch
- the value for theunbakedSwitch
record componentfallback
- the value for thefallback
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceItemModel.Unbaked
-
bake
- Specified by:
bake
in interfaceItemModel.Unbaked
-
resolveDependencies
- Specified by:
resolveDependencies
in interfaceResolvableModel
-
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)
. -
unbakedSwitch
Returns the value of theunbakedSwitch
record component.- Returns:
- the value of the
unbakedSwitch
record component
-
fallback
Returns the value of thefallback
record component.- Returns:
- the value of the
fallback
record component
-