本文整理汇总了Java中net.minecraftforge.client.IItemRenderer.ItemRenderType方法的典型用法代码示例。如果您正苦于以下问题:Java IItemRenderer.ItemRenderType方法的具体用法?Java IItemRenderer.ItemRenderType怎么用?Java IItemRenderer.ItemRenderType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.client.IItemRenderer
的用法示例。
在下文中一共展示了IItemRenderer.ItemRenderType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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.Demonbell) {
/* 41 */ Demonbell i = (Demonbell)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.DemonbellTexture);
/* 50 */ this.DemonbellModel.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.DemonbellTexture);
/* 60 */ this.DemonbellModel.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.DemonbellTexture);
/* 71 */ this.DemonbellModel.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.DemonbellTexture);
/* 79 */ this.DemonbellModel.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.DemonbellTexture);
/* 87 */ this.DemonbellModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}
示例2: 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.Battlefolio) {
/* 41 */ Battlefolio i = (Battlefolio)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.BattlefolioTexture);
/* 50 */ this.BattlefolioModel.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.BattlefolioTexture);
/* 60 */ this.BattlefolioModel.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.BattlefolioTexture);
/* 71 */ this.BattlefolioModel.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.BattlefolioTexture);
/* 79 */ this.BattlefolioModel.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.BattlefolioTexture);
/* 87 */ this.BattlefolioModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}
示例3: 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);
}
}
示例4: handleRenderType
import net.minecraftforge.client.IItemRenderer; //导入方法依赖的package包/类
public boolean handleRenderType(final ItemStack item, final IItemRenderer.ItemRenderType type) {
return true;
}
示例5: shouldUseRenderHelper
import net.minecraftforge.client.IItemRenderer; //导入方法依赖的package包/类
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper)
{
/* 34 */ return false;
}
示例6: 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();
}
}
示例7: handleRenderType
import net.minecraftforge.client.IItemRenderer; //导入方法依赖的package包/类
public boolean handleRenderType(ItemStack item, IItemRenderer.ItemRenderType type)
{
/* 29 */ return true;
}
示例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.Airblade) {
/* 41 */ Airblade i = (Airblade)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.AirbladeTexture);
/* 50 */ this.AirbladeModel.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.AirbladeTexture);
/* 60 */ this.AirbladeModel.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.AirbladeTexture);
/* 71 */ this.AirbladeModel.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.AirbladeTexture);
/* 79 */ this.AirbladeModel.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.AirbladeTexture);
/* 87 */ this.AirbladeModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}
示例9: 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.Conchshell) {
/* 41 */ Conchshell i = (Conchshell)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.ConchshellTexture);
/* 50 */ this.ConchshellModel.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.ConchshellTexture);
/* 60 */ this.ConchshellModel.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.ConchshellTexture);
/* 71 */ this.ConchshellModel.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.ConchshellTexture);
/* 79 */ this.ConchshellModel.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.ConchshellTexture);
/* 87 */ this.ConchshellModel.renderAll();
/* 88 */ GL11.glPopMatrix();
}
}