当前位置: 首页>>代码示例>>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;未经允许,请勿转载。