Fixed bug with Energy Inject/Extract Averages.
SideOnly All the things. Pulled Rendering for CableContainers out into a Proxy.
This commit is contained in:
@@ -37,6 +37,8 @@ import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.me.helpers.IGridProxyable;
|
||||
import appeng.parts.networking.PartCable;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradeableHost
|
||||
{
|
||||
@@ -55,6 +57,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setBounds( 1, 1, 1, 15, 15, 15 );
|
||||
@@ -65,6 +68,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setBounds( 1, 1, 1, 15, 15, 15 );
|
||||
@@ -72,6 +76,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
@@ -206,6 +211,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random r)
|
||||
{
|
||||
|
||||
|
||||
@@ -3,13 +3,11 @@ package appeng.parts;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -39,12 +37,13 @@ import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.client.render.BusRenderHelper;
|
||||
import appeng.client.render.BusRenderer;
|
||||
import appeng.client.render.RenderBlocksWorkaround;
|
||||
import appeng.client.render.CableRenderHelper;
|
||||
import appeng.facade.FacadeContainer;
|
||||
import appeng.helpers.AEMultiTile;
|
||||
import appeng.me.GridConnection;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
{
|
||||
@@ -521,154 +520,16 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(double x, double y, double z)
|
||||
{
|
||||
TileEntity te = getTile();
|
||||
RenderBlocksWorkaround renderer = BusRenderer.instance.renderer;
|
||||
|
||||
if ( renderer.blockAccess == null )
|
||||
renderer.blockAccess = Minecraft.getMinecraft().theWorld;
|
||||
|
||||
for (ForgeDirection s : ForgeDirection.values())
|
||||
{
|
||||
setSide( s );
|
||||
|
||||
IPart part = getPart( s );
|
||||
if ( part != null )
|
||||
{
|
||||
renderer.renderAllFaces = true;
|
||||
part.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.instance, renderer );
|
||||
|
||||
renderer.faces = EnumSet.allOf( ForgeDirection.class );
|
||||
renderer.calculations = true;
|
||||
renderer.useTextures = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !fc.isEmpty() )
|
||||
{
|
||||
/**
|
||||
* snag list of boxes...
|
||||
*/
|
||||
List<AxisAlignedBB> boxes = new ArrayList();
|
||||
for (ForgeDirection s : ForgeDirection.values())
|
||||
{
|
||||
IPart part = getPart( s );
|
||||
if ( part != null )
|
||||
{
|
||||
setSide( s );
|
||||
BusCollisionHelper bch = new BusCollisionHelper( boxes, BusRenderHelper.instance.ax, BusRenderHelper.instance.ay,
|
||||
BusRenderHelper.instance.az, null, true );
|
||||
part.getBoxes( bch );
|
||||
}
|
||||
}
|
||||
|
||||
boolean useThinFacades = false;
|
||||
double min = 2.0 / 16.0;
|
||||
double max = 14.0 / 16.0;
|
||||
|
||||
for (AxisAlignedBB bb : boxes)
|
||||
{
|
||||
int o = 0;
|
||||
o += bb.maxX > max ? 1 : 0;
|
||||
o += bb.maxY > max ? 1 : 0;
|
||||
o += bb.maxZ > max ? 1 : 0;
|
||||
o += bb.minX < min ? 1 : 0;
|
||||
o += bb.minY < min ? 1 : 0;
|
||||
o += bb.minZ < min ? 1 : 0;
|
||||
|
||||
if ( o >= 2 )
|
||||
useThinFacades = true;
|
||||
}
|
||||
|
||||
for (ForgeDirection s : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
IFacadePart fPart = fc.getFacade( s );
|
||||
if ( fPart != null )
|
||||
{
|
||||
AxisAlignedBB b = null;
|
||||
fPart.setThinFacades( useThinFacades );
|
||||
AxisAlignedBB pb = fPart.getPrimaryBox();
|
||||
for (AxisAlignedBB bb : boxes)
|
||||
{
|
||||
if ( bb.intersectsWith( pb ) )
|
||||
{
|
||||
if ( b == null )
|
||||
b = bb;
|
||||
else
|
||||
{
|
||||
b.maxX = Math.max( b.maxX, bb.maxX );
|
||||
b.maxY = Math.max( b.maxY, bb.maxY );
|
||||
b.maxZ = Math.max( b.maxZ, bb.maxZ );
|
||||
b.minX = Math.min( b.minX, bb.minX );
|
||||
b.minY = Math.min( b.minY, bb.minY );
|
||||
b.minZ = Math.min( b.minZ, bb.minZ );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setSide( s );
|
||||
fPart.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.instance, renderer, fc, b, getPart( s ) == null );
|
||||
}
|
||||
}
|
||||
|
||||
renderer.isFacade = false;
|
||||
renderer.enableAO = false;
|
||||
renderer.setTexture( null );
|
||||
renderer.calculations = true;
|
||||
}
|
||||
CableRenderHelper.getInstance().renderStatic( this, fc );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDynamic(double x, double y, double z)
|
||||
{
|
||||
for (ForgeDirection s : ForgeDirection.values())
|
||||
{
|
||||
IPart part = getPart( s );
|
||||
if ( part != null )
|
||||
{
|
||||
switch (s)
|
||||
{
|
||||
case DOWN:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.EAST;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.NORTH;
|
||||
BusRenderHelper.instance.az = ForgeDirection.DOWN;
|
||||
break;
|
||||
case UP:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.EAST;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.SOUTH;
|
||||
BusRenderHelper.instance.az = ForgeDirection.UP;
|
||||
break;
|
||||
case EAST:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.SOUTH;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.UP;
|
||||
BusRenderHelper.instance.az = ForgeDirection.EAST;
|
||||
break;
|
||||
case WEST:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.NORTH;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.UP;
|
||||
BusRenderHelper.instance.az = ForgeDirection.WEST;
|
||||
break;
|
||||
case NORTH:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.WEST;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.UP;
|
||||
BusRenderHelper.instance.az = ForgeDirection.NORTH;
|
||||
break;
|
||||
case SOUTH:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.EAST;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.UP;
|
||||
BusRenderHelper.instance.az = ForgeDirection.SOUTH;
|
||||
break;
|
||||
case UNKNOWN:
|
||||
default:
|
||||
BusRenderHelper.instance.ax = ForgeDirection.EAST;
|
||||
BusRenderHelper.instance.ay = ForgeDirection.UP;
|
||||
BusRenderHelper.instance.az = ForgeDirection.SOUTH;
|
||||
break;
|
||||
|
||||
}
|
||||
part.renderDynamic( x, y, z, BusRenderHelper.instance, BusRenderer.instance.renderer );
|
||||
}
|
||||
}
|
||||
CableRenderHelper.getInstance().renderDynamic( this, x, y, z );
|
||||
}
|
||||
|
||||
public void writeToStream(DataOutputStream data) throws IOException
|
||||
|
||||
@@ -10,6 +10,8 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.parts.SelectedPart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public interface ICableBusContainer
|
||||
{
|
||||
@@ -36,6 +38,7 @@ public interface ICableBusContainer
|
||||
|
||||
boolean isLadder(EntityLivingBase entity);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void randomDisplayTick(World world, int x, int y, int z, Random r);
|
||||
|
||||
int getLightValue();
|
||||
|
||||
@@ -15,6 +15,8 @@ import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.me.GridAccessException;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartBasicState extends AEBasePart
|
||||
{
|
||||
@@ -57,6 +59,7 @@ public class PartBasicState extends AEBasePart
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderLights(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.normalRendering();
|
||||
|
||||
@@ -10,6 +10,8 @@ import appeng.api.parts.IPartHost;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.parts.PartBasicState;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartAnnihilationPlane extends PartBasicState
|
||||
{
|
||||
@@ -19,6 +21,7 @@ public class PartAnnihilationPlane extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
@@ -32,6 +35,7 @@ public class PartAnnihilationPlane extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
int minX = 1;
|
||||
|
||||
@@ -25,6 +25,8 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
||||
{
|
||||
@@ -54,6 +56,7 @@ public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
@@ -71,6 +74,7 @@ public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
|
||||
@@ -10,6 +10,8 @@ import appeng.api.parts.IPartHost;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.parts.PartBasicState;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartFormationPlane extends PartBasicState
|
||||
{
|
||||
@@ -19,6 +21,7 @@ public class PartFormationPlane extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
@@ -32,6 +35,7 @@ public class PartFormationPlane extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
int minX = 1;
|
||||
|
||||
@@ -30,6 +30,8 @@ import appeng.me.GridAccessException;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.inv.IInventoryDestination;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartImportBus extends PartSharedItemBus implements IGridTickable, IInventoryDestination
|
||||
{
|
||||
@@ -76,6 +78,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
@@ -92,6 +95,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
|
||||
@@ -39,6 +39,8 @@ import appeng.me.GridAccessException;
|
||||
import appeng.tile.inventory.AppEngInternalAEInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartLevelEmitter extends PartUpgradeable implements IStackWatcherHost, IMEMonitorHandlerReciever<IAEItemStack>
|
||||
{
|
||||
@@ -250,6 +252,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IStackWatcherHo
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( is.getIconIndex() );
|
||||
@@ -446,6 +449,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IStackWatcherHo
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( is.getIconIndex() );
|
||||
|
||||
@@ -24,6 +24,8 @@ import appeng.api.parts.IPartCollsionHelper;
|
||||
import appeng.api.parts.IPartHost;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.api.parts.PartItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartCableAnchor implements IPart
|
||||
{
|
||||
@@ -36,6 +38,7 @@ public class PartCableAnchor implements IPart
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
Icon myIcon = is.getIconIndex();
|
||||
@@ -46,12 +49,14 @@ public class PartCableAnchor implements IPart
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random r)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
||||
{
|
||||
instance.setTexture( is.getIconIndex() );
|
||||
@@ -79,6 +84,7 @@ public class PartCableAnchor implements IPart
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ import appeng.tile.inventory.IAEAppEngInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.inv.IInventoryDestination;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartInterface extends PartBasicState implements IGridTickable, ISegmentedInventory, IStorageMonitorable, IInventoryDestination, IInterfaceHost,
|
||||
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable
|
||||
@@ -62,6 +64,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
@@ -78,6 +81,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
|
||||
@@ -55,6 +55,8 @@ import buildcraft.api.transport.IPipeConnection;
|
||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Interface(modid = "BuildCraft|Transport", iface = "buildcraft.api.transport.IPipeConnection")
|
||||
public class PartStorageBus extends PartUpgradeable implements IGridTickable, ICellContainer, IMEMonitorHandlerReciever<IAEItemStack>, IPipeConnection,
|
||||
@@ -261,6 +263,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
@@ -277,6 +280,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
|
||||
@@ -25,6 +25,8 @@ import appeng.client.texture.CableBusTextures;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.parts.PartBasicState;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartToggleBus extends PartBasicState
|
||||
{
|
||||
@@ -158,6 +160,7 @@ public class PartToggleBus extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
@@ -186,6 +189,7 @@ public class PartToggleBus extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
|
||||
@@ -37,6 +37,8 @@ import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.parts.AEBasePart;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartCable extends AEBasePart implements IPartCable
|
||||
{
|
||||
@@ -355,6 +357,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
@@ -365,6 +368,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
rh.setTexture( null );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void rendereGlassConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, ForgeDirection of)
|
||||
{
|
||||
TileEntity te = this.tile.worldObj.getBlockTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
|
||||
@@ -472,6 +476,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderCoveredConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
|
||||
{
|
||||
TileEntity te = this.tile.worldObj.getBlockTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
|
||||
@@ -573,6 +578,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderSmartConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
|
||||
{
|
||||
TileEntity te = this.tile.worldObj.getBlockTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
|
||||
@@ -694,6 +700,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void setSmartConnectionRotations(ForgeDirection of, RenderBlocks renderer)
|
||||
{
|
||||
switch (of)
|
||||
@@ -728,6 +735,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void renderAllFaces(AEBaseBlock blk, int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
renderer.renderFaceXNeg( blk, x, y, z, blk.getRendererInstance().getTexture( ForgeDirection.WEST ) );
|
||||
@@ -739,6 +747,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
boolean useCovered = false;
|
||||
|
||||
@@ -22,6 +22,8 @@ import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.client.texture.OffsetIcon;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartCableCovered extends PartCable
|
||||
{
|
||||
@@ -97,6 +99,7 @@ public class PartCableCovered extends PartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
@@ -108,6 +111,7 @@ public class PartCableCovered extends PartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( getTexture( getCableColor() ) );
|
||||
|
||||
@@ -26,6 +26,8 @@ import appeng.client.texture.FlipableIcon;
|
||||
import appeng.client.texture.OffsetIcon;
|
||||
import appeng.client.texture.TaughtIcon;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartCableSmart extends PartCable
|
||||
{
|
||||
@@ -59,6 +61,7 @@ public class PartCableSmart extends PartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
@@ -121,6 +124,7 @@ public class PartCableSmart extends PartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( getTexture( getCableColor() ) );
|
||||
|
||||
@@ -30,6 +30,8 @@ import appeng.client.texture.FlipableIcon;
|
||||
import appeng.client.texture.OffsetIcon;
|
||||
import appeng.client.texture.TaughtIcon;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartDenseCable extends PartCable
|
||||
{
|
||||
@@ -73,6 +75,7 @@ public class PartDenseCable extends PartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
@@ -189,6 +192,7 @@ public class PartDenseCable extends PartCable
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDenseConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
|
||||
{
|
||||
TileEntity te = this.tile.worldObj.getBlockTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
|
||||
@@ -197,40 +201,31 @@ public class PartDenseCable extends PartCable
|
||||
boolean isGlass = false;
|
||||
AEColor myColor = getCableColor();
|
||||
/*
|
||||
* ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) ==
|
||||
* AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null ) {
|
||||
* isGlass = true; rh.setTexture( getGlassTexture( myColor =
|
||||
* ccph.getColor() ) ); } else if ( ccph == null && ghh != null &&
|
||||
* ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
|
||||
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN:
|
||||
* rh.setBounds( 3, 0, 3, 13, 4, 13 ); break; case EAST: rh.setBounds(
|
||||
* 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13,
|
||||
* 13, 4 ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 );
|
||||
* break; case UP: rh.setBounds( 3, 12, 3, 13, 16, 13 ); break; case
|
||||
* WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; }
|
||||
* rh.renderBlock( x, y, z, renderer );
|
||||
* ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getPart(
|
||||
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) );
|
||||
* } else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
|
||||
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 );
|
||||
* break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4
|
||||
* ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16,
|
||||
* 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y,
|
||||
* z, renderer );
|
||||
*
|
||||
* if ( true ) { setSmartConnectionRotations( of, renderer ); Icon defa
|
||||
* = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f
|
||||
* ); Icon defb = new TaughtIcon( getChannelTex( channels, true
|
||||
* ).getIcon(), -0.2f );
|
||||
* if ( true ) { setSmartConnectionRotations( of, renderer ); Icon defa = new TaughtIcon( getChannelTex(
|
||||
* channels, false ).getIcon(), -0.2f ); Icon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
|
||||
* -0.2f );
|
||||
*
|
||||
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) {
|
||||
* AEBaseBlock blk = (AEBaseBlock) rh.getBlock(); FlipableIcon ico =
|
||||
* blk.getRendererInstance().getTexture( ForgeDirection.EAST );
|
||||
* ico.setFlip( false, true ); }
|
||||
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock)
|
||||
* rh.getBlock(); FlipableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST ); ico.setFlip(
|
||||
* false, true ); }
|
||||
*
|
||||
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 );
|
||||
* Tessellator.instance.setColorOpaque_I( myColor.mediumVariant );
|
||||
* rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces(
|
||||
* (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
||||
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I(
|
||||
* myColor.mediumVariant ); rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces( (AEBaseBlock)
|
||||
* rh.getBlock(), x, y, z, renderer );
|
||||
*
|
||||
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
|
||||
* rh.setTexture( defb, defb, defb, defb, defb, defb ); renderAllFaces(
|
||||
* (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
||||
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( defb, defb, defb, defb, defb,
|
||||
* defb ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
||||
*
|
||||
* renderer.uvRotateBottom = renderer.uvRotateEast =
|
||||
* renderer.uvRotateNorth = renderer.uvRotateSouth =
|
||||
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
|
||||
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
|
||||
*
|
||||
* rh.setTexture( getTexture( getCableColor() ) ); }
|
||||
@@ -288,6 +283,7 @@ public class PartDenseCable extends PartCable
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( getTexture( getCableColor() ) );
|
||||
|
||||
@@ -25,6 +25,8 @@ import appeng.api.util.AECableType;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.parts.AEBasePart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
||||
{
|
||||
@@ -92,6 +94,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
Icon myIcon = is.getIconIndex();
|
||||
@@ -108,6 +111,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
|
||||
@@ -25,6 +25,8 @@ import appeng.me.cache.P2PCache;
|
||||
import appeng.me.cache.helpers.TunnelCollection;
|
||||
import appeng.parts.PartBasicState;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
{
|
||||
@@ -259,6 +261,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( getTypeTexture() );
|
||||
@@ -266,8 +269,8 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
rh.renderInventoryBox( renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(), is.getIconIndex(),
|
||||
CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
rh.renderInventoryBox( renderer );
|
||||
@@ -279,6 +282,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.useSimpliedRendering( x, y, z, this );
|
||||
@@ -287,8 +291,8 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(), is.getIconIndex(),
|
||||
CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
@@ -6,6 +6,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartDarkMonitor extends PartMonitor
|
||||
{
|
||||
@@ -17,6 +19,7 @@ public class PartDarkMonitor extends PartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
@@ -33,6 +36,7 @@ public class PartDarkMonitor extends PartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
|
||||
@@ -21,6 +21,8 @@ import appeng.client.texture.CableBusTextures;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.parts.AEBasePart;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartMonitor extends AEBasePart implements IPartMonitor
|
||||
{
|
||||
@@ -123,6 +125,7 @@ public class PartMonitor extends AEBasePart implements IPartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
@@ -145,6 +148,7 @@ public class PartMonitor extends AEBasePart implements IPartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
|
||||
@@ -6,6 +6,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartSemiDarkMonitor extends PartMonitor
|
||||
{
|
||||
@@ -17,6 +19,7 @@ public class PartSemiDarkMonitor extends PartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
@@ -36,6 +39,7 @@ public class PartSemiDarkMonitor extends PartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
|
||||
@@ -45,6 +45,8 @@ import appeng.core.localization.PlayerMessages;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartStorageMonitor extends PartMonitor implements IPartStorageMonitor, IStackWatcherHost
|
||||
{
|
||||
@@ -169,6 +171,7 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
Reference in New Issue
Block a user