Add item frame transformations to the EntityItem render helper Closes #407
This commit is contained in:
parent
0a2e78d0c6
commit
1c57f03722
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,7 @@ import net.minecraft.client.renderer.RenderBlocks;
|
|||
import net.minecraft.client.renderer.RenderEngine;
|
||||
import net.minecraft.client.renderer.RenderGlobal;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.TextureLoadEvent;
|
||||
|
@ -250,6 +251,13 @@ public class ForgeHooksClient
|
|||
int renderType = Block.blocksList[item.itemID].getRenderType();
|
||||
float scale = (renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2 ? 0.5F : 0.25F);
|
||||
|
||||
if (RenderItem.field_82407_g)
|
||||
{
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glTranslatef(0.0F, 0.05F, 0.0F);
|
||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
int size = item.stackSize;
|
||||
|
|
Loading…
Reference in a new issue