Record Class ModelRenderProperties
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.ModelRenderProperties
public record ModelRenderProperties(boolean usesBlockLight, TextureAtlasSprite particleIcon, ItemTransforms transforms)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextureAtlasSpriteThe field for theparticleIconrecord component.private final ItemTransformsThe field for thetransformsrecord component.private final booleanThe field for theusesBlockLightrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionModelRenderProperties(boolean usesBlockLight, TextureAtlasSprite particleIcon, ItemTransforms transforms) Creates an instance of aModelRenderPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToLayer(ItemStackRenderState.LayerRenderState pRenderState, ItemDisplayContext pDisplayContext) final booleanIndicates whether some other object is "equal to" this one.static ModelRenderPropertiesfromResolvedModel(ModelBaker pBaker, ResolvedModel pModel, TextureSlots pTextureSlots) final inthashCode()Returns a hash code value for this object.Returns the value of theparticleIconrecord 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. -
particleIcon
The field for theparticleIconrecord component. -
transforms
The field for thetransformsrecord component.
-
-
Constructor Details
-
ModelRenderProperties
public ModelRenderProperties(boolean usesBlockLight, TextureAtlasSprite particleIcon, ItemTransforms transforms) Creates an instance of aModelRenderPropertiesrecord class.- Parameters:
usesBlockLight- the value for theusesBlockLightrecord componentparticleIcon- the value for theparticleIconrecord componenttransforms- the value for thetransformsrecord component
-
-
Method Details
-
fromResolvedModel
public static ModelRenderProperties fromResolvedModel(ModelBaker pBaker, ResolvedModel pModel, TextureSlots pTextureSlots) -
applyToLayer
public void applyToLayer(ItemStackRenderState.LayerRenderState pRenderState, ItemDisplayContext pDisplayContext) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
usesBlockLight
public boolean usesBlockLight()Returns the value of theusesBlockLightrecord component.- Returns:
- the value of the
usesBlockLightrecord component
-
particleIcon
Returns the value of theparticleIconrecord component.- Returns:
- the value of the
particleIconrecord component
-
transforms
Returns the value of thetransformsrecord component.- Returns:
- the value of the
transformsrecord component
-