コード例 #1
0
  @Override
  protected void drawGuiContainerForegroundLayer(int par1, int par2) {
    String invtName = StatCollector.translateToLocal(hopper.getInventoryName());
    fontRendererObj.drawString(
        invtName, xSize / 2 - fontRendererObj.getStringWidth(invtName) / 2, 6, 4210752);
    fontRendererObj.drawString(
        StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752);

    fontRendererObj.drawString(
        hopper.getLine(), 76 - fontRendererObj.getStringWidth(hopper.getLine()), 57, 4210752);
  }
コード例 #2
0
 public GuiBasicFilteringHopper(InventoryPlayer inventory, TileEntityFilteringHopper tile) {
   super(new ContainerFilteringHopper(inventory, tile));
   hopper = tile;
   if (tile.isFilter())
     backGround = new ResourceLocation(Utils.getGUITexture(Strings.BASIC_FILTERING_HOPPER_NAME));
   else {
     ySize = 133;
     backGround = new ResourceLocation("textures/gui/container/hopper.png");
   }
 }