Record Class ItemModelGenerator.ItemLayerKey
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.cuboid.ItemModelGenerator.ItemLayerKey
- All Implemented Interfaces:
ModelBaker.SharedOperationKey<QuadCollection>
- Enclosing class:
ItemModelGenerator
public static record ItemModelGenerator.ItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex, ExtraFaceData faceData)
extends Record
implements ModelBaker.SharedOperationKey<QuadCollection>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExtraFaceDataThe field for thefaceDatarecord component.private final intThe field for thelayerIndexrecord component.private final Material.BakedThe field for thematerialrecord component.private final ModelStateThe field for themodelStaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex) ItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex, ExtraFaceData faceData) Creates an instance of aItemLayerKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncompute(ModelBaker modelBakery) final booleanIndicates whether some other object is "equal to" this one.faceData()Returns the value of thefaceDatarecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thelayerIndexrecord component.material()Returns the value of thematerialrecord component.Returns the value of themodelStaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
material
The field for thematerialrecord component. -
modelState
The field for themodelStaterecord component. -
layerIndex
private final int layerIndexThe field for thelayerIndexrecord component. -
faceData
The field for thefaceDatarecord component.
-
-
Constructor Details
-
ItemLayerKey
-
ItemLayerKey
public ItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex, ExtraFaceData faceData) Creates an instance of aItemLayerKeyrecord class.- Parameters:
material- the value for thematerialrecord componentmodelState- the value for themodelStaterecord componentlayerIndex- the value for thelayerIndexrecord componentfaceData- the value for thefaceDatarecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceModelBaker.SharedOperationKey<QuadCollection>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
modelState
Returns the value of themodelStaterecord component.- Returns:
- the value of the
modelStaterecord component
-
layerIndex
public int layerIndex()Returns the value of thelayerIndexrecord component.- Returns:
- the value of the
layerIndexrecord component
-
faceData
Returns the value of thefaceDatarecord component.- Returns:
- the value of the
faceDatarecord component
-