コード例 #1
0
  @Override
  @SideOnly(Side.CLIENT)
  public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer) {
    this.renderCache = rh.useSimplifiedRendering(x, y, z, this, this.renderCache);
    rh.setTexture(this.is.getIconIndex());

    rh.setBounds(6, 6, 14, 10, 10, 16);
    rh.renderBlock(x, y, z, renderer);

    rh.setBounds(6, 6, 11, 10, 10, 13);
    rh.renderBlock(x, y, z, renderer);

    rh.setTexture(
        CableBusTextures.PartMonitorSidesStatus.getIcon(),
        CableBusTextures.PartMonitorSidesStatus.getIcon(),
        CableBusTextures.PartMonitorBack.getIcon(),
        this.is.getIconIndex(),
        CableBusTextures.PartMonitorSidesStatus.getIcon(),
        CableBusTextures.PartMonitorSidesStatus.getIcon());

    rh.setBounds(6, 6, 13, 10, 10, 14);
    rh.renderBlock(x, y, z, renderer);

    this.renderLights(x, y, z, rh, renderer);
  }
コード例 #2
0
  @Override
  @SideOnly(Side.CLIENT)
  public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer) {
    GL11.glTranslated(-0.2, -0.3, 0.0);

    rh.setTexture(this.is.getIconIndex());
    rh.setBounds(6, 6, 14 - 4, 10, 10, 16 - 4);
    rh.renderInventoryBox(renderer);

    rh.setBounds(6, 6, 11 - 4, 10, 10, 13 - 4);
    rh.renderInventoryBox(renderer);

    rh.setBounds(6, 6, 13 - 4, 10, 10, 14 - 4);
    rh.setTexture(CableBusTextures.PartMonitorSidesStatus.getIcon());
    rh.renderInventoryBox(renderer);

    rh.setTexture(CableBusTextures.PartMonitorSidesStatusLights.getIcon());
    rh.setInvColor(0x000000);
    rh.renderInventoryBox(renderer);
    rh.setInvColor(0xffffff);

    rh.setTexture(null);
  }