Cache Lighting Data.

This commit is contained in:
AlgorithmX2
2014-02-15 00:30:06 -06:00
parent ae35411d33
commit 644217baf5
15 changed files with 236 additions and 100 deletions
+3
View File
@@ -23,6 +23,7 @@ import appeng.api.parts.IPart;
import appeng.api.parts.IPartCollsionHelper;
import appeng.api.parts.IPartHost;
import appeng.api.parts.IPartRenderHelper;
import appeng.api.parts.ISimplifiedBundle;
import appeng.api.parts.PartItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -30,6 +31,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class PartCableAnchor implements IPart
{
protected ISimplifiedBundle renderCache = null;
ItemStack is = null;
ForgeDirection mySide = ForgeDirection.UP;
@@ -41,6 +43,7 @@ public class PartCableAnchor implements IPart
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
renderCache = rh.useSimpliedRendering( x, y, z, this, renderCache );
IIcon myIcon = is.getIconIndex();
rh.setTexture( myIcon );
rh.setBounds( 7, 7, 10, 9, 9, 16 );
+1 -1
View File
@@ -84,7 +84,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
rh.useSimpliedRendering( x, y, z, this );
renderCache = rh.useSimpliedRendering( x, y, z, this, renderCache );
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
+1 -1
View File
@@ -283,7 +283,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
rh.useSimpliedRendering( x, y, z, this );
renderCache = rh.useSimpliedRendering( x, y, z, this, renderCache );
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
+1 -1
View File
@@ -165,7 +165,7 @@ public class PartToggleBus extends PartBasicState
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
rh.useSimpliedRendering( x, y, z, this );
renderCache = rh.useSimpliedRendering( x, y, z, this, renderCache );
rh.setTexture( is.getIconIndex() );
rh.setBounds( 6, 6, 14, 10, 10, 16 );