Cache Lighting Data.
This commit is contained in:
@@ -28,6 +28,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 appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -43,6 +44,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradeableHost
|
||||
{
|
||||
|
||||
protected ISimplifiedBundle renderCache = null;
|
||||
|
||||
protected AENetworkProxy proxy;
|
||||
protected TileEntity tile = null;
|
||||
protected IPartHost host = null;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||
|
||||
boolean isActive = (clientFlags & (POWERED_FLAG | CHANNEL_FLAG)) == (POWERED_FLAG | CHANNEL_FLAG);
|
||||
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
renderCache = rh.useSimpliedRendering( x, y, z, this, renderCache );
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(),
|
||||
CableBusTextures.PartTransitionPlaneBack.getIcon(), isActive ? CableBusTextures.BlockAnnihilationPlaneOn.getIcon() : is.getIconIndex(),
|
||||
CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
@@ -77,7 +77,7 @@ public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
||||
@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() );
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PartFormationPlane extends PartBasicState
|
||||
|
||||
boolean isActive = (clientFlags & (POWERED_FLAG | CHANNEL_FLAG)) == (POWERED_FLAG | CHANNEL_FLAG);
|
||||
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
renderCache = rh.useSimpliedRendering( x, y, z, this, renderCache );
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(),
|
||||
CableBusTextures.PartTransitionPlaneBack.getIcon(), isActive ? CableBusTextures.BlockFormPlaneOn.getIcon() : is.getIconIndex(),
|
||||
CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
@@ -98,7 +98,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I
|
||||
@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() );
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -752,7 +752,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
@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 );
|
||||
boolean useCovered = false;
|
||||
boolean requireDetailed = false;
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ public class PartCableCovered extends PartCable
|
||||
@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( getTexture( getCableColor() ) );
|
||||
|
||||
EnumSet<ForgeDirection> sides = connections.clone();
|
||||
|
||||
@@ -156,7 +156,7 @@ public class PartCableSmart extends PartCable
|
||||
@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( getTexture( getCableColor() ) );
|
||||
|
||||
EnumSet<ForgeDirection> sides = connections.clone();
|
||||
|
||||
@@ -285,7 +285,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> 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( getTypeTexture() );
|
||||
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
|
||||
Reference in New Issue
Block a user