Record Class BlockModelWrapper.Unbaked
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.BlockModelWrapper.Unbaked
- All Implemented Interfaces:
ItemModel.Unbaked,ResolvableModel
- Enclosing class:
BlockModelWrapper
public static record BlockModelWrapper.Unbaked(ResourceLocation model, List<ItemTintSource> tints)
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 TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BlockModelWrapper.Unbaked> private final ResourceLocationThe field for themodelrecord component.private final List<ItemTintSource> The field for thetintsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbaked(ResourceLocation model, List<ItemTintSource> tints) Creates an instance of aUnbakedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbake(ItemModel.BakingContext p_388226_) 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.voidresolveDependencies(ResolvableModel.Resolver p_387532_) tints()Returns the value of thetintsrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.serialization.MapCodec<BlockModelWrapper.Unbaked> type()
-
Field Details
-
model
The field for themodelrecord component. -
tints
The field for thetintsrecord component. -
MAP_CODEC
-
-
Constructor Details
-
Unbaked
Creates an instance of aUnbakedrecord class.- Parameters:
model- the value for themodelrecord componenttints- the value for thetintsrecord component
-
-
Method Details
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceResolvableModel
-
bake
- Specified by:
bakein interfaceItemModel.Unbaked
-
type
- Specified by:
typein interfaceItemModel.Unbaked
-
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). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
tints
Returns the value of thetintsrecord component.- Returns:
- the value of the
tintsrecord component
-