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 thefallbackrecord component.static final com.mojang.serialization.MapCodec<SelectItemModel.Unbaked> private final SelectItemModel.UnbakedSwitch<?, ?> The field for theunbakedSwitchrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbaked(SelectItemModel.UnbakedSwitch<?, ?> unbakedSwitch, Optional<ItemModel.Unbaked> fallback) Creates an instance of aUnbakedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbake(ItemModel.BakingContext p_388757_) final booleanIndicates whether some other object is "equal to" this one.fallback()Returns the value of thefallbackrecord component.final inthashCode()Returns a hash code value for this object.voidresolveDependencies(ResolvableModel.Resolver p_386548_) final StringtoString()Returns a string representation of this record class.com.mojang.serialization.MapCodec<SelectItemModel.Unbaked> type()Returns the value of theunbakedSwitchrecord component.
-
Field Details
-
unbakedSwitch
The field for theunbakedSwitchrecord component. -
fallback
The field for thefallbackrecord component. -
MAP_CODEC
-
-
Constructor Details
-
Unbaked
public Unbaked(SelectItemModel.UnbakedSwitch<?, ?> unbakedSwitch, Optional<ItemModel.Unbaked> fallback) Creates an instance of aUnbakedrecord class.- Parameters:
unbakedSwitch- the value for theunbakedSwitchrecord componentfallback- the value for thefallbackrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceItemModel.Unbaked
-
bake
- Specified by:
bakein interfaceItemModel.Unbaked
-
resolveDependencies
- Specified by:
resolveDependenciesin 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 theunbakedSwitchrecord component.- Returns:
- the value of the
unbakedSwitchrecord component
-
fallback
Returns the value of thefallbackrecord component.- Returns:
- the value of the
fallbackrecord component
-