@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
IIcon icon = item.getIconIndex();
GL11.glPushMatrix();
if(type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
GL11.glTranslatef(1.3f, .3f, 0);
GL11.glRotated(210, 0, 0, 1);
GL11.glRotated(180, 1, 0, 0);
ItemRenderer.renderItemIn2D(Tessellator.instance, ((IIcon)icon).getMinU(), ((IIcon)icon).getMinV(), ((IIcon)icon).getMaxU(), ((IIcon)icon).getMaxV(), ((IIcon)icon).getIconWidth(), ((IIcon)icon).getIconHeight(), 0.1f);
}
else if(type == ItemRenderType.EQUIPPED) {
GL11.glTranslatef(0.7f, 1.3f, 0);
GL11.glRotated(-70, 0, 0, 1);
GL11.glRotated(180, 1, 0, 0);
ItemRenderer.renderItemIn2D(Tessellator.instance, ((IIcon)icon).getMinU(), ((IIcon)icon).getMinV(), ((IIcon)icon).getMaxU(), ((IIcon)icon).getMaxV(), ((IIcon)icon).getIconWidth(), ((IIcon)icon).getIconHeight(), 0.1f);
}
GL11.glPopMatrix();
}
RendererLaserGun.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:AdvancedRocketry
作者:
评论列表
文章目录