コード例 #1
0
  @Override
  @SideOnly(Side.CLIENT)
  public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer) {
    rh.setTexture(
        CableBusTextures.PartMonitorSides.getIcon(),
        CableBusTextures.PartMonitorSides.getIcon(),
        CableBusTextures.PartMonitorBack.getIcon(),
        this.is.getIconIndex(),
        CableBusTextures.PartMonitorSides.getIcon(),
        CableBusTextures.PartMonitorSides.getIcon());

    rh.setBounds(2, 2, 14, 14, 14, 16);
    rh.renderInventoryBox(renderer);

    rh.setBounds(5, 5, 12, 11, 11, 13);
    rh.renderInventoryBox(renderer);

    rh.setBounds(5, 5, 13, 11, 11, 14);
    rh.renderInventoryBox(renderer);
  }
コード例 #2
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(
        CableBusTextures.PartMonitorSides.getIcon(),
        CableBusTextures.PartMonitorSides.getIcon(),
        CableBusTextures.PartMonitorBack.getIcon(),
        this.is.getIconIndex(),
        CableBusTextures.PartMonitorSides.getIcon(),
        CableBusTextures.PartMonitorSides.getIcon());

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

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

    rh.setBounds(5, 5, 12, 11, 11, 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(5, 5, 13, 11, 11, 14);
    rh.renderBlock(x, y, z, renderer);

    this.renderLights(x, y, z, rh, renderer);
  }