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


Java ModelChest類代碼示例

本文整理匯總了Java中net.minecraft.client.model.ModelChest的典型用法代碼示例。如果您正苦於以下問題:Java ModelChest類的具體用法?Java ModelChest怎麽用?Java ModelChest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: renderChest

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public static void renderChest(ItemStack stack, float lidAngle) {
	ModelChest modelChest = new ModelChest();
	GlStateManager.color(1, 1, 1, 1);
	RenderUtils.bindTexture(getChestType(stack).modelTexture);
	GlStateManager.pushMatrix();
	GlStateManager.enableRescaleNormal();
	GlStateManager.color(1, 1, 1, 1);
	GlStateManager.translate(0, 1.0, 1.0F);
	GlStateManager.scale(1.0F, -1.0F, -1.0F);
	GlStateManager.translate(0.5F, 0.5F, 0.5F);
	GlStateManager.rotate(2 * 90, 0.0F, 1.0F, 0.0F);
	GlStateManager.translate(-0.5F, -0.5F, -0.5F);
	modelChest.chestLid.rotateAngleX = lidAngle;
	modelChest.renderAll();
	GlStateManager.popMatrix();
}
 
開發者ID:p455w0rd,項目名稱:EndermanEvolution,代碼行數:18,代碼來源:IronChests.java

示例2: render

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
@Override
public void render( EntityLivingBase entity, ItemStack stack, String modName, float par2, float par3, float par4, float par5, float par6, float par7 )
{
	TextureManager re = Minecraft.getMinecraft().getTextureManager();

	EquipmentItem equipment = ( EquipmentItem ) stack.getItem();
	BackpackModifier mod = ( BackpackModifier ) Modifier.getModifier( modName );
	
	ClientUtils.bindTexture( mod.getModelTexture( equipment.equipment.getModifierLevel( stack, modName ) ) );
	ModelChest chest = new ModelChest();
	
	GL11.glScalef( 0.5f, 0.5f, 0.5f );
	GL11.glRotatef( 180, 0, 1, 0 );
	GL11.glTranslatef( -0.5f, 0, -0.75f );
	chest.renderAll();
}
 
開發者ID:spacechase0,項目名稱:ComponentEquipment,代碼行數:17,代碼來源:BackpackRenderer.java

示例3: getModelRenderer

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelChest))
    {
        return null;
    }
    else
    {
        ModelChest modelchest = (ModelChest)model;
        return modelPart.equals("lid") ? modelchest.chestLid : (modelPart.equals("base") ? modelchest.chestBelow : (modelPart.equals("knob") ? modelchest.chestKnob : null));
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:13,代碼來源:ModelAdapterChest.java

示例4: render

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public void render(BlockARChest chestBlock, boolean isDouble, double x, double y, double z)
{
    ModelChest chestModel = null;
    //ModelLargeChest largeModel = null;

    if (!isDouble)
    {
        chestModel = this.chestModel;
        Minecraft.getMinecraft().renderEngine.bindTexture(((BlockARChest)chestBlock).getSmallTexture());
    }
    else
    {
        chestModel = this.largeChestModel;
        Minecraft.getMinecraft().renderEngine.bindTexture(((BlockARChest)chestBlock).getLargeTexture());
    }

    GL11.glPushMatrix();
    //GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
    GL11.glScalef(1.0F, -1.0F, -1.0F);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    GL11.glRotated(-90, 0, 1, 0);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);


    chestModel.renderAll();


    //GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
 
開發者ID:katzenpapst,項目名稱:amunra,代碼行數:34,代碼來源:ModelARChest.java

示例5: RenderTileEntityPrimalChestAdvanced

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public RenderTileEntityPrimalChestAdvanced() {
    this.model = new ModelChest();
    this.random = new Random();
}
 
開發者ID:jaredlll08,項目名稱:PrimalChests,代碼行數:5,代碼來源:RenderTileEntityPrimalChestAdvanced.java

示例6: RenderTileEntityPrimalChest

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public RenderTileEntityPrimalChest() {
    this.model = new ModelChest();
    this.random = new Random();
}
 
開發者ID:jaredlll08,項目名稱:PrimalChests,代碼行數:5,代碼來源:RenderTileEntityPrimalChest.java

示例7: makeModel

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public ModelBase makeModel()
{
    return new ModelChest();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:ModelAdapterChest.java

示例8: renderSpaceship

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
@Override
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    if (item.getItemDamage() < 10)
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
        this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
    }
    else
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier2Rocket.cargoRocketTexture);
        this.cargoRocketModel.renderAll();
        GL11.glPopMatrix();
    }

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier1Rocket.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:53,代碼來源:ItemRendererTier2Rocket.java

示例9: renderSpaceship

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
    this.modelSpaceship.renderAll();
    GL11.glPopMatrix();

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier3Rocket.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:42,代碼來源:ItemRendererTier3Rocket.java

示例10: renderSpaceship

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
    this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier1Rocket.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:42,代碼來源:ItemRendererTier1Rocket.java

示例11: renderTileEntityChestAt

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
/**
 * Renders the TileEntity for the chest at a position.
 */
public void renderTileEntityChestAt(TileEntityHauntedChest te, double x, double y, double z, float par8) {
    int metadata = 0;

    if(te == null) {
        te = CHEST_TE;
    }

    GL11.glPushMatrix();
    if (te.hasWorld()) {
        metadata = te.getBlockMetadata();
    } else {
        GL11.glRotatef(45, 0, 1, 0);
        GL11.glScalef(0.6F, 0.6F, 0.6F);
        GL11.glTranslatef((float) x + 0.2F, (float) y + 0.3F, (float) z);
    }


    ModelChest modelchest = this.chestModel;

    if (this.isChristmas) {
        this.bindTexture(Resources.CHRISTMAS_CHEST);
    } else {
        this.bindTexture(Resources.DEFAULT_CHEST);
    }

    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1, 1, 1, 1);
    GL11.glTranslatef((float) x, (float) y + 1, (float) z + 1);
    GL11.glScalef(1, -1, -1);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    float direction = 0;

    switch (metadata) {
        case 2:
            direction = 180;
            break;
        case 3:
            direction = 0;
            break;
        case 4:
            direction = 90;
            break;
        case 5:
            direction = -90;
            break;
    }

    GL11.glRotatef(direction, 0, 1, 0);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    float f1 = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * par8;

    f1 = 1 - f1;
    f1 = 1 - f1 * f1 * f1;
    modelchest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2F);
    modelchest.renderAll();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1, 1, 1, 1);
}
 
開發者ID:NightKosh,項目名稱:Gravestone-mod-Extended,代碼行數:63,代碼來源:TileEntityHauntedChestRenderer.java

示例12: renderTileEntityAt

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
@Override
public void renderTileEntityAt(TileEntityLimitableChest te, double x, double y, double z, float partialTicks, int destroyStage, IBlockState state) {

	GlStateManager.enableDepth();
	GlStateManager.depthFunc(515);
	GlStateManager.depthMask(true);
	int i;
	if (te == null)
		te = TileEntityLimitableChestRenderer.te;
	if (!te.hasWorld()) {
		i = 0;
	} else {
		i = te.getBlockMetadata();
	}

	ModelChest modelchest;
	modelchest = this.simpleChest;

	if (destroyStage >= 0) {
		this.bindTexture(DESTROY_STAGES[destroyStage]);
		GlStateManager.matrixMode(5890);
		GlStateManager.pushMatrix();
		GlStateManager.scale(4.0F, 4.0F, 1.0F);
		GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
		GlStateManager.matrixMode(5888);
	}
	this.bindTexture(textureNormal);

	GlStateManager.pushMatrix();
	GlStateManager.enableRescaleNormal();

	if (destroyStage < 0) {
		GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
	}

	GlStateManager.translate((float) x, (float) y + 1.0F, (float) z + 1.0F);
	GlStateManager.scale(1.0F, -1.0F, -1.0F);
	GlStateManager.translate(0.5F, 0.5F, 0.5F);
	int j = 0;

	if (i == 2) {
		j = 180;
	}

	if (i == 3) {
		j = 0;
	}

	if (i == 4) {
		j = 90;
	}

	if (i == 5) {
		j = -90;
	}

	GlStateManager.rotate(j, 0.0F, 1.0F, 0.0F);
	GlStateManager.translate(-0.5F, -0.5F, -0.5F);
	float f = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;

	f = 1.0F - f;
	f = 1.0F - f * f * f;
	modelchest.chestLid.rotateAngleX = -(f * (float) Math.PI / 2.0F);
	modelchest.renderAll();
	GlStateManager.disableRescaleNormal();
	GlStateManager.popMatrix();
	GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

	if (destroyStage >= 0) {
		GlStateManager.matrixMode(5890);
		GlStateManager.popMatrix();
		GlStateManager.matrixMode(5888);
	}
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:75,代碼來源:TileEntityLimitableChestRenderer.java

示例13: RenderPoweredChest

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public RenderPoweredChest() {
	model = new ModelChest();
}
 
開發者ID:roryclaasen,項目名稱:RorysMod,代碼行數:4,代碼來源:RenderPoweredChest.java

示例14: ItemRenderJenChest

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public ItemRenderJenChest() {
	chestModel = new ModelChest();
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:4,代碼來源:ItemRenderJenChest.java

示例15: ItemRenderPatChest

import net.minecraft.client.model.ModelChest; //導入依賴的package包/類
public ItemRenderPatChest() {
	chestModel = new ModelChest();
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:4,代碼來源:ItemRenderPatChest.java


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