Skip to content

Commit

Permalink
Merge pull request #155 from Zailer43/fixArmorTrim
Browse files Browse the repository at this point in the history
Fix armor trim rendering in ItemComponent (Fix #152)
  • Loading branch information
gliscowo authored Aug 1, 2023
2 parents 9011083 + f2b1866 commit 71cdbe8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ public void draw(OwoUIDrawContext context, int mouseX, int mouseY, float partial
matrices.multiplyPositionMatrix(ITEM_SCALING);
}

this.itemRenderer.renderItem(this.stack, ModelTransformationMode.GUI, LightmapTextureManager.MAX_LIGHT_COORDINATE, OverlayTexture.DEFAULT_UV, matrices, entityBuffers, null, 0);
var client = MinecraftClient.getInstance();

this.itemRenderer.renderItem(this.stack, ModelTransformationMode.GUI, LightmapTextureManager.MAX_LIGHT_COORDINATE, OverlayTexture.DEFAULT_UV, matrices, entityBuffers, client.world, 0);
this.entityBuffers.draw();

// Clean up
matrices.pop();

if (this.showOverlay) {
context.drawItemInSlot(MinecraftClient.getInstance().textRenderer, this.stack, this.x, this.y);
context.drawItemInSlot(client.textRenderer, this.stack, this.x, this.y);
}
if (notSideLit) {
DiffuseLighting.enableGuiDepthLighting();
Expand Down

0 comments on commit 71cdbe8

Please sign in to comment.