Skip to main content
Version: 1.20.x

ICurioRenderer

Methods

Reference

render()


Runs the rendering code when an associated item is equipped in a curio slot and the visibility of the rendering is enabled. An equipped cosmetic item will override the rendering of its related functional item.

Parameters:

NameTypeDescription
stackItemStackItemStack being rendered
slotContextSlotContextSlotContext for the slot with the ItemStack being rendered
poseStackPoseStackPoseStack passed from the parent RenderLayer
renderLayerParentRenderLayerParentRenderLayerParent passed from the parent RenderLayer
lightintegerLight value
limbSwingfloatLimb swing value
limbSwingAmountfloatLimb swing amount value
partialTicksfloatPartial ticks value
ageInTicksfloatAge in ticks value
netHeadYawfloatNet head yaw value
headPitchfloatHead pitch value

static translateIfSneaking()


Applies a translation to the given PoseStack if the given LivingEntity is crouching. This is called to have the render appropriately adjust its positioning up or down based on the crouching status of the entity.

Parameters:

NameTypeDescription
poseStackPoseStackPoseStack passed from the parent RenderLayer
livingEntityLivingEntityLivingEntity to check isCrouching()

static rotateIfSneaking()


Applies a rotation to the given PoseStack if the given LivingEntity is crouching. This is called to have the render appropriately adjust its rotations based on the crouching status of the entity. Specifically, these rotations are based on the body/torso rotations of the entity.

Parameters:

NameTypeDescription
poseStackPoseStackPoseStack passed from the parent RenderLayer
livingEntityLivingEntityLivingEntity to check isCrouching() and rotate around

static followHeadRotations()


Applies rotations to the given ModelParts based on the given LivingEntity and its head rotations. This is called to render the model parts in alignment with the entity's head. This does nothing if the entity's renderer does not implement LivingEntityRenderer or if the model does not have a head inherited from the HumanoidModel class.

Parameters:

NameTypeDescription
livingEntityLivingEntityLivingEntity to align the rotations around
modelPartsModelPart...List of model parts to align to the head movement

static followBodyRotations()


Applies rotations to the given HumanoidModels based on the given LivingEntity and its rotations. This is called to render the model parts in alignment with the entity's movements, such as their leg and arm movements when walking or interacting with objects.

Parameters:

NameTypeDescription
livingEntityLivingEntityLivingEntity to align the rotations around
modelsHumanoidModel...List of model parts to align to the body movement