Cache Lighting Data.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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() );
|
||||
|
||||
|
||||
@@ -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() );
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user