Help me update these lines of code from 1.7 to 1.8

3 posts / 0 new
Last post
Offline
Last seen: 2 weeks 2 days ago
Joined: 03/24/2014 - 10:24
Gems: 8
Help me update these lines of code from 1.7 to 1.8

Help me update these lines of code from 1.7 to 1.8

MCreator gives me the following errors:

C:\Pylo\MCreator158\forge\build\sources\java\mod\mcreator\mcreator_weapons1h.java:824: error: cannot find symbol
IIcon icon = item.getIconIndex();
^
  symbol:   class IIcon
  location: class NPC_BattleaxeRender

and 

C:\Pylo\MCreator158\forge\build\sources\java\mod\mcreator\mcreator_weapons1h.java:831: error: instance has private access in Tessellator
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 16F / 256F);

 

CODE:

public static class NPC_BattleaxeRender
implements IItemRenderer{

public boolean handleRenderType(ItemStack itemStack, IItemRenderer.ItemRenderType type){return true;}
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper){return false;}
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data){

IIcon icon = item.getIconIndex();

if (type == IItemRenderer.ItemRenderType.ENTITY){
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.0F, 0.0F);
GL11.glRotatef(0.0F, 1.0F, 0.0F, 0.0F);
GL11.glScalef(2.0F, 2.0F, 2.0F);
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 16F / 256F);
GL11.glPopMatrix();} if (type == IItemRenderer.ItemRenderType.INVENTORY){
GL11.glPushMatrix();
GL11.glTranslatef(15.0F, 1.0F, 0.0F);
GL11.glRotatef(225.0F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(21.0F, 15.0F, 2.0F);
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 16F / 256F);
GL11.glPopMatrix();} if (type == IItemRenderer.ItemRenderType.EQUIPPED){

GL11.glPushMatrix();
GL11.glTranslatef(1.0F, -0.02F, -0.05F);
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
GL11.glScalef(1.0F, 1.0F, 1.5F);
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 16F / 256F);
GL11.glPopMatrix();} if (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON){
GL11.glPushMatrix();
GL11.glTranslatef(30.0F, -45.0F, 35.0F);
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(80.0F, 0.0F, 0.0F, 1.0F);
GL11.glScalef(70.0F, 70.0F, 100.0F);
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 16F / 256F);
GL11.glPopMatrix();} }}



Offline
Last seen: 2 weeks 2 days ago
Joined: 03/24/2014 - 10:24
Gems: 8
Is there any support members

Is there any support members around? 

Help me fix this glitch!

[URL=http://s91.photobucket.com/user/oblisgr/media/glitch_zpse9yppcnw.png.htm...

Offline
Last seen: 2 weeks 2 days ago
Joined: 03/24/2014 - 10:24
Gems: 8
http://i91.photobucket.com