public void render(GenericSlot genericSlot) {
if (!genericSlot.isVisible()) {
return;
}
ItemStack item = genericSlot.getItem();
GL11.glDepthFunc(515);
RenderHelper.enableGUIStandardItemLighting();
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
GL11.glPushMatrix();
GL11.glTranslatef((float) genericSlot.getScreenX(), (float) genericSlot.getScreenY(), 0);
if (genericSlot.getAnchor() == WidgetAnchor.SCALE) {
GL11.glScalef((float) (genericSlot.getScreen().getWidth() / 427f), (float) (genericSlot.getScreen().getHeight() / 240f), 1);
}
GL11.glScaled(genericSlot.getWidth() / 16D, genericSlot.getHeight() / 16D, 1);
if (item.getTypeId() != 0) {
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
int id = item.getTypeId();
int data = item.getDurability();
if (MaterialData.getCustomItem(id) != null) {
int temp = id;
id = 318;
data = temp;
}
renderer.renderItemIntoGUI(SpoutClient.getHandle().fontRenderer, SpoutClient.getHandle().renderEngine, new net.minecraft.src.ItemStack(id, !genericSlot.doesRenderAmount() ? 0 : item.getAmount(), data), 0, 0);
renderer.renderItemOverlayIntoGUI(SpoutClient.getHandle().fontRenderer, SpoutClient.getHandle().renderEngine, new net.minecraft.src.ItemStack(id, !genericSlot.doesRenderAmount() ? 0 : item.getAmount(), data), 0, 0);
}
GL11.glEnable(GL11.GL_LIGHTING);
RenderHelper.disableStandardItemLighting();
if (isHovering(genericSlot)) RenderUtil.drawRectangle(0, 0, 16, 16, 0x88ffffff);
GL11.glPopMatrix();