@Override
  protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    guiLeft += border.w;
    guiTop += border.h;

    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(GUI_INVENTORY);

    int x = guiLeft; // + border.w;
    int y = guiTop; // + border.h;
    int midW = xSize - border.w * 2;
    int midH = ySize - border.h * 2;

    border.draw();

    if (shouldDrawName()) {
      textBackground.drawScaledX(x, y, midW);
      y += textBackground.h;
    }

    this.mc.getTextureManager().bindTexture(GUI_INVENTORY);
    drawSlots(x, y);
    /*
        // draw the connection to the main thing
        if(right) {
          x = guiLeft;
          y = guiTop;

          if(guiTop == parent.cornerY) {
            borderTop.drawScaledX(x, y, overlapTopLeft.w);
          }
          else {
            overlapTopLeft.draw(x, y);
          }
          y += cornerTopLeft.h;
          overlap.drawScaledY(x, y, midH);
          y += midH;
          if(guiBottom() == parent.cornerX + parent.realHeight) {
            borderBottom.drawScaledX(x, y, overlapBottomLeft.w);
          }
          else {
            overlapBottomLeft.draw(x, y);
          }
        }
        else if(slider.isEnabled()) {
          y = guiTop;

          borderTop.drawScaledX(x, y, cornerTopRight.w);
          y += cornerTopRight.h;
          overlap.drawScaledY(x, y, midH);
          y += midH;
          borderBottom.drawScaledX(x, y, cornerBottomRight.w);

          x = guiRight() - 1;
          y = guiTop;
          if(guiTop == parent.cornerY) {
            borderTop.drawScaledX(x, y, overlapTopRight.w);
          }
          else {
            overlapTopRight.draw(x, y);
          }
          y += cornerTopRight.h;
          overlap.drawScaledY(x, y, midH);
          y += midH;
          if(guiBottom() == parent.cornerX + parent.realHeight) {
            borderBottom.drawScaledX(x, y, overlapBottomRight.w);
          }
          else {
            overlapBottomRight.draw(x, y);
          }
        }
    */
    // slider
    if (slider.isEnabled()) {
      slider.update(
          mouseX, mouseY, !isMouseOverFullSlot(mouseX, mouseY) && isMouseInModule(mouseX, mouseY));
      slider.draw();

      updateSlots();
    }

    guiLeft -= border.w;
    guiTop -= border.h;
  }