Exemple #1
0
  private void drawSlot(Minecraft mc, ItemStack stack, int x, int y) {
    RenderHelper.enableGUIStandardItemLighting();

    itemRender.renderItemIntoGUI(stack, x, y);
    RenderHelper.disableStandardItemLighting();
    //        itemRender.renderItemOverlayIntoGUI(mc.fontRendererObj, mc.getTextureManager(), stack,
    // x, y);
    //        GL11.glDisable(GL11.GL_LIGHTING);
    //        GL11.glEnable(GL11.GL_ALPHA_TEST);
    //        GL11.glEnable(GL11.GL_BLEND);

    if (stack.isItemEnchanted()) renderEffectSlot(mc.getTextureManager(), x - 1, y - 1);
    else {
      SAOGL.glBlend(true);
      SAOGL.glAlpha(true);
    }
  }
Exemple #2
0
  @Override
  public void draw(Minecraft mc, int cursorX, int cursorY) {
    super.draw(mc, cursorX, cursorY);

    if ((visibility > 0) && (enabled)) {
      final int left = getX(false);
      final int top = getY(false);

      final int iconOffset = (height - 16) / 2;
      final ItemStack stack = getStack();

      if (stack != null) {
        SAOGL.glString(
            "x" + stack.stackSize,
            left + width + 2,
            top + height - 16,
            SAOColor.multiplyAlpha(getColor(hoverState(cursorX, cursorY), false), visibility),
            true);
        this.drawSlot(mc, stack, left + iconOffset, top + iconOffset);
      }
    }
  }