本文整理汇总了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();
}
示例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();
}
示例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));
}
}
示例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);
}
示例5: RenderTileEntityPrimalChestAdvanced
import net.minecraft.client.model.ModelChest; //导入依赖的package包/类
public RenderTileEntityPrimalChestAdvanced() {
this.model = new ModelChest();
this.random = new Random();
}
示例6: RenderTileEntityPrimalChest
import net.minecraft.client.model.ModelChest; //导入依赖的package包/类
public RenderTileEntityPrimalChest() {
this.model = new ModelChest();
this.random = new Random();
}
示例7: makeModel
import net.minecraft.client.model.ModelChest; //导入依赖的package包/类
public ModelBase makeModel()
{
return new ModelChest();
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
}
示例13: RenderPoweredChest
import net.minecraft.client.model.ModelChest; //导入依赖的package包/类
public RenderPoweredChest() {
model = new ModelChest();
}
示例14: ItemRenderJenChest
import net.minecraft.client.model.ModelChest; //导入依赖的package包/类
public ItemRenderJenChest() {
chestModel = new ModelChest();
}
示例15: ItemRenderPatChest
import net.minecraft.client.model.ModelChest; //导入依赖的package包/类
public ItemRenderPatChest() {
chestModel = new ModelChest();
}