当前位置: 首页>>代码示例>>Java>>正文


Java GuiInventory.func_147046_a方法代码示例

本文整理汇总了Java中net.minecraft.client.gui.inventory.GuiInventory.func_147046_a方法的典型用法代码示例。如果您正苦于以下问题:Java GuiInventory.func_147046_a方法的具体用法?Java GuiInventory.func_147046_a怎么用?Java GuiInventory.func_147046_a使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.gui.inventory.GuiInventory的用法示例。


在下文中一共展示了GuiInventory.func_147046_a方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(gui);
    int l = (width - xSize) / 2;
    int i1 = (height - ySize) / 2;
    drawTexturedModalRect(l, i1, 0, 0, xSize, ySize);

    
for (int j1 = 0; j1 < 3; j1++)
{
    for (int k1 = 0; k1 < 5; k1++)
    {
        drawTexturedModalRect(l + 78 + 18 * k1, i1 + 9 + 18 * j1 + 15, 197, 2, 18, 18);
    }
}


GuiInventory.func_147046_a(l + 42, i1 + 51, 30, (float)(l + 51) - xSize_wolf, (float)((i1 + 75) - 50) - ySize_wolf, this.entity);
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:21,代码来源:GuiPack.java

示例2: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
protected void drawGuiContainerBackgroundLayer(float unused, int unused2, int unused3) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(wolfGuiTextures);
    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
    GL11.glPushMatrix();
    int x = k+26;
    int y = l+70;
    int boxWidth = 52;
    int boxHeight = 52;
    ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
    int scaleFactor = res.getScaleFactor();
    GL11.glScissor(x*scaleFactor, (height-y)*scaleFactor, boxWidth*scaleFactor, boxHeight*scaleFactor);
    GL11.glEnable(GL11.GL_SCISSOR_TEST);
    GL11.glTranslatef(0, -14+(zoom/2), 0);
    GuiInventory.func_147046_a(k + 51, l + 60, zoom, (float)(k + 51) - this.mouseX, (float)(l + 75 - 50) - this.mouseY, this.wolf);
    GL11.glDisable(GL11.GL_SCISSOR_TEST);
    GL11.glPopMatrix();
    GL11.glPushMatrix();
    GL11.glTranslatef(0, 0, 400);
    String s = "Zoom: \u00A7e"+((zoom-28)+100)+"%";
    GL11.glScalef(0.5f, 0.5f, 1f);
    fontRendererObj.drawStringWithShadow(s, ((x+boxWidth)*2)-(fontRendererObj.getStringWidth(s)+2), (y*2)-10, 0xFFFFFF);
    GL11.glPopMatrix();
}
 
开发者ID:unascribed,项目名称:PowerWolves,代码行数:27,代码来源:GuiWolfInventory.java

示例3: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    //this.mc.getTextureManager().bindTexture(camelGuiTextures);
    this.mc.renderEngine.bindTexture(camelGuiTextures);
    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);

    if (this.field_147034_x.isChested())
    {
        this.drawTexturedModalRect(k + 79, l + 17, 0, this.ySize, 90, 54);
    }

   // if (this.field_147034_x.func_110259_cr()) for armor
   // {
  //      this.drawTexturedModalRect(k + 7, l + 35, 0, this.ySize + 54, 18, 18);
   // }

    GuiInventory.func_147046_a(k + 51, l + 60, 17, (float)(k + 51) - this.field_147033_y, (float)(l + 75 - 50) - this.field_147032_z, this.field_147034_x);
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10,代码行数:22,代码来源:GuiScreenCamelInventory.java

示例4: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(horseGuiTextures);
    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);

    if (this.field_147034_x.isChested())
    {
        this.drawTexturedModalRect(k + 79, l + 17, 0, this.ySize, 90, 54);
    }

    if (this.field_147034_x.func_110259_cr())
    {
        this.drawTexturedModalRect(k + 7, l + 35, 0, this.ySize + 54, 18, 18);
    }

    GuiInventory.func_147046_a(k + 51, l + 60, 17, (float)(k + 51) - this.field_147033_y, (float)(l + 75 - 50) - this.field_147032_z, this.field_147034_x);
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10,代码行数:21,代码来源:GuiScreenHorseInventory.java

示例5: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(field_110414_t);
    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
    
    if ( pet.hasSkill( Skill.INVENTORY_ARMOR.id ) )
    {
        this.drawTexturedModalRect(k + 7 + 18, l + 17, 0, 220, 18, 18);
    }
    if ( pet.hasSkill( Skill.TRAVEL_MOUNTABLE.id ) )
    {
        this.drawTexturedModalRect(k + 7, l + 17, 18, 220, 18, 18);
    }
    if ( pet.hasSkill( Skill.INVENTORY_WEAPON.id ) )
    {
        this.drawTexturedModalRect(k + 7 + 36, l + 17, 36, 220, 18, 18);
    }
    
    if ( pet.hasSkill( Skill.INVENTORY.id ) )
    {
    	int count = ( pet.getInventory().getSizeInventory() - 3 ) / 3;
    	
    	int rows = Math.min( count, 3 );
    	drawTexturedModalRect( k + 115, l + 17, 0, 166, 54, 18 * rows );
    	
    	int cols = Math.max( count - 3, 0 );
    	drawTexturedModalRect( k + 115 + 18 * 3, l + 17, 18 * 3, 166, 18 * cols, 54 );
    }

    GuiInventory.func_147046_a(k + 88, l + 60, 17, (float)(k + 51) - this.mouseX, (float)(l + 75 - 50) - this.mouseY, this.pet);
}
 
开发者ID:spacechase0,项目名称:UsefulPets,代码行数:36,代码来源:PetInventoryGui.java

示例6: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(texture);
    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
    GuiInventory.func_147046_a(k + 51, l + 60, 17, (float) (k + 51) - this.field_147033_y, (float) (l + 75 - 50) - this.field_147032_z, this.human);
}
 
开发者ID:civilframe,项目名称:TameHumans,代码行数:10,代码来源:GuiCommandHuman.java

示例7: drawScreen

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float delta)
{
    // draws the black background
    this.drawDefaultBackground();

    // reset color
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    // set GUI texture
    mc.getTextureManager().bindTexture(background);

    // draw GUI texture
    this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 166);

    // new GL matrix
    GL11.glPushMatrix();
    {
        // move matrix into position
        GL11.glTranslatef(this.guiLeft + 51, this.guiTop + 114, 130);

        // rotate matrix
        GL11.glRotatef(180, 0, 1, 0);

        // draw player
        GuiInventory.func_147046_a(-77, -5, 50, mouseX - (this.guiLeft + 127), this.guiTop + 32 - mouseY, mc.thePlayer);
    }
    // end
    GL11.glPopMatrix();

    // draws buttons.
    if (this.buttonPages != null && this.buttonPages.size() > 0)
    {
        GuiButton[] buttonPage = this.buttonPages.get(this.currentPage);

        for (GuiButton bttn : buttonPage)
        {
            if (bttn != null)
            {
                bttn.drawButton(mc, mouseX, mouseY);
            }
        }
    }

    // super call.
    super.drawScreen(mouseX, mouseY, delta);
}
 
开发者ID:jadar,项目名称:RankCapes,代码行数:48,代码来源:GuiCapeSelect.java


注:本文中的net.minecraft.client.gui.inventory.GuiInventory.func_147046_a方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。