Record Class CustomHeadLayer.Transforms
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.entity.layers.CustomHeadLayer.Transforms
- Enclosing class:
CustomHeadLayer<S extends LivingEntityRenderState, M extends EntityModel<S> & HeadedModel>
public static record CustomHeadLayer.Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale, Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Function<PlayerSkinRenderCache.RenderInfo, RenderType> static final CustomHeadLayer.Transformsprivate final floatThe field for thehorizontalScalerecord component.private final Function<PlayerSkinRenderCache.RenderInfo, RenderType> The field for theplayerSkinRenderTypeResolverrecord component.private final floatThe field for theskullYOffsetrecord component.static final Function<PlayerSkinRenderCache.RenderInfo, RenderType> private final floatThe field for theverticalScalerecord component.private final floatThe field for theyOffsetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTransforms(float yOffset, float skullYOffset, float horizontalScale) Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale) Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale, Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver) Creates an instance of aTransformsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thehorizontalScalerecord component.Returns the value of theplayerSkinRenderTypeResolverrecord component.floatReturns the value of theskullYOffsetrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of theverticalScalerecord component.floatyOffset()Returns the value of theyOffsetrecord component.
-
Field Details
-
yOffset
private final float yOffsetThe field for theyOffsetrecord component. -
skullYOffset
private final float skullYOffsetThe field for theskullYOffsetrecord component. -
horizontalScale
private final float horizontalScaleThe field for thehorizontalScalerecord component. -
verticalScale
private final float verticalScaleThe field for theverticalScalerecord component. -
playerSkinRenderTypeResolver
The field for theplayerSkinRenderTypeResolverrecord component. -
TRANSLUCENT_PLAYER_SKIN_RESOLVER
public static final Function<PlayerSkinRenderCache.RenderInfo, RenderType> TRANSLUCENT_PLAYER_SKIN_RESOLVER -
CUTOUT_PLAYER_SKIN_RESOLVER
public static final Function<PlayerSkinRenderCache.RenderInfo, RenderType> CUTOUT_PLAYER_SKIN_RESOLVER -
DEFAULT
-
-
Constructor Details
-
Transforms
public Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale) -
Transforms
public Transforms(float yOffset, float skullYOffset, float horizontalScale) -
Transforms
public Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale, Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver) Creates an instance of aTransformsrecord class.- Parameters:
yOffset- the value for theyOffsetrecord componentskullYOffset- the value for theskullYOffsetrecord componenthorizontalScale- the value for thehorizontalScalerecord componentverticalScale- the value for theverticalScalerecord componentplayerSkinRenderTypeResolver- the value for theplayerSkinRenderTypeResolverrecord component
-
-
Method Details
-
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. -
yOffset
public float yOffset()Returns the value of theyOffsetrecord component.- Returns:
- the value of the
yOffsetrecord component
-
skullYOffset
public float skullYOffset()Returns the value of theskullYOffsetrecord component.- Returns:
- the value of the
skullYOffsetrecord component
-
horizontalScale
public float horizontalScale()Returns the value of thehorizontalScalerecord component.- Returns:
- the value of the
horizontalScalerecord component
-
verticalScale
public float verticalScale()Returns the value of theverticalScalerecord component.- Returns:
- the value of the
verticalScalerecord component
-
playerSkinRenderTypeResolver
Returns the value of theplayerSkinRenderTypeResolverrecord component.- Returns:
- the value of the
playerSkinRenderTypeResolverrecord component
-