Skip to content

Commit

Permalink
Fixed wrong item text rendering in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
kill05 committed Jun 11, 2024
1 parent 05d3b8e commit d829450
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ public ItemTexturedButton(ItemStack item, int xPosition, int yPosition) {
public void drawButton(Minecraft mc, int mouseX, int mouseY) {
if (!this.visible) return;

GL11.glBindTexture(3553, mc.renderEngine.getTexture("/gui/items.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);

render(mc, item, xPosition, yPosition, 1.0f, 1.0f);
this.mouseDragged(mc, mouseX, mouseY);
}

public void render(Minecraft mc, ItemStack item, int x, int y, float brightness, float alpha) {
ItemModelDispatcher.getInstance().getDispatch(item).renderItemIntoGui(
Tessellator.instance, mc.fontRenderer, mc.renderEngine,
item, x, y, brightness, alpha
item, xPosition, yPosition, 1.0f, 1.0f
);

GL11.glDisable(GL11.GL_LIGHTING);
}
}

0 comments on commit d829450

Please sign in to comment.