Charm of Undying (Fabric/Forge/Quilt)

Charm of Undying (Fabric/Forge/Quilt)

50M Downloads

[Bug]: Rendering transformations are applied on other curios

ochotonida opened this issue ยท 0 comments

commented

Minecraft Version

1.20.1

What happened?

TotemRenderer::render does not call poseStack.push/poseStack.pop, causing all curios rendered afterwards to appear in incorrect locations

public static void render(LivingEntity livingEntity, EntityModel<? extends LivingEntity> model,
PoseStack poseStack, ItemStack stack, MultiBufferSource buffer,
int light) {
if (CharmOfUndyingConfig.SERVER.renderTotem.get()) {
Services.CLIENT_PLATFORM.translateToPosition(livingEntity, model, poseStack);
poseStack.translate(0.0F, -0.2F + CharmOfUndyingConfig.SERVER.yOffset.get(),
0.0F + CharmOfUndyingConfig.SERVER.xOffset.get());
poseStack.scale(0.35F, 0.35F, 0.35F);
poseStack.mulPose(Direction.DOWN.getRotation());
Minecraft.getInstance().getItemRenderer()
.renderStatic(stack, ItemDisplayContext.NONE, light, OverlayTexture.NO_OVERLAY,
poseStack, buffer, livingEntity.level(), 0);
}
}

How do you trigger this bug?

  1. Equip a totem of undying
  2. Equip a second curio with a model in a slot sorted after the charm slot
  3. The second curio will render in an incorrect location, upside down and at a smaller scale

Loader

Forge

Loader Version

Forge 47.0.16

API Version

No response

Mod Version

forge-6.4.1+1.20.1

Relevant Log Outputs

No response