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


Java GuiInventory.drawEntityOnScreen方法代码示例

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


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

示例1: drawCharacter

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
private void drawCharacter(int x, int y, int size, int cursorX, int cursorY) {
    final float mouseX = (float) x - cursorX;
    final float mouseY = (float) y - size * 1.67F - cursorY;
    EntityLivingBase tmp = (EntityLivingBase)character.ridingEntity;

    IS_VIEWING = true;
    if (character.isRiding() && OptionCore.MOUNT_STAT_VIEW.getValue())
        GuiInventory.drawEntityOnScreen(x, y, size, mouseX, mouseY, tmp);
    else GuiInventory.drawEntityOnScreen(x, y, size, mouseX, mouseY, character);
    IS_VIEWING = false;

    GLCore.glRescaleNormal(true);
    GLCore.glTexture2D(true);
    GLCore.glBlend(true);

    GLCore.tryBlendFuncSeparate(770, 771, 1, 0);
}
 
开发者ID:Tencao,项目名称:SAO-UI---1.8.8,代码行数:18,代码来源:CharacterView.java

示例2: 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);
	if(player.getEntityData().hasKey("craftingTable"))
		Core.bindTexture(UPPER_TEXTURE);
	else
		Core.bindTexture(UPPER_TEXTURE_2X2);
	int k = this.guiLeft;
	int l = this.guiTop;
	this.drawTexturedModalRect(k, l, 0, 0, this.xSize, 102);

	//Draw the player avatar
	GuiInventory.drawEntityOnScreen(k + 51, l + 75, 30, k + 51 - this.xSizeLow, l + 75 - 50 - this.ySizeLow, this.mc.player);

	PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:Deadrik,项目名称:TFC2,代码行数:19,代码来源:GuiInventoryTFC.java

示例3: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int mouseX, int mouseY) {
       GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
       this.mc.getTextureManager().bindTexture(textures);
       this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
       // weight
	drawIconBar(cat.getWeight(), EntityFatCat.WEIGHT_STATUS_MAX, 10, guiLeft + 70, guiTop + 22, xSize, 3*8, xSize+8, 3*8);
	// health
	drawIconBar(cat.getHealth(), cat.getMaxHealth(), 5, guiLeft + 70, guiTop + 46, xSize, 1*8, xSize+8, 1*8);
	// hunger
	drawIconBar(cat.getHunger(), EntityFatCat.HUNGER_MAX, 5, guiLeft + 130, guiTop + 46, xSize, 2*8, xSize+8, 2*8);
	// bladder
	drawIconBar(cat.getBladder(), EntityFatCat.BLADDER_MAX, 5, guiLeft + 70, guiTop + 68, xSize, 0*8, xSize+8, 0*8);
	// tiredness
	drawIconBar(cat.getTiredness(), EntityFatCat.TIREDNESS_MAX, 5, guiLeft + 130, guiTop + 68, xSize, 8*4, xSize+8, 8*4);
	// friendship
	drawIconBar(cat.getFriendship(), EntityFatCat.FRIENDSHIP_MAX, 5, guiLeft + 70, guiTop + 90, xSize, 8*5, xSize+8, 8*5);
	// loveness
	drawIconBar(cat.getLoveness(), EntityFatCat.FRIENDSHIP_MAX, 5, guiLeft + 130, guiTop + 90, xSize, 8*6, xSize+8, 8*6);
	
	
	// !! change scale in the following method, so we should put this at last !!
       GuiInventory.drawEntityOnScreen(guiLeft + 36, guiTop + 55, 30, guiLeft + 24 - mouseX, guiTop + 5 - mouseY, cat);
}
 
开发者ID:shu3,项目名称:FatCatMOD,代码行数:25,代码来源:GuiStatus.java

示例4: drawPages

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
public static void drawPages(FontRenderer renderer, int mouseX, int mouseY, int currentPage, CATEGORY currentCategory, GuiScreen gui)
{
    if (currentCategory == null)
    {
        drawCategoryModels();
    }
    if (currentCategory == CATEGORY.DINOS)
    {
        if (currentPage == 0)
        {
            /* Page 1 / 2*/
            GuiInventory.drawEntityOnScreen(getLeft() + 14, 90, 20, -350f, -5F, new EntityRaptor(Minecraft.getMinecraft().theWorld, 1));
            drawTitle(renderer, DINO_NAME.UTAHRAPTOR);
            drawDiet(renderer, getLeft() + 40, 135, DINO_NAME.UTAHRAPTOR, gui);
            drawSpecies(renderer, getLeft() + 15, 150, DINO_NAME.UTAHRAPTOR);
        }
        else if (currentPage == 2)
        {

        }
    }
}
 
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:23,代码来源:BookDrawHandler.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(resSatchelContainer);
	int k = (this.width - this.xSize) / 2;
	int l = (this.height - this.ySize) / 2;
	this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);

	this.drawTexturedModalRect(k + 61, l + 17, 0, this.ySize, (18 * this.getContainer().columns), (18 * this.getContainer().rows));

	GuiInventory.drawEntityOnScreen(k + 34, l + 66, 24, (float)(k + 34) - this.field_147033_y, (float)(l + 95 - 66) - this.field_147032_z, this.player);
}
 
开发者ID:andykuo1,项目名称:mcplus_mods,代码行数:14,代码来源:GuiSatchel.java

示例6: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
{	
	int i = (this.width - this.xSize) / 2;
       int j = (this.height - this.ySize) / 2;
       this.drawDefaultBackground();
	this.mc.getTextureManager().bindTexture(background);
	this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
	for(EnumInventorySlots slot : EnumInventorySlots.values())
		if(!inventorySlots.getSlot(slot.getId()).getHasStack())
			HarshenClientUtils.drawTexture(slot.getPoint().x + this.guiLeft, slot.getPoint().y + this.guiTop,
					13.26f, 9.89f + (slot.getId()), 1f, 1f, 16, 16, 16, 16);
	GuiInventory.drawEntityOnScreen(i + 30, j + 75, 30, (float)(i + 51) - this.oldMouseX, (float)(j + 75 - 50) - this.oldMouseY, this.mc.player);
   }
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:15,代码来源:GuiPlayerInventoryExtended.java

示例7: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
/**
    * Draws the background layer of this container (behind the items).
    */
   @Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
   {
       GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
       this.mc.getTextureManager().bindTexture(HORSE_GUI_TEXTURES);
       int i = (this.width - this.xSize) / 2;
       int j = (this.height - this.ySize) / 2;
       this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);

       GuiInventory.drawEntityOnScreen(i + 51 + 25, j + 60, 17, i + 51 - this.mousePosx, j + 75 - 50 - this.mousePosY, this.horseEntity);
   }
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:15,代码来源:GuiHorseEnderChest.java

示例8: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
{
	GL11.glColor3d(1.0D, 1.0D, 1.0D);

	this.mc.renderEngine.bindTexture(ACCESSORIES);

	this.drawTexturedModalRect(this.width / 2 - 88, this.height / 2 - 166 / 2, 0, 0, 176, 166);

	GuiInventory.drawEntityOnScreen(this.guiLeft + 35, this.guiTop + 75, 30, (float)(this.guiLeft + 51) - (float)mouseX, (float)(this.guiTop + 75 - 50) - (float)mouseY, this.mc.thePlayer);
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:12,代码来源:GuiAccessories.java

示例9: GuiTeambattleOverlay

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
public GuiTeambattleOverlay(RenderGameOverlayEvent event) {
	mc = Minecraft.getMinecraft();

	if (!mc.gameSettings.showDebugInfo) {
		if (TConfigs.showHUD)
			drawLeftHud();
		if (TConfigs.showEntity) {
			float rotX = (float) (45 * Math.sin(mc.thePlayer.rotationYaw / 90 * Math.PI));
			GuiInventory.drawEntityOnScreen(event.resolution.getScaledWidth() - 25, event.resolution.getScaledHeight() - 10, 40, -rotX, -mc.thePlayer.rotationPitch, mc.thePlayer);
		}
	}

}
 
开发者ID:HyCraftHD,项目名称:TeambattleMod,代码行数:14,代码来源:GuiTeambattleOverlay.java

示例10: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
/**
 * Draws the background layer of the inventory.
 *
 * @param partialTicks The tick state of the client
 * @param mouseX       The X position of the mouse
 * @param mouseY       The Y position of the mouse
 */
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    GlStateManager.pushMatrix();
    {
        GlStateManager.color(1, 1, 1, 1);

        this.mc.getTextureManager().bindTexture(TEXTURE_GUI_WOLF_INVENTORY);

        int positionX = (this.width - this.xSize) / 2;
        int positionY = (this.height - this.ySize) / 2;
        this.drawTexturedModalRect(positionX, positionY, 0, 0, this.xSize, this.ySize);

        if (this.wolfArmor.getHasArmor()) {
            this.drawTexturedModalRect(positionX + 7, positionY + 17, this.xSize, 36, 18, 18);
        }

        if (this.wolfArmor.getHasChest()) {
            this.drawTexturedModalRect(positionX + 97, positionY + 17, this.xSize, 0, 54, 36);
        }

        GuiInventory.drawEntityOnScreen(positionX + 51, positionY + 60, 30, (float) (positionX + 51) - this.screenPositionX,
                (float) (positionY - 50) - this.screenPositionY, this.theWolf);

    }
    GlStateManager.popMatrix();
}
 
开发者ID:CenturionFox,项目名称:wolfarmor,代码行数:34,代码来源:GuiWolfInventory.java

示例11: drawScreen

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
	mc.getTextureManager().bindTexture(BACKGROUND_TEXTURES);
	drawTexturedModalRect((width - 174) / 2, (height - 161) / 2, 0, 0, 174, 161);
	int guiWidth = (width - 174) / 2 + 58, guiHeight = (height - 161) / 2 + 140;
	GuiInventory.drawEntityOnScreen(guiWidth, guiHeight, 60, guiWidth - mouseX, guiHeight - mouseY, player);
	list.drawScreen(mouseX, mouseY, partialTicks);
	super.drawScreen(mouseX, mouseY, partialTicks);
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:10,代码来源:GuiWardrobe.java

示例12: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float partTick, int mX, int mY)
{
    GL11.glColor4f(1F, 1F, 1F, 1F);
    Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
    this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    GuiInventory.drawEntityOnScreen(k + 51, l + 60, 17, (float) (k + 51) - mX, (float) (l + 75 - 50) - mY, this.dodo);
}
 
开发者ID:BubbleTrouble14,项目名称:ARKCraft,代码行数:12,代码来源:GuiInventoryDodo.java

示例13: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
  this.drawDefaultBackground();//dim the background as normal
  GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  this.mc.getTextureManager().bindTexture(background);
  int i = this.guiLeft;
  int j = this.guiTop;
  this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);
  //COPIED FROM GuiInventory
  GuiInventory.drawEntityOnScreen(i + 51, j + 75, 30, (float) (i + 51) - this.oldMouseX, (float) (j + 75 - 50) - this.oldMouseY, this.mc.player);
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:12,代码来源:GuiPlayerExtWorkbench.java

示例14: 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);
	if (entity instanceof EntityDarkZertum) {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins("Dark"));
	}
	else if (entity instanceof EntityDestroZertum) {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins("Destro"));
	}
	else if (entity instanceof EntityForisZertum) {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins("Foris"));
	}
	else if (entity instanceof EntityIceZertum) {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins("Ice"));
	}
	else if (entity instanceof EntityRedZertum) {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins("Red"));
	}
	else if (entity instanceof EntityMetalZertum) {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins("Metal"));
	}
	else {
		this.mc.getTextureManager().bindTexture(ResourceReference.getInventorySkins(""));
	}

	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.drawEntityOnScreen(l + 42, i1 + 51, 30, l + 51 - xSize_wolf, (i1 + 75) - 50 - ySize_wolf, this.entity);
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:38,代码来源:GuiPack.java

示例15: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.inventory.GuiInventory; //导入方法依赖的package包/类
/**
 * Draw the background layer for the GuiContainer (everything behind the items)
 */
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.renderEngine.bindTexture(resource);
    int var5 = this.getGuiLeft();
    int var6 = this.getGuiTop();
    this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
    GuiInventory.drawEntityOnScreen(var5 + 31, var6 + 75, 30, (float) (var5 + 51) - this.xSize_lo, (float) (var6 + 75 - 50) - this.ySize_lo, mc.player);
}
 
开发者ID:Mine-and-blade-admin,项目名称:Battlegear2,代码行数:13,代码来源:BattleEquipGUI.java


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