Rendering cleanup
Replaces the reflexive instantiation of the Renderes with a factory method. Some optimizations to the renderers to no longer push the whole OpenGL state to the stack. General cleanup of duplicate code, etc
This commit is contained in:
@@ -45,6 +45,7 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
if( !this.recursive && type == IItemRenderer.ItemRenderType.INVENTORY && isShiftHeld )
|
||||
{
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
|
||||
if( iep.getOutput( item ) != null )
|
||||
{
|
||||
return true;
|
||||
@@ -66,11 +67,10 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
this.recursive = true;
|
||||
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
|
||||
final ItemStack is = iep.getOutput( item );
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
GL11.glPushAttrib( GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
this.ri.renderItemAndEffectIntoGUI( mc.fontRenderer, mc.getTextureManager(), is, 0, 0 );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
Reference in New Issue
Block a user