Record Class ModelRenderProperties
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.ModelRenderProperties
public record ModelRenderProperties(boolean usesBlockLight, Material.Baked particleMaterial, ItemTransforms transforms)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Material.BakedThe field for theparticleMaterialrecord component.private final ItemTransformsThe field for thetransformsrecord component.private final booleanThe field for theusesBlockLightrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionModelRenderProperties(boolean usesBlockLight, Material.Baked particleMaterial, ItemTransforms transforms) Creates an instance of aModelRenderPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToLayer(ItemStackRenderState.LayerRenderState layer, ItemDisplayContext displayContext) final booleanIndicates whether some other object is "equal to" this one.static ModelRenderPropertiesfromResolvedModel(ModelBaker baker, ResolvedModel resolvedModel, TextureSlots textureSlots) final inthashCode()Returns a hash code value for this object.Returns the value of theparticleMaterialrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransformsrecord component.booleanReturns the value of theusesBlockLightrecord component.
-
Field Details
-
usesBlockLight
private final boolean usesBlockLightThe field for theusesBlockLightrecord component. -
particleMaterial
The field for theparticleMaterialrecord component. -
transforms
The field for thetransformsrecord component.
-
-
Constructor Details
-
ModelRenderProperties
public ModelRenderProperties(boolean usesBlockLight, Material.Baked particleMaterial, ItemTransforms transforms) Creates an instance of aModelRenderPropertiesrecord class.- Parameters:
usesBlockLight- the value for theusesBlockLightrecord componentparticleMaterial- the value for theparticleMaterialrecord componenttransforms- the value for thetransformsrecord component
-
-
Method Details
-
fromResolvedModel
public static ModelRenderProperties fromResolvedModel(ModelBaker baker, ResolvedModel resolvedModel, TextureSlots textureSlots) -
applyToLayer
public void applyToLayer(ItemStackRenderState.LayerRenderState layer, ItemDisplayContext displayContext) -
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. -
usesBlockLight
public boolean usesBlockLight()Returns the value of theusesBlockLightrecord component.- Returns:
- the value of the
usesBlockLightrecord component
-
particleMaterial
Returns the value of theparticleMaterialrecord component.- Returns:
- the value of the
particleMaterialrecord component
-
transforms
Returns the value of thetransformsrecord component.- Returns:
- the value of the
transformsrecord component
-