Record Class ItemModelGenerator.ItemLayerKey
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.ItemModelGenerator.ItemLayerKey
- All Implemented Interfaces:
ModelBaker.SharedOperationKey<QuadCollection>
- Enclosing class:
ItemModelGenerator
public static record ItemModelGenerator.ItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex)
extends Record
implements ModelBaker.SharedOperationKey<QuadCollection>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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) Creates an instance of aItemLayerKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncompute(ModelBaker modelBakery) final booleanIndicates whether some other object is "equal to" this one.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.
-
-
Constructor Details
-
ItemLayerKey
Creates an instance of aItemLayerKeyrecord class.- Parameters:
material- the value for thematerialrecord componentmodelState- the value for themodelStaterecord componentlayerIndex- the value for thelayerIndexrecord 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
-