本文整理汇总了Java中net.minecraftforge.client.IItemRenderer类的典型用法代码示例。如果您正苦于以下问题:Java IItemRenderer类的具体用法?Java IItemRenderer怎么用?Java IItemRenderer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IItemRenderer类属于net.minecraftforge.client包,在下文中一共展示了IItemRenderer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleRenderType
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public boolean handleRenderType(final ItemStack item, final IItemRenderer.ItemRenderType type) {
switch (type) {
case ENTITY: {
return true;
}
case EQUIPPED: {
return true;
}
case EQUIPPED_FIRST_PERSON: {
return true;
}
case INVENTORY: {
return true;
}
default: {
return false;
}
}
}
示例2: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
renderForAll();
if (type == IItemRenderer.ItemRenderType.INVENTORY) {
renderInventory();
}
if (type == IItemRenderer.ItemRenderType.ENTITY) {
renderFloatingEntity();
}
if (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) {
renderFirstPerson();
}
if (type == IItemRenderer.ItemRenderType.EQUIPPED) {
renderThirdPerson();
}
render();
}
示例3: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(final IItemRenderer.ItemRenderType type, final ItemStack stack, final Object... data) {
if (!stack.hasTagCompound()) {
return;
}
final String mat = stack.getTagCompound().getString("mat");
final MicroMaterialRegistry.IMicroMaterial material = MicroMaterialRegistry.getMaterial(mat);
if (material == null) {
return;
}
GL11.glPushMatrix();
if (type == IItemRenderer.ItemRenderType.ENTITY) {
GL11.glScaled(0.5, 0.5, 0.5);
}
if (type == IItemRenderer.ItemRenderType.INVENTORY || type == IItemRenderer.ItemRenderType.ENTITY) {
GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
}
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glEnable(3008);
final CCRenderPipeline.PipelineBuilder builder = CCRenderState.pipeline.builder();
CCRenderState.reset();
TextureUtils.bindAtlas(0);
CCRenderState.useNormals = true;
CCRenderState.pullLightmap();
CCRenderState.startDrawing();
final IMicroBlock part = RegisterMicroBlocks.mParts.get(stack.getItemDamage());
if (part != null) {
part.renderItem(stack, material);
}
CCRenderState.draw();
GL11.glPopMatrix();
}
示例4: renderItemUniform
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
/**
* Renders items and blocks in the world at 0,0,0 with transformations that size them appropriately
* @param spin The spin angle of the item around the y axis in degrees
*/
public static void renderItemUniform(ItemStack item, double spin)
{
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, ENTITY);
boolean is3D = customRenderer != null && customRenderer.shouldUseRenderHelper(ENTITY, item, BLOCK_3D);
boolean larger = false;
if (item.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item.getItem()).getRenderType()))
{
int renderType = Block.getBlockFromItem(item.getItem()).getRenderType();
larger = !(renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2);
}
else if(is3D)
{
larger = true;
}
double d = 2;
double d1 = 1/d;
if(larger)
GL11.glScaled(d, d, d);
GL11.glColor4f(1, 1, 1, 1);
entityItem.setEntityItemStack(item);
uniformRenderItem.doRender(entityItem, 0, larger ? 0.09 : 0.06, 0, 0, (float)(spin*9/Math.PI));
if(larger)
GL11.glScaled(d1, d1, d1);
}
示例5: shouldUseRenderHelper
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper)
{
/* 34 */ return false;
}
示例6: handleRenderType
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public boolean handleRenderType(final ItemStack item, final IItemRenderer.ItemRenderType type) {
return true;
}
示例7: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(final IItemRenderer.ItemRenderType type, final ItemStack item, final Object... data) {
if (!(item.getItem() instanceof IItemMultiTransparency)) {
return;
}
GL11.glEnable(2896);
GL11.glEnable(2929);
final IItemMultiTransparency itemTrans = (IItemMultiTransparency)item.getItem();
if (type == IItemRenderer.ItemRenderType.INVENTORY) {
GL11.glScalef(16.0f, 16.0f, 1.0f);
}
else if (type == IItemRenderer.ItemRenderType.ENTITY) {
GL11.glTranslatef(-0.5f, -0.25f, 0.0f);
GL11.glDisable(2884);
}
final Tessellator tessellator = Tessellator.instance;
for (int i = 0; i < itemTrans.numIcons(item); ++i) {
final IIcon icon = itemTrans.getIconForTransparentRender(item, i);
final float trans = itemTrans.getIconTransparency(item, i);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glEnable(3008);
if (trans < 1.0f) {
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glDisable(3008);
GL11.glShadeModel(7425);
GL11.glColor4f(1.0f, 1.0f, 1.0f, trans);
if (type != IItemRenderer.ItemRenderType.INVENTORY) {
GL11.glEnable(32826);
ItemRenderer.renderItemIn2D(tessellator, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625f);
GL11.glDisable(32826);
}
else {
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0, 0.0, 0.03125, (double)icon.getMinU(), (double)icon.getMinV());
tessellator.addVertexWithUV(0.0, 1.0, 0.03125, (double)icon.getMinU(), (double)icon.getMaxV());
tessellator.addVertexWithUV(1.0, 1.0, 0.03125, (double)icon.getMaxU(), (double)icon.getMaxV());
tessellator.addVertexWithUV(1.0, 0.0, 0.03125, (double)icon.getMaxU(), (double)icon.getMinV());
tessellator.draw();
}
GL11.glShadeModel(7424);
GL11.glEnable(3008);
GL11.glDisable(3042);
}
else if (type != IItemRenderer.ItemRenderType.INVENTORY) {
GL11.glEnable(32826);
ItemRenderer.renderItemIn2D(tessellator, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625f);
GL11.glDisable(32826);
}
else {
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0, 0.0, 0.0, (double)icon.getMinU(), (double)icon.getMinV());
tessellator.addVertexWithUV(0.0, 1.0, 0.0, (double)icon.getMinU(), (double)icon.getMaxV());
tessellator.addVertexWithUV(1.0, 1.0, 0.0, (double)icon.getMaxU(), (double)icon.getMaxV());
tessellator.addVertexWithUV(1.0, 0.0, 0.0, (double)icon.getMaxU(), (double)icon.getMinV());
tessellator.draw();
}
}
if (type == IItemRenderer.ItemRenderType.INVENTORY) {
GL11.glScalef(0.0625f, 0.0625f, 1.0f);
}
else if (type == IItemRenderer.ItemRenderType.ENTITY) {
GL11.glTranslatef(0.5f, 0.25f, 0.0f);
GL11.glEnable(2884);
}
}
示例8: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data)
{
/* 39 */ if ((type == IItemRenderer.ItemRenderType.EQUIPPED) || (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)) {
/* 40 */ if (item.getItem() == ItemRegistry1.Adamantblade) {
/* 41 */ Adamantblade i = (Adamantblade)item.getItem();
/* 42 */ if (i.idle) {
/* 43 */ GL11.glPushMatrix();
/* 44 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 45 */ GL11.glTranslatef(0.6F, 0.2F, 0.0F);
/* 46 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 47 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 48 */ GL11.glRotatef(-240.0F, 1.0F, 0.0F, 0.0F);
/* 49 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.cardTexture);
/* 50 */ this.cardModel.renderAll();
/* 51 */ GL11.glPopMatrix();
} else {
/* 53 */ GL11.glPushMatrix();
/* 54 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 55 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 56 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 57 */ GL11.glRotatef(-40.0F, 1.0F, 0.0F, 0.0F);
/* 58 */ GL11.glTranslatef(0.0F, -0.55F, -0.2F);
/* 59 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.cardTexture);
/* 60 */ this.cardModel.renderAll();
/* 61 */ GL11.glPopMatrix();
}
}
}
/* 65 */ else if (type == IItemRenderer.ItemRenderType.ENTITY) {
/* 66 */ GL11.glPushMatrix();
/* 67 */ GL11.glScalef(3.0F, 3.0F, 3.0F);
/* 68 */ GL11.glTranslatef(0.0F, 1.3F, 0.0F);
/* 69 */ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
/* 70 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.cardTexture);
/* 71 */ this.cardModel.renderAll();
/* 72 */ GL11.glPopMatrix();
/* 73 */ } else if (type == IItemRenderer.ItemRenderType.INVENTORY) {
/* 74 */ GL11.glPushMatrix();
/* 75 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 76 */ GL11.glTranslatef(27.0F, 27.0F, 0.0F);
/* 77 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 78 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.cardTexture);
/* 79 */ this.cardModel.renderAll();
/* 80 */ GL11.glPopMatrix();
} else {
/* 82 */ GL11.glPushMatrix();
/* 83 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 84 */ GL11.glTranslatef(20.0F, 20.0F, 0.0F);
/* 85 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 86 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.cardTexture);
/* 87 */ this.cardModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}
示例9: handleRenderType
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public boolean handleRenderType(ItemStack item, IItemRenderer.ItemRenderType type)
{
/* 29 */ return true;
}
示例10: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data)
{
/* 39 */ if ((type == IItemRenderer.ItemRenderType.EQUIPPED) || (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)) {
/* 40 */ if (item.getItem() == ItemRegistry1.Blueleafflute) {
/* 41 */ Blueleafflute i = (Blueleafflute)item.getItem();
/* 42 */ if (i.idle) {
/* 43 */ GL11.glPushMatrix();
/* 44 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 45 */ GL11.glTranslatef(0.6F, 0.2F, 0.0F);
/* 46 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 47 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 48 */ GL11.glRotatef(-240.0F, 1.0F, 0.0F, 0.0F);
/* 49 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.BlueleaffluteTexture);
/* 50 */ this.BlueleaffluteModel.renderAll();
/* 51 */ GL11.glPopMatrix();
} else {
/* 53 */ GL11.glPushMatrix();
/* 54 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 55 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 56 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 57 */ GL11.glRotatef(-40.0F, 1.0F, 0.0F, 0.0F);
/* 58 */ GL11.glTranslatef(0.0F, -0.55F, -0.2F);
/* 59 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.BlueleaffluteTexture);
/* 60 */ this.BlueleaffluteModel.renderAll();
/* 61 */ GL11.glPopMatrix();
}
}
}
/* 65 */ else if (type == IItemRenderer.ItemRenderType.ENTITY) {
/* 66 */ GL11.glPushMatrix();
/* 67 */ GL11.glScalef(3.0F, 3.0F, 3.0F);
/* 68 */ GL11.glTranslatef(0.0F, 1.3F, 0.0F);
/* 69 */ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
/* 70 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.BlueleaffluteTexture);
/* 71 */ this.BlueleaffluteModel.renderAll();
/* 72 */ GL11.glPopMatrix();
/* 73 */ } else if (type == IItemRenderer.ItemRenderType.INVENTORY) {
/* 74 */ GL11.glPushMatrix();
/* 75 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 76 */ GL11.glTranslatef(27.0F, 27.0F, 0.0F);
/* 77 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 78 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.BlueleaffluteTexture);
/* 79 */ this.BlueleaffluteModel.renderAll();
/* 80 */ GL11.glPopMatrix();
} else {
/* 82 */ GL11.glPushMatrix();
/* 83 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 84 */ GL11.glTranslatef(20.0F, 20.0F, 0.0F);
/* 85 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 86 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.BlueleaffluteTexture);
/* 87 */ this.BlueleaffluteModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}
示例11: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data)
{
/* 39 */ if ((type == IItemRenderer.ItemRenderType.EQUIPPED) || (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)) {
/* 40 */ if (item.getItem() == ItemRegistry1.Cleansingstaff) {
/* 41 */ Cleansingstaff i = (Cleansingstaff)item.getItem();
/* 42 */ if (i.idle) {
/* 43 */ GL11.glPushMatrix();
/* 44 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 45 */ GL11.glTranslatef(0.6F, 0.2F, 0.0F);
/* 46 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 47 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 48 */ GL11.glRotatef(-240.0F, 1.0F, 0.0F, 0.0F);
/* 49 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.CleansingstaffTexture);
/* 50 */ this.CleansingstaffModel.renderAll();
/* 51 */ GL11.glPopMatrix();
} else {
/* 53 */ GL11.glPushMatrix();
/* 54 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 55 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 56 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 57 */ GL11.glRotatef(-40.0F, 1.0F, 0.0F, 0.0F);
/* 58 */ GL11.glTranslatef(0.0F, -0.55F, -0.2F);
/* 59 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.CleansingstaffTexture);
/* 60 */ this.CleansingstaffModel.renderAll();
/* 61 */ GL11.glPopMatrix();
}
}
}
/* 65 */ else if (type == IItemRenderer.ItemRenderType.ENTITY) {
/* 66 */ GL11.glPushMatrix();
/* 67 */ GL11.glScalef(3.0F, 3.0F, 3.0F);
/* 68 */ GL11.glTranslatef(0.0F, 1.3F, 0.0F);
/* 69 */ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
/* 70 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.CleansingstaffTexture);
/* 71 */ this.CleansingstaffModel.renderAll();
/* 72 */ GL11.glPopMatrix();
/* 73 */ } else if (type == IItemRenderer.ItemRenderType.INVENTORY) {
/* 74 */ GL11.glPushMatrix();
/* 75 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 76 */ GL11.glTranslatef(27.0F, 27.0F, 0.0F);
/* 77 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 78 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.CleansingstaffTexture);
/* 79 */ this.CleansingstaffModel.renderAll();
/* 80 */ GL11.glPopMatrix();
} else {
/* 82 */ GL11.glPushMatrix();
/* 83 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 84 */ GL11.glTranslatef(20.0F, 20.0F, 0.0F);
/* 85 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 86 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.CleansingstaffTexture);
/* 87 */ this.CleansingstaffModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}
示例12: handleRenderType
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public boolean handleRenderType(final ItemStack item, final IItemRenderer.ItemRenderType type) {
return type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON || type == IItemRenderer.ItemRenderType.EQUIPPED;
}
示例13: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(final IItemRenderer.ItemRenderType type, final ItemStack item, final Object... data) {
if (type == IItemRenderer.ItemRenderType.EQUIPPED) {
return;
}
GL11.glEnable(2896);
GL11.glEnable(2929);
final EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
GL11.glPushMatrix();
GL11.glEnable(32826);
GL11.glTranslatef(0.5f, 0.5f, 0.5f);
final float p_78440_1_ = this.renderTickTime;
final float f1 = 1.0f;
final float f2 = 0.8f;
final float f3 = 2.5f;
GL11.glScalef(f3, f3, f3);
float f4 = player.getSwingProgress(p_78440_1_);
float f5 = MathHelper.sin(f4 * f4 * 3.1415927f);
float f6 = MathHelper.sin(MathHelper.sqrt_float(f4) * 3.1415927f);
GL11.glRotatef(f6 * 80.0f, 1.0f, 0.0f, 0.0f);
GL11.glRotatef(f6 * 20.0f, 0.0f, 0.0f, 1.0f);
GL11.glRotatef(f5 * 20.0f, 0.0f, 1.0f, 0.0f);
GL11.glRotatef(-45.0f, 0.0f, 1.0f, 0.0f);
GL11.glTranslatef(-0.7f * f2, 0.65f * f2 + (1.0f - f1) * 0.6f, 0.9f * f2);
f4 = player.getSwingProgress(p_78440_1_);
f5 = MathHelper.sin(f4 * 3.1415927f);
f6 = MathHelper.sin(MathHelper.sqrt_float(f4) * 3.1415927f);
GL11.glTranslatef(f6 * 0.4f, -MathHelper.sin(MathHelper.sqrt_float(f4) * 3.1415927f * 2.0f) * 0.2f, f5 * 0.2f);
f4 = player.getSwingProgress(p_78440_1_);
f5 = MathHelper.sin(f4 * 3.1415927f);
f6 = MathHelper.sin(MathHelper.sqrt_float(f4) * 3.1415927f);
GL11.glTranslatef(-f6 * 0.3f, MathHelper.sin(MathHelper.sqrt_float(f4) * 3.1415927f * 2.0f) * 0.4f, -f5 * 0.4f);
GL11.glTranslatef(0.8f * f2, -0.75f * f2 - (1.0f - f1) * 0.6f, -0.9f * f2);
GL11.glRotatef(45.0f, 0.0f, 1.0f, 0.0f);
GL11.glEnable(32826);
f4 = player.getSwingProgress(p_78440_1_);
f5 = MathHelper.sin(f4 * f4 * 3.1415927f);
f6 = MathHelper.sin(MathHelper.sqrt_float(f4) * 3.1415927f);
GL11.glRotatef(f6 * 70.0f, 0.0f, 1.0f, 0.0f);
GL11.glRotatef(-f5 * 20.0f, 0.0f, 0.0f, 1.0f);
Minecraft.getMinecraft().getTextureManager().bindTexture(player.getLocationSkin());
GL11.glTranslatef(-1.0f, 3.6f, 3.5f);
GL11.glRotatef(120.0f, 0.0f, 0.0f, 1.0f);
GL11.glRotatef(200.0f, 1.0f, 0.0f, 0.0f);
GL11.glRotatef(-135.0f, 0.0f, 1.0f, 0.0f);
GL11.glScalef(1.0f, 1.0f, 1.0f);
GL11.glTranslatef(5.6f, 0.0f, 0.0f);
final RenderPlayer renderplayer = (RenderPlayer)RenderManager.instance.getEntityRenderObject((Entity)player);
final float f7 = 1.0f;
GL11.glScalef(f7, f7, f7);
renderplayer.renderFirstPersonArm((EntityPlayer)player);
GL11.glColor3f(1.0f, 1.0f, 1.0f);
renderplayer.modelBipedMain.onGround = 0.0f;
renderplayer.modelBipedMain.setRotationAngles(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0625f, (Entity)player);
renderplayer.modelBipedMain.bipedRightArm.render(0.0625f);
final int dmg = item.getItemDamage();
float[] col = EntitySheep.fleeceColorTable[ItemGlove.getColIndex(1, dmg)];
GL11.glColor3f(col[0], col[1], col[2]);
Minecraft.getMinecraft().getTextureManager().bindTexture(RenderItemGlove.glove1);
renderplayer.modelBipedMain.bipedRightArm.render(0.0625f);
col = EntitySheep.fleeceColorTable[ItemGlove.getColIndex(0, dmg)];
GL11.glColor3f(col[0], col[1], col[2]);
Minecraft.getMinecraft().getTextureManager().bindTexture(RenderItemGlove.glove2);
renderplayer.modelBipedMain.bipedRightArm.render(0.0625f);
GL11.glPopMatrix();
}
示例14: shouldUseRenderHelper
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public boolean shouldUseRenderHelper(final IItemRenderer.ItemRenderType type, final ItemStack item, final IItemRenderer.ItemRendererHelper helper) {
return true;
}
示例15: renderItem
import net.minecraftforge.client.IItemRenderer; //导入依赖的package包/类
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data)
{
/* 39 */ if ((type == IItemRenderer.ItemRenderType.EQUIPPED) || (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)) {
/* 40 */ if (item.getItem() == ItemRegistry1.Adamantblade) {
/* 41 */ Adamantblade i = (Adamantblade)item.getItem();
/* 42 */ if (i.idle) {
/* 43 */ GL11.glPushMatrix();
/* 44 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 45 */ GL11.glTranslatef(0.6F, 0.2F, 0.0F);
/* 46 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 47 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 48 */ GL11.glRotatef(-240.0F, 1.0F, 0.0F, 0.0F);
/* 49 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.AdamantbladeTexture);
/* 50 */ this.AdamantbladeModel.renderAll();
/* 51 */ GL11.glPopMatrix();
} else {
/* 53 */ GL11.glPushMatrix();
/* 54 */ GL11.glScalef(1.3F, 1.3F, 1.3F);
/* 55 */ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
/* 56 */ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
/* 57 */ GL11.glRotatef(-40.0F, 1.0F, 0.0F, 0.0F);
/* 58 */ GL11.glTranslatef(0.0F, -0.55F, -0.2F);
/* 59 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.AdamantbladeTexture);
/* 60 */ this.AdamantbladeModel.renderAll();
/* 61 */ GL11.glPopMatrix();
}
}
}
/* 65 */ else if (type == IItemRenderer.ItemRenderType.ENTITY) {
/* 66 */ GL11.glPushMatrix();
/* 67 */ GL11.glScalef(3.0F, 3.0F, 3.0F);
/* 68 */ GL11.glTranslatef(0.0F, 1.3F, 0.0F);
/* 69 */ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
/* 70 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.AdamantbladeTexture);
/* 71 */ this.AdamantbladeModel.renderAll();
/* 72 */ GL11.glPopMatrix();
/* 73 */ } else if (type == IItemRenderer.ItemRenderType.INVENTORY) {
/* 74 */ GL11.glPushMatrix();
/* 75 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 76 */ GL11.glTranslatef(27.0F, 27.0F, 0.0F);
/* 77 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 78 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.AdamantbladeTexture);
/* 79 */ this.AdamantbladeModel.renderAll();
/* 80 */ GL11.glPopMatrix();
} else {
/* 82 */ GL11.glPushMatrix();
/* 83 */ GL11.glRotatef(-60.0F, -1.0F, 1.0F, 0.0F);
/* 84 */ GL11.glTranslatef(20.0F, 20.0F, 0.0F);
/* 85 */ GL11.glScalef(14.0F, 14.0F, 14.0F);
/* 86 */ Minecraft.getMinecraft().renderEngine.bindTexture(this.AdamantbladeTexture);
/* 87 */ this.AdamantbladeModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}