Make Plugs more visible in hand

This commit is contained in:
CovertJaguar 2013-08-28 19:36:59 -07:00
parent 5cd49d2f8c
commit cfd89df7b9

View file

@ -8,6 +8,7 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraftforge.client.IItemRenderer;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON;
import org.lwjgl.opengl.GL11;
public class PlugItemRenderer implements IItemRenderer {
@ -63,6 +64,8 @@ public class PlugItemRenderer implements IItemRenderer{
return true;
case EQUIPPED:
return true;
case EQUIPPED_FIRST_PERSON:
return true;
case INVENTORY:
return true;
default:
@ -72,7 +75,7 @@ public class PlugItemRenderer implements IItemRenderer{
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
return helper != ItemRendererHelper.BLOCK_3D;
}
@Override
@ -83,6 +86,11 @@ public class PlugItemRenderer implements IItemRenderer{
renderPlugItem((RenderBlocks) data[0], item, -0.6F, 0f, -0.6F);
break;
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
GL11.glRotatef(70, 0, 0, 1F);
GL11.glRotatef(-55, 1, 0, 0);
GL11.glScalef(2F, 2F, 2F);
GL11.glTranslatef(0, -0.6F, -0.4F);
renderPlugItem((RenderBlocks) data[0], item, 0F, 0F, 0f);
break;
case INVENTORY: