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 TextureAtlasSprite
The field for theparticleIcon
record component.private final ItemTransforms
The field for thetransforms
record component.private final boolean
The field for theusesBlockLight
record component. -
Constructor Summary
ConstructorsConstructorDescriptionModelRenderProperties
(boolean usesBlockLight, TextureAtlasSprite particleIcon, ItemTransforms transforms) Creates an instance of aModelRenderProperties
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyToLayer
(ItemStackRenderState.LayerRenderState pRenderState, ItemDisplayContext pDisplayContext) final boolean
Indicates whether some other object is "equal to" this one.static ModelRenderProperties
fromResolvedModel
(ModelBaker pBaker, ResolvedModel pModel, TextureSlots pTextureSlots) final int
hashCode()
Returns a hash code value for this object.Returns the value of theparticleIcon
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetransforms
record component.boolean
Returns the value of theusesBlockLight
record component.
-
Field Details
-
usesBlockLight
private final boolean usesBlockLightThe field for theusesBlockLight
record component. -
particleIcon
The field for theparticleIcon
record component. -
transforms
The field for thetransforms
record component.
-
-
Constructor Details
-
ModelRenderProperties
public ModelRenderProperties(boolean usesBlockLight, TextureAtlasSprite particleIcon, ItemTransforms transforms) Creates an instance of aModelRenderProperties
record class.- Parameters:
usesBlockLight
- the value for theusesBlockLight
record componentparticleIcon
- the value for theparticleIcon
record componenttransforms
- the value for thetransforms
record 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 theusesBlockLight
record component.- Returns:
- the value of the
usesBlockLight
record component
-
particleIcon
Returns the value of theparticleIcon
record component.- Returns:
- the value of the
particleIcon
record component
-
transforms
Returns the value of thetransforms
record component.- Returns:
- the value of the
transforms
record component
-