當前位置: 首頁>>代碼示例>>Java>>正文


Java CreativeTabs.tabInventory方法代碼示例

本文整理匯總了Java中net.minecraft.creativetab.CreativeTabs.tabInventory方法的典型用法代碼示例。如果您正苦於以下問題:Java CreativeTabs.tabInventory方法的具體用法?Java CreativeTabs.tabInventory怎麽用?Java CreativeTabs.tabInventory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.creativetab.CreativeTabs的用法示例。


在下文中一共展示了CreativeTabs.tabInventory方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: drawGuiContainerBackgroundLayer

import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
/**
 * Args : renderPartialTicks, mouseX, mouseY
 */
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
{
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    RenderHelper.enableGUIStandardItemLighting();
    CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];

    for (CreativeTabs creativetabs1 : CreativeTabs.creativeTabArray)
    {
        this.mc.getTextureManager().bindTexture(creativeInventoryTabs);

        if (creativetabs1.getTabIndex() != selectedTabIndex)
        {
            this.func_147051_a(creativetabs1);
        }
    }

    this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.getBackgroundImageName()));
    this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
    this.searchField.drawTextBox();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    int i = this.guiLeft + 175;
    int j = this.guiTop + 18;
    int k = j + 112;
    this.mc.getTextureManager().bindTexture(creativeInventoryTabs);

    if (creativetabs.shouldHidePlayerInventory())
    {
        this.drawTexturedModalRect(i, j + (int)((float)(k - j - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
    }

    this.func_147051_a(creativetabs);

    if (creativetabs == CreativeTabs.tabInventory)
    {
        GuiInventory.drawEntityOnScreen(this.guiLeft + 43, this.guiTop + 45, 20, (float)(this.guiLeft + 43 - mouseX), (float)(this.guiTop + 45 - 30 - mouseY), this.mc.thePlayer);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:41,代碼來源:GuiContainerCreative.java


注:本文中的net.minecraft.creativetab.CreativeTabs.tabInventory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。