Fixed bug with Energy Inject/Extract Averages.
SideOnly All the things. Pulled Rendering for CableContainers out into a Proxy.
This commit is contained in:
@@ -30,6 +30,7 @@ import appeng.util.Platform;
|
|||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class BaseBlockRender
|
public class BaseBlockRender
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ import appeng.api.parts.IPart;
|
|||||||
import appeng.api.parts.IPartCollsionHelper;
|
import appeng.api.parts.IPartCollsionHelper;
|
||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class BusRenderHelper implements IPartRenderHelper
|
public class BusRenderHelper implements IPartRenderHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -163,8 +166,9 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||||||
list[4] = West;
|
list[4] = West;
|
||||||
list[5] = East;
|
list[5] = East;
|
||||||
|
|
||||||
blk.getRendererInstance().setTemporaryRenderIcons( list[mapRotation( ForgeDirection.UP ).ordinal()], list[mapRotation( ForgeDirection.DOWN ).ordinal()],
|
blk.getRendererInstance().setTemporaryRenderIcons( list[mapRotation( ForgeDirection.UP ).ordinal()],
|
||||||
list[mapRotation( ForgeDirection.SOUTH ).ordinal()], list[mapRotation( ForgeDirection.NORTH ).ordinal()], list[mapRotation( ForgeDirection.EAST ).ordinal()],
|
list[mapRotation( ForgeDirection.DOWN ).ordinal()], list[mapRotation( ForgeDirection.SOUTH ).ordinal()],
|
||||||
|
list[mapRotation( ForgeDirection.NORTH ).ordinal()], list[mapRotation( ForgeDirection.EAST ).ordinal()],
|
||||||
list[mapRotation( ForgeDirection.WEST ).ordinal()] );
|
list[mapRotation( ForgeDirection.WEST ).ordinal()] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ import appeng.api.parts.IPartItem;
|
|||||||
import appeng.client.ClientHelper;
|
import appeng.client.ClientHelper;
|
||||||
import appeng.facade.IFacadeItem;
|
import appeng.facade.IFacadeItem;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class BusRenderer implements IItemRenderer
|
public class BusRenderer implements IItemRenderer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,177 @@
|
|||||||
|
package appeng.client.render;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
import appeng.api.parts.IFacadePart;
|
||||||
|
import appeng.api.parts.IPart;
|
||||||
|
import appeng.facade.FacadeContainer;
|
||||||
|
import appeng.parts.BusCollisionHelper;
|
||||||
|
import appeng.parts.CableBusContainer;
|
||||||
|
|
||||||
|
public class CableRenderHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final CableRenderHelper instance = new CableRenderHelper();
|
||||||
|
|
||||||
|
public static CableRenderHelper getInstance()
|
||||||
|
{
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderStatic(CableBusContainer cableBusContainer, FacadeContainer fc)
|
||||||
|
{
|
||||||
|
TileEntity te = cableBusContainer.getTile();
|
||||||
|
RenderBlocksWorkaround renderer = BusRenderer.instance.renderer;
|
||||||
|
|
||||||
|
if ( renderer.blockAccess == null )
|
||||||
|
renderer.blockAccess = Minecraft.getMinecraft().theWorld;
|
||||||
|
|
||||||
|
for (ForgeDirection s : ForgeDirection.values())
|
||||||
|
{
|
||||||
|
cableBusContainer.setSide( s );
|
||||||
|
|
||||||
|
IPart part = cableBusContainer.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 = cableBusContainer.getPart( s );
|
||||||
|
if ( part != null )
|
||||||
|
{
|
||||||
|
cableBusContainer.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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cableBusContainer.setSide( s );
|
||||||
|
fPart.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.instance, renderer, fc, b, cableBusContainer.getPart( s ) == null );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.isFacade = false;
|
||||||
|
renderer.enableAO = false;
|
||||||
|
renderer.setTexture( null );
|
||||||
|
renderer.calculations = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderDynamic(CableBusContainer cableBusContainer, double x, double y, double z)
|
||||||
|
{
|
||||||
|
for (ForgeDirection s : ForgeDirection.values())
|
||||||
|
{
|
||||||
|
IPart part = cableBusContainer.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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,7 +8,10 @@ import net.minecraft.client.renderer.RenderBlocks;
|
|||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderBlocksWorkaround extends RenderBlocks
|
public class RenderBlocksWorkaround extends RenderBlocks
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class TESRWrapper extends TileEntitySpecialRenderer
|
public class TESRWrapper extends TileEntitySpecialRenderer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class WorldRender implements ISimpleBlockRenderingHandler
|
public class WorldRender implements ISimpleBlockRenderingHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import appeng.entity.EntityTinyTNTPrimed;
|
import appeng.entity.EntityTinyTNTPrimed;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderTinyTNTPrimed extends Render
|
public class RenderTinyTNTPrimed extends Render
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import appeng.client.render.BusRenderHelper;
|
|||||||
import appeng.client.render.RenderBlocksWorkaround;
|
import appeng.client.render.RenderBlocksWorkaround;
|
||||||
import appeng.core.AppEng;
|
import appeng.core.AppEng;
|
||||||
import appeng.integration.abstraction.IBC;
|
import appeng.integration.abstraction.IBC;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class FacadePart implements IFacadePart
|
public class FacadePart implements IFacadePart
|
||||||
{
|
{
|
||||||
@@ -73,6 +75,7 @@ public class FacadePart implements IFacadePart
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper instance2, RenderBlocks renderer, IFacadeContainer fc, AxisAlignedBB busBounds,
|
public void renderStatic(int x, int y, int z, IPartRenderHelper instance2, RenderBlocks renderer, IFacadeContainer fc, AxisAlignedBB busBounds,
|
||||||
boolean renderStilt)
|
boolean renderStilt)
|
||||||
{
|
{
|
||||||
@@ -249,6 +252,7 @@ public class FacadePart implements IFacadePart
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
private void renderSegmentBlockCurrentBounds(BusRenderHelper instance, int x, int y, int z, RenderBlocks renderer, double minX, double minY, double minZ,
|
private void renderSegmentBlockCurrentBounds(BusRenderHelper instance, int x, int y, int z, RenderBlocks renderer, double minX, double minY, double minZ,
|
||||||
double maxX, double maxY, double maxZ)
|
double maxX, double maxY, double maxZ)
|
||||||
{
|
{
|
||||||
@@ -282,6 +286,7 @@ public class FacadePart implements IFacadePart
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
if ( facade != null )
|
if ( facade != null )
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ public class WirelessTerminalGuiObject implements IPortableCell
|
|||||||
itemStorage.removeListener( l );
|
itemStorage.removeListener( l );
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,400 +0,0 @@
|
|||||||
package appeng.integration.modules.helpers;
|
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
|
||||||
import buildcraft.transport.ItemFacade;
|
|
||||||
import cpw.mods.fml.common.FMLLog;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class FacadeProxyBC implements IFacadeProxy
|
|
||||||
{
|
|
||||||
|
|
||||||
float facadeThickness = 1F / 16F;
|
|
||||||
|
|
||||||
int facadeBlocks[];
|
|
||||||
int facadeMeta[];
|
|
||||||
|
|
||||||
public FacadeProxyBC() {
|
|
||||||
facadeBlocks = new int[6];
|
|
||||||
facadeMeta = new int[6];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mirrors the array on the Y axis by calculating offsets from 0.5F
|
|
||||||
*
|
|
||||||
* @param targetArray
|
|
||||||
*/
|
|
||||||
private void mirrorY(float[][] targetArray)
|
|
||||||
{
|
|
||||||
float temp = targetArray[1][0];
|
|
||||||
targetArray[1][0] = (targetArray[1][1] - 0.5F) * -1F + 0.5F; // 1 ->
|
|
||||||
// 0.5F
|
|
||||||
// ->
|
|
||||||
// -0.5F
|
|
||||||
// -> 0F
|
|
||||||
targetArray[1][1] = (temp - 0.5F) * -1F + 0.5F; // 0 -> -0.5F -> 0.5F ->
|
|
||||||
// 1F
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shifts the coordinates around effectivly rotating something. Zero state
|
|
||||||
* is DOWN then -> NORTH -> WEST Note - To obtain Pos, do a mirrorY() before
|
|
||||||
* rotating
|
|
||||||
*
|
|
||||||
* @param targetArray
|
|
||||||
* the array that should be rotated
|
|
||||||
*/
|
|
||||||
private void rotate(float[][] targetArray)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 2; i++)
|
|
||||||
{
|
|
||||||
float temp = targetArray[2][i];
|
|
||||||
targetArray[2][i] = targetArray[1][i];
|
|
||||||
targetArray[1][i] = targetArray[0][i];
|
|
||||||
targetArray[0][i] = temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param targetArray
|
|
||||||
* the array that should be transformed
|
|
||||||
* @param direction
|
|
||||||
*/
|
|
||||||
private void transform(float[][] targetArray, ForgeDirection direction)
|
|
||||||
{
|
|
||||||
if ( (direction.ordinal() & 0x1) == 1 )
|
|
||||||
{
|
|
||||||
mirrorY( targetArray );
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < (direction.ordinal() >> 1); i++)
|
|
||||||
{
|
|
||||||
rotate( targetArray );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clones both dimensions of a float[][]
|
|
||||||
*
|
|
||||||
* @param source
|
|
||||||
* the float[][] to deepClone
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private float[][] deepClone(float[][] source)
|
|
||||||
{
|
|
||||||
float[][] target = source.clone();
|
|
||||||
for (int i = 0; i < target.length; i++)
|
|
||||||
{
|
|
||||||
target[i] = source[i].clone();
|
|
||||||
}
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void facadeRender(RenderBlocks renderblocks, Block block, IFacadeTile ft, int x, int y, int z, float tubeThickness)
|
|
||||||
{
|
|
||||||
float zFightOffset = 1F / 4096F;
|
|
||||||
|
|
||||||
float[][] zeroState = new float[3][2];
|
|
||||||
// X START - END
|
|
||||||
zeroState[0][0] = 0.0F - zFightOffset / 2;
|
|
||||||
zeroState[0][1] = 1.0F + zFightOffset / 2;
|
|
||||||
// Y START - END
|
|
||||||
zeroState[1][0] = 0.0F - zFightOffset;
|
|
||||||
zeroState[1][1] = facadeThickness;
|
|
||||||
// Z START - END
|
|
||||||
zeroState[2][0] = 0.0F;
|
|
||||||
zeroState[2][1] = 1.0F;
|
|
||||||
|
|
||||||
renderblocks.renderAllFaces = true;
|
|
||||||
|
|
||||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
|
|
||||||
{
|
|
||||||
if ( hasFacade( ft, direction ) )
|
|
||||||
{
|
|
||||||
Block blk = Block.blocksList[facadeBlocks[direction.ordinal()]];
|
|
||||||
renderblocks.overrideBlockTexture = blk.getIcon( direction.ordinal(), facadeMeta[direction.ordinal()] );
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// AppEngBlockRenderer.instance.overrideRenderColor =
|
|
||||||
// Item.itemsList[ facadeBlocks[ direction.ordinal() ]
|
|
||||||
// ].getColorFromItemStack(new ItemStack( facadeBlocks[
|
|
||||||
// direction.ordinal() ], 1, facadeMeta[ direction.ordinal()
|
|
||||||
// ] ), 0);
|
|
||||||
} catch (Throwable error)
|
|
||||||
{
|
|
||||||
// explosion!
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( blk.getRenderType() == 31 )
|
|
||||||
{
|
|
||||||
if ( (facadeMeta[direction.ordinal()] & 12) == 4 )
|
|
||||||
{
|
|
||||||
renderblocks.uvRotateEast = 1;
|
|
||||||
renderblocks.uvRotateWest = 1;
|
|
||||||
renderblocks.uvRotateTop = 1;
|
|
||||||
renderblocks.uvRotateBottom = 1;
|
|
||||||
} else if ( (facadeMeta[direction.ordinal()] & 12) == 8 )
|
|
||||||
{
|
|
||||||
renderblocks.uvRotateSouth = 1;
|
|
||||||
renderblocks.uvRotateNorth = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
float holeThickness = ft.getHoleThickness( direction );
|
|
||||||
|
|
||||||
// Hollow facade
|
|
||||||
if ( ft.isConnected( direction ) )
|
|
||||||
{
|
|
||||||
float[][] rotated = deepClone( zeroState );
|
|
||||||
rotated[2][0] = 0.0F;
|
|
||||||
rotated[2][1] = 0.0f + holeThickness;
|
|
||||||
rotated[1][0] -= zFightOffset / 2;
|
|
||||||
transform( rotated, direction );
|
|
||||||
block.setBlockBounds( rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1],
|
|
||||||
rotated[2][1] );
|
|
||||||
renderblocks.setRenderBoundsFromBlock( block );
|
|
||||||
renderblocks.renderStandardBlock( block, x, y, z );
|
|
||||||
|
|
||||||
rotated = deepClone( zeroState );
|
|
||||||
rotated[2][0] = 1.0f - holeThickness;
|
|
||||||
rotated[1][0] -= zFightOffset / 2;
|
|
||||||
transform( rotated, direction );
|
|
||||||
block.setBlockBounds( rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1],
|
|
||||||
rotated[2][1] );
|
|
||||||
renderblocks.setRenderBoundsFromBlock( block );
|
|
||||||
renderblocks.renderStandardBlock( block, x, y, z );
|
|
||||||
|
|
||||||
rotated = deepClone( zeroState );
|
|
||||||
rotated[0][0] = 0.0F;
|
|
||||||
rotated[0][1] = 0.0f + holeThickness;
|
|
||||||
rotated[1][1] -= zFightOffset;
|
|
||||||
transform( rotated, direction );
|
|
||||||
block.setBlockBounds( rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1],
|
|
||||||
rotated[2][1] );
|
|
||||||
renderblocks.setRenderBoundsFromBlock( block );
|
|
||||||
renderblocks.renderStandardBlock( block, x, y, z );
|
|
||||||
|
|
||||||
rotated = deepClone( zeroState );
|
|
||||||
rotated[0][0] = 1.0f - holeThickness;
|
|
||||||
rotated[0][1] = 1F;
|
|
||||||
rotated[1][1] -= zFightOffset;
|
|
||||||
transform( rotated, direction );
|
|
||||||
block.setBlockBounds( rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1],
|
|
||||||
rotated[2][1] );
|
|
||||||
renderblocks.setRenderBoundsFromBlock( block );
|
|
||||||
renderblocks.renderStandardBlock( block, x, y, z );
|
|
||||||
} else
|
|
||||||
{ // Solid facade
|
|
||||||
float[][] rotated = deepClone( zeroState );
|
|
||||||
transform( rotated, direction );
|
|
||||||
block.setBlockBounds( rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1],
|
|
||||||
rotated[2][1] );
|
|
||||||
renderblocks.setRenderBoundsFromBlock( block );
|
|
||||||
renderblocks.renderStandardBlock( block, x, y, z );
|
|
||||||
}
|
|
||||||
|
|
||||||
// AppEngBlockRenderer.instance.overrideRenderColor = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
renderblocks.uvRotateEast = 0;
|
|
||||||
renderblocks.uvRotateWest = 0;
|
|
||||||
renderblocks.uvRotateTop = 0;
|
|
||||||
renderblocks.uvRotateBottom = 0;
|
|
||||||
renderblocks.uvRotateSouth = 0;
|
|
||||||
renderblocks.uvRotateNorth = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// X START - END
|
|
||||||
zeroState[0][0] = 0.0f + tubeThickness; // Utils.pipeMinPos;
|
|
||||||
zeroState[0][1] = 1.0f - tubeThickness; // Utils.pipeMaxPos;
|
|
||||||
// Y START - END
|
|
||||||
zeroState[1][0] = facadeThickness;
|
|
||||||
zeroState[1][1] = 0.0f + tubeThickness; // Utils.pipeMinPos;
|
|
||||||
// Z START - END
|
|
||||||
zeroState[2][0] = 0.0f + tubeThickness; // Utils.pipeMinPos;
|
|
||||||
zeroState[2][1] = 1.0f - tubeThickness; // Utils.pipeMaxPos;
|
|
||||||
|
|
||||||
if ( tubeThickness > 0.001 )
|
|
||||||
{
|
|
||||||
// renderblocks.overrideBlockTexture =
|
|
||||||
// BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.PipeStructureCobblestone);
|
|
||||||
// // Structure Pipe
|
|
||||||
|
|
||||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
|
|
||||||
{
|
|
||||||
if ( hasFacade( ft, direction ) && !ft.isConnected( direction ) )
|
|
||||||
{
|
|
||||||
float[][] rotated = deepClone( zeroState );
|
|
||||||
transform( rotated, direction );
|
|
||||||
|
|
||||||
block.setBlockBounds( rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1],
|
|
||||||
rotated[2][1] );
|
|
||||||
renderblocks.setRenderBoundsFromBlock( block );
|
|
||||||
renderblocks.renderStandardBlock( block, x, y, z );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
renderblocks.renderAllFaces = false;
|
|
||||||
renderblocks.overrideBlockTexture = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack createFacade(int itemid, int meta)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return ItemFacade.getStack( itemid, meta );
|
|
||||||
} catch (Throwable e)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// return new ItemStack( BuildCraftTransport.facadeItem, 1,
|
|
||||||
// ItemFacade.encode( itemid, meta ) );
|
|
||||||
} catch (Throwable e2)
|
|
||||||
{
|
|
||||||
FMLLog.severe( "Unable to create facade item, please make sure your using the newest Version of BC and AE, and if you are inform AlgorithmX2 of this message." );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDrops(IFacadeTile ft)
|
|
||||||
{
|
|
||||||
List<ItemStack> out = new ArrayList();
|
|
||||||
|
|
||||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
|
|
||||||
{
|
|
||||||
if ( this.facadeBlocks[direction.ordinal()] != 0 )
|
|
||||||
{
|
|
||||||
ItemStack facade = createFacade( this.facadeBlocks[direction.ordinal()], this.facadeMeta[direction.ordinal()] );
|
|
||||||
|
|
||||||
this.facadeMeta[direction.ordinal()] = 0;
|
|
||||||
|
|
||||||
out.add( facade );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean addFacade(IFacadeTile ft, ForgeDirection direction, int blockid, int meta)
|
|
||||||
{
|
|
||||||
if ( hasFacade( ft, direction ) )
|
|
||||||
dropFacade( ft, direction );
|
|
||||||
|
|
||||||
// if ( ft.isConnected( direction ) )
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
this.facadeBlocks[direction.ordinal()] = blockid;
|
|
||||||
this.facadeMeta[direction.ordinal()] = meta;
|
|
||||||
|
|
||||||
ft.markForUpdate();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasFacade(IFacadeTile ft, ForgeDirection direction)
|
|
||||||
{
|
|
||||||
return this.facadeBlocks[direction.ordinal()] != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dropFacade(IFacadeTile ft, ForgeDirection direction)
|
|
||||||
{
|
|
||||||
if ( this.facadeBlocks[direction.ordinal()] != 0 )
|
|
||||||
{
|
|
||||||
ItemStack facade = createFacade( this.facadeBlocks[direction.ordinal()], this.facadeMeta[direction.ordinal()] );
|
|
||||||
|
|
||||||
this.facadeBlocks[direction.ordinal()] = 0;
|
|
||||||
this.facadeMeta[direction.ordinal()] = 0;
|
|
||||||
|
|
||||||
ft.dropFacadeItem( facade );
|
|
||||||
|
|
||||||
ft.markForUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean readFromStream(DataInputStream out) throws IOException
|
|
||||||
{
|
|
||||||
boolean diffrent = false;
|
|
||||||
for (int x = 0; x < 6; x++)
|
|
||||||
{
|
|
||||||
int fb = facadeBlocks[x];
|
|
||||||
int fm = facadeMeta[x];
|
|
||||||
facadeBlocks[x] = out.readInt();
|
|
||||||
facadeMeta[x] = out.readInt();
|
|
||||||
diffrent = diffrent || fb != facadeBlocks[x] || fm != facadeMeta[x];
|
|
||||||
}
|
|
||||||
return diffrent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToStream(DataOutputStream out) throws IOException
|
|
||||||
{
|
|
||||||
for (int x = 0; x < 6; x++)
|
|
||||||
{
|
|
||||||
out.writeInt( facadeBlocks[x] );
|
|
||||||
out.writeInt( facadeMeta[x] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToNBT(NBTTagCompound tc)
|
|
||||||
{
|
|
||||||
tc.setIntArray( "facadeBlocks", facadeBlocks );
|
|
||||||
tc.setIntArray( "facadeMeta", facadeMeta );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void readFromNBT(NBTTagCompound tc)
|
|
||||||
{
|
|
||||||
facadeBlocks = tc.getIntArray( "facadeBlocks" );
|
|
||||||
facadeMeta = tc.getIntArray( "facadeMeta" );
|
|
||||||
|
|
||||||
if ( facadeBlocks == null )
|
|
||||||
facadeBlocks = new int[6];
|
|
||||||
if ( facadeMeta == null )
|
|
||||||
facadeMeta = new int[6];
|
|
||||||
if ( facadeBlocks.length != 6 )
|
|
||||||
facadeBlocks = new int[6];
|
|
||||||
if ( facadeMeta.length != 6 )
|
|
||||||
facadeMeta = new int[6];
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean addFacade(TileEntity tileEntity, int side, ItemStack hand)
|
|
||||||
{
|
|
||||||
if ( tileEntity instanceof IFacadeTile )
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return addFacade( (IFacadeTile) tileEntity, ForgeDirection.getOrientation( side ), ItemFacade.getBlockId( hand ),
|
|
||||||
ItemFacade.getMetaData( hand ) );
|
|
||||||
} catch (Throwable e)
|
|
||||||
{
|
|
||||||
FMLLog.severe( "Unable to place facade item, please make sure your using the newest Version of BC and AE, and if you are inform AlgorithmX2 of this message." );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
package appeng.integration.modules.helpers;
|
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class FacadeProxyNull implements IFacadeProxy
|
|
||||||
{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void facadeRender(RenderBlocks renderblocks, Block block, IFacadeTile ft, int x, int y, int z, float th)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDrops(IFacadeTile ft)
|
|
||||||
{
|
|
||||||
return new ArrayList<ItemStack>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean addFacade(IFacadeTile ft, ForgeDirection direction, int blockid, int meta)
|
|
||||||
{
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasFacade(IFacadeTile ft, ForgeDirection direction)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dropFacade(IFacadeTile ft, ForgeDirection direction)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToNBT(NBTTagCompound tc)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToStream(DataOutputStream out) throws IOException
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean readFromStream(DataInputStream out) throws IOException
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void readFromNBT(NBTTagCompound tc)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean addFacade(TileEntity tileEntity, int side, ItemStack hand)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
package appeng.integration.modules.helpers;
|
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public interface IFacadeProxy
|
|
||||||
{
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
void facadeRender(RenderBlocks renderblocks, Block block, IFacadeTile ft, int x, int y, int z, float tubeThickness);
|
|
||||||
|
|
||||||
List<ItemStack> getDrops(IFacadeTile ft);
|
|
||||||
|
|
||||||
boolean addFacade(IFacadeTile ft, ForgeDirection direction, int blockid, int meta);
|
|
||||||
|
|
||||||
boolean hasFacade(IFacadeTile ft, ForgeDirection direction);
|
|
||||||
|
|
||||||
void dropFacade(IFacadeTile ft, ForgeDirection direction);
|
|
||||||
|
|
||||||
void writeToNBT(NBTTagCompound tc);
|
|
||||||
|
|
||||||
void writeToStream(DataOutputStream out) throws IOException;
|
|
||||||
|
|
||||||
boolean readFromStream(DataInputStream out) throws IOException;
|
|
||||||
|
|
||||||
void readFromNBT(NBTTagCompound tc);
|
|
||||||
|
|
||||||
boolean addFacade(TileEntity tileEntity, int side, ItemStack hand);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package appeng.integration.modules.helpers;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
|
||||||
|
|
||||||
public interface IFacadeTile
|
|
||||||
{
|
|
||||||
|
|
||||||
boolean isConnected(ForgeDirection direction);
|
|
||||||
|
|
||||||
void dropFacadeItem(ItemStack facade);
|
|
||||||
|
|
||||||
IFacadeProxy getFacadeProxy();
|
|
||||||
|
|
||||||
void markForUpdate();
|
|
||||||
|
|
||||||
float getHoleThickness(ForgeDirection direction);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -40,7 +40,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
|||||||
switch (component)
|
switch (component)
|
||||||
{
|
{
|
||||||
case Cell1kPart:
|
case Cell1kPart:
|
||||||
idleDrain = 0.5;
|
idleDrain = 12.5;
|
||||||
break;
|
break;
|
||||||
case Cell4kPart:
|
case Cell4kPart:
|
||||||
idleDrain = 1.0;
|
idleDrain = 1.0;
|
||||||
@@ -69,17 +69,12 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
|||||||
l.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() );
|
l.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() );
|
||||||
l.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
|
l.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
|
||||||
/*
|
/*
|
||||||
* if ( cd.isPreformatted() ) { String List =
|
* if ( cd.isPreformatted() ) { String List = StatCollector.translateToLocal( cd.getListMode() ==
|
||||||
* StatCollector.translateToLocal( cd.getListMode() ==
|
* ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" : "AppEng.Gui.Blacklisted" ); if (
|
||||||
* ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" :
|
* cd.isFuzzyPreformatted() ) l.add( StatCollector.translateToLocal( "Appeng.GuiITooltip.Partitioned" )
|
||||||
* "AppEng.Gui.Blacklisted" ); if ( cd.isFuzzyPreformatted() )
|
* + " - " + List + " " + StatCollector.translateToLocal( "Appeng.GuiITooltip.Fuzzy" ) ); else l.add(
|
||||||
* l.add( StatCollector.translateToLocal(
|
* StatCollector.translateToLocal( "Appeng.GuiITooltip.Partitioned" ) + " - " + List + " " +
|
||||||
* "Appeng.GuiITooltip.Partitioned" ) + " - " + List + " " +
|
* StatCollector.translateToLocal( "Appeng.GuiITooltip.Precise" ) ); }
|
||||||
* StatCollector.translateToLocal( "Appeng.GuiITooltip.Fuzzy" )
|
|
||||||
* ); else l.add( StatCollector.translateToLocal(
|
|
||||||
* "Appeng.GuiITooltip.Partitioned" ) + " - " + List + " " +
|
|
||||||
* StatCollector.translateToLocal( "Appeng.GuiITooltip.Precise"
|
|
||||||
* ) ); }
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+4
-2
@@ -156,6 +156,7 @@ public class EnergyGridCache implements IEnergyGrid
|
|||||||
@Override
|
@Override
|
||||||
public double injectPower(double i, Actionable mode)
|
public double injectPower(double i, Actionable mode)
|
||||||
{
|
{
|
||||||
|
double ignore = extra;
|
||||||
i += extra;
|
i += extra;
|
||||||
|
|
||||||
if ( mode == Actionable.SIMULATE )
|
if ( mode == Actionable.SIMULATE )
|
||||||
@@ -169,7 +170,7 @@ public class EnergyGridCache implements IEnergyGrid
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tickInjectionPerTick += i;
|
tickInjectionPerTick += i - ignore;
|
||||||
// totalInjectionPastTicks[0] += i;
|
// totalInjectionPastTicks[0] += i;
|
||||||
|
|
||||||
while (i > 0 && !requesters.isEmpty())
|
while (i > 0 && !requesters.isEmpty())
|
||||||
@@ -369,6 +370,7 @@ public class EnergyGridCache implements IEnergyGrid
|
|||||||
extra = extractedPower - amt;
|
extra = extractedPower - amt;
|
||||||
globalAvailablePower -= amt;
|
globalAvailablePower -= amt;
|
||||||
|
|
||||||
|
tickDrainPerTick += amt;
|
||||||
return amt;
|
return amt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,6 +383,7 @@ public class EnergyGridCache implements IEnergyGrid
|
|||||||
|
|
||||||
// go less or the correct amount?
|
// go less or the correct amount?
|
||||||
globalAvailablePower -= extractedPower;
|
globalAvailablePower -= extractedPower;
|
||||||
|
tickDrainPerTick += extractedPower;
|
||||||
return extractedPower;
|
return extractedPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,7 +404,6 @@ public class EnergyGridCache implements IEnergyGrid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tickDrainPerTick += extractedPower;
|
|
||||||
// totalDrainPastTicks[0] += extractedPower;
|
// totalDrainPastTicks[0] += extractedPower;
|
||||||
return extractedPower;
|
return extractedPower;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ import appeng.me.helpers.AENetworkProxy;
|
|||||||
import appeng.me.helpers.IGridProxyable;
|
import appeng.me.helpers.IGridProxyable;
|
||||||
import appeng.parts.networking.PartCable;
|
import appeng.parts.networking.PartCable;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradeableHost
|
public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradeableHost
|
||||||
{
|
{
|
||||||
@@ -55,6 +57,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setBounds( 1, 1, 1, 15, 15, 15 );
|
rh.setBounds( 1, 1, 1, 15, 15, 15 );
|
||||||
@@ -65,6 +68,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setBounds( 1, 1, 1, 15, 15, 15 );
|
rh.setBounds( 1, 1, 1, 15, 15, 15 );
|
||||||
@@ -72,6 +76,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
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
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void randomDisplayTick(World world, int x, int y, int z, Random r)
|
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.DataInputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@@ -39,12 +37,13 @@ import appeng.api.util.AECableType;
|
|||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.client.render.BusRenderHelper;
|
import appeng.client.render.BusRenderHelper;
|
||||||
import appeng.client.render.BusRenderer;
|
import appeng.client.render.CableRenderHelper;
|
||||||
import appeng.client.render.RenderBlocksWorkaround;
|
|
||||||
import appeng.facade.FacadeContainer;
|
import appeng.facade.FacadeContainer;
|
||||||
import appeng.helpers.AEMultiTile;
|
import appeng.helpers.AEMultiTile;
|
||||||
import appeng.me.GridConnection;
|
import appeng.me.GridConnection;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
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)
|
public void renderStatic(double x, double y, double z)
|
||||||
{
|
{
|
||||||
TileEntity te = getTile();
|
CableRenderHelper.getInstance().renderStatic( this, fc );
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderDynamic(double x, double y, double z)
|
public void renderDynamic(double x, double y, double z)
|
||||||
{
|
{
|
||||||
for (ForgeDirection s : ForgeDirection.values())
|
CableRenderHelper.getInstance().renderDynamic( this, x, y, z );
|
||||||
{
|
|
||||||
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 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToStream(DataOutputStream data) throws IOException
|
public void writeToStream(DataOutputStream data) throws IOException
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import net.minecraft.util.Vec3;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import appeng.api.parts.SelectedPart;
|
import appeng.api.parts.SelectedPart;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public interface ICableBusContainer
|
public interface ICableBusContainer
|
||||||
{
|
{
|
||||||
@@ -36,6 +38,7 @@ public interface ICableBusContainer
|
|||||||
|
|
||||||
boolean isLadder(EntityLivingBase entity);
|
boolean isLadder(EntityLivingBase entity);
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
void randomDisplayTick(World world, int x, int y, int z, Random r);
|
void randomDisplayTick(World world, int x, int y, int z, Random r);
|
||||||
|
|
||||||
int getLightValue();
|
int getLightValue();
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import appeng.api.networking.events.MENetworkPowerStatusChange;
|
|||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
import appeng.me.GridAccessException;
|
import appeng.me.GridAccessException;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartBasicState extends AEBasePart
|
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)
|
public void renderLights(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.normalRendering();
|
rh.normalRendering();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import appeng.api.parts.IPartHost;
|
|||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
import appeng.parts.PartBasicState;
|
import appeng.parts.PartBasicState;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartAnnihilationPlane extends PartBasicState
|
public class PartAnnihilationPlane extends PartBasicState
|
||||||
{
|
{
|
||||||
@@ -19,6 +21,7 @@ public class PartAnnihilationPlane extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||||
@@ -32,6 +35,7 @@ public class PartAnnihilationPlane extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
int minX = 1;
|
int minX = 1;
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import appeng.core.sync.GuiBridge;
|
|||||||
import appeng.me.GridAccessException;
|
import appeng.me.GridAccessException;
|
||||||
import appeng.util.InventoryAdaptor;
|
import appeng.util.InventoryAdaptor;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
||||||
{
|
{
|
||||||
@@ -54,6 +56,7 @@ public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -71,6 +74,7 @@ public class PartExportBus extends PartSharedItemBus implements IGridTickable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.useSimpliedRendering( x, y, z, this );
|
rh.useSimpliedRendering( x, y, z, this );
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import appeng.api.parts.IPartHost;
|
|||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
import appeng.parts.PartBasicState;
|
import appeng.parts.PartBasicState;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartFormationPlane extends PartBasicState
|
public class PartFormationPlane extends PartBasicState
|
||||||
{
|
{
|
||||||
@@ -19,6 +21,7 @@ public class PartFormationPlane extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||||
@@ -32,6 +35,7 @@ public class PartFormationPlane extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
int minX = 1;
|
int minX = 1;
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ import appeng.me.GridAccessException;
|
|||||||
import appeng.util.InventoryAdaptor;
|
import appeng.util.InventoryAdaptor;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.inv.IInventoryDestination;
|
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
|
public class PartImportBus extends PartSharedItemBus implements IGridTickable, IInventoryDestination
|
||||||
{
|
{
|
||||||
@@ -76,6 +78,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||||
@@ -92,6 +95,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.useSimpliedRendering( x, y, z, this );
|
rh.useSimpliedRendering( x, y, z, this );
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ import appeng.me.GridAccessException;
|
|||||||
import appeng.tile.inventory.AppEngInternalAEInventory;
|
import appeng.tile.inventory.AppEngInternalAEInventory;
|
||||||
import appeng.tile.inventory.InvOperation;
|
import appeng.tile.inventory.InvOperation;
|
||||||
import appeng.util.Platform;
|
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>
|
public class PartLevelEmitter extends PartUpgradeable implements IStackWatcherHost, IMEMonitorHandlerReciever<IAEItemStack>
|
||||||
{
|
{
|
||||||
@@ -250,6 +252,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IStackWatcherHo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( is.getIconIndex() );
|
rh.setTexture( is.getIconIndex() );
|
||||||
@@ -446,6 +449,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IStackWatcherHo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( is.getIconIndex() );
|
rh.setTexture( is.getIconIndex() );
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import appeng.api.parts.IPartCollsionHelper;
|
|||||||
import appeng.api.parts.IPartHost;
|
import appeng.api.parts.IPartHost;
|
||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.api.parts.PartItemStack;
|
import appeng.api.parts.PartItemStack;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartCableAnchor implements IPart
|
public class PartCableAnchor implements IPart
|
||||||
{
|
{
|
||||||
@@ -36,6 +38,7 @@ public class PartCableAnchor implements IPart
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
Icon myIcon = is.getIconIndex();
|
Icon myIcon = is.getIconIndex();
|
||||||
@@ -46,12 +49,14 @@ public class PartCableAnchor implements IPart
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void randomDisplayTick(World world, int x, int y, int z, Random r)
|
public void randomDisplayTick(World world, int x, int y, int z, Random r)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
instance.setTexture( is.getIconIndex() );
|
instance.setTexture( is.getIconIndex() );
|
||||||
@@ -79,6 +84,7 @@ public class PartCableAnchor implements IPart
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
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.tile.inventory.InvOperation;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.inv.IInventoryDestination;
|
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,
|
public class PartInterface extends PartBasicState implements IGridTickable, ISegmentedInventory, IStorageMonitorable, IInventoryDestination, IInterfaceHost,
|
||||||
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable
|
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable
|
||||||
@@ -62,6 +64,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||||
@@ -78,6 +81,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.useSimpliedRendering( x, y, z, this );
|
rh.useSimpliedRendering( x, y, z, this );
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ import buildcraft.api.transport.IPipeConnection;
|
|||||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||||
import cpw.mods.fml.common.Optional.Interface;
|
import cpw.mods.fml.common.Optional.Interface;
|
||||||
import cpw.mods.fml.common.Optional.Method;
|
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")
|
@Interface(modid = "BuildCraft|Transport", iface = "buildcraft.api.transport.IPipeConnection")
|
||||||
public class PartStorageBus extends PartUpgradeable implements IGridTickable, ICellContainer, IMEMonitorHandlerReciever<IAEItemStack>, 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
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||||
@@ -277,6 +280,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.useSimpliedRendering( x, y, z, this );
|
rh.useSimpliedRendering( x, y, z, this );
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import appeng.client.texture.CableBusTextures;
|
|||||||
import appeng.me.helpers.AENetworkProxy;
|
import appeng.me.helpers.AENetworkProxy;
|
||||||
import appeng.parts.PartBasicState;
|
import appeng.parts.PartBasicState;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartToggleBus extends PartBasicState
|
public class PartToggleBus extends PartBasicState
|
||||||
{
|
{
|
||||||
@@ -158,6 +160,7 @@ public class PartToggleBus extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.useSimpliedRendering( x, y, z, this );
|
rh.useSimpliedRendering( x, y, z, this );
|
||||||
@@ -186,6 +189,7 @@ public class PartToggleBus extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ import appeng.me.GridAccessException;
|
|||||||
import appeng.me.helpers.AENetworkProxy;
|
import appeng.me.helpers.AENetworkProxy;
|
||||||
import appeng.parts.AEBasePart;
|
import appeng.parts.AEBasePart;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartCable extends AEBasePart implements IPartCable
|
public class PartCable extends AEBasePart implements IPartCable
|
||||||
{
|
{
|
||||||
@@ -355,6 +357,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||||
@@ -365,6 +368,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
|||||||
rh.setTexture( null );
|
rh.setTexture( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void rendereGlassConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, ForgeDirection of)
|
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 );
|
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)
|
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 );
|
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)
|
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 );
|
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)
|
protected void setSmartConnectionRotations(ForgeDirection of, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
switch (of)
|
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)
|
protected void renderAllFaces(AEBaseBlock blk, int x, int y, int z, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
renderer.renderFaceXNeg( blk, x, y, z, blk.getRendererInstance().getTexture( ForgeDirection.WEST ) );
|
renderer.renderFaceXNeg( blk, x, y, z, blk.getRendererInstance().getTexture( ForgeDirection.WEST ) );
|
||||||
@@ -739,6 +747,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
boolean useCovered = false;
|
boolean useCovered = false;
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import appeng.api.util.AECableType;
|
|||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
import appeng.client.texture.OffsetIcon;
|
import appeng.client.texture.OffsetIcon;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartCableCovered extends PartCable
|
public class PartCableCovered extends PartCable
|
||||||
{
|
{
|
||||||
@@ -97,6 +99,7 @@ public class PartCableCovered extends PartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||||
@@ -108,6 +111,7 @@ public class PartCableCovered extends PartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( getTexture( getCableColor() ) );
|
rh.setTexture( getTexture( getCableColor() ) );
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import appeng.client.texture.FlipableIcon;
|
|||||||
import appeng.client.texture.OffsetIcon;
|
import appeng.client.texture.OffsetIcon;
|
||||||
import appeng.client.texture.TaughtIcon;
|
import appeng.client.texture.TaughtIcon;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartCableSmart extends PartCable
|
public class PartCableSmart extends PartCable
|
||||||
{
|
{
|
||||||
@@ -59,6 +61,7 @@ public class PartCableSmart extends PartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||||
@@ -121,6 +124,7 @@ public class PartCableSmart extends PartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( getTexture( getCableColor() ) );
|
rh.setTexture( getTexture( getCableColor() ) );
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ import appeng.client.texture.FlipableIcon;
|
|||||||
import appeng.client.texture.OffsetIcon;
|
import appeng.client.texture.OffsetIcon;
|
||||||
import appeng.client.texture.TaughtIcon;
|
import appeng.client.texture.TaughtIcon;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartDenseCable extends PartCable
|
public class PartDenseCable extends PartCable
|
||||||
{
|
{
|
||||||
@@ -73,6 +75,7 @@ public class PartDenseCable extends PartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||||
@@ -189,6 +192,7 @@ public class PartDenseCable extends PartCable
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderDenseConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
|
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 );
|
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;
|
boolean isGlass = false;
|
||||||
AEColor myColor = getCableColor();
|
AEColor myColor = getCableColor();
|
||||||
/*
|
/*
|
||||||
* ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) ==
|
* ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getPart(
|
||||||
* AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null ) {
|
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) );
|
||||||
* isGlass = true; rh.setTexture( getGlassTexture( myColor =
|
* } else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
|
||||||
* ccph.getColor() ) ); } else if ( ccph == null && ghh != null &&
|
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 );
|
||||||
* ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
|
* break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4
|
||||||
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN:
|
* ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16,
|
||||||
* rh.setBounds( 3, 0, 3, 13, 4, 13 ); break; case EAST: rh.setBounds(
|
* 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y,
|
||||||
* 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13,
|
* z, renderer );
|
||||||
* 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
|
* if ( true ) { setSmartConnectionRotations( of, renderer ); Icon defa = new TaughtIcon( getChannelTex(
|
||||||
* = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f
|
* channels, false ).getIcon(), -0.2f ); Icon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
|
||||||
* ); Icon defb = new TaughtIcon( getChannelTex( channels, true
|
* -0.2f );
|
||||||
* ).getIcon(), -0.2f );
|
|
||||||
*
|
*
|
||||||
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) {
|
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock)
|
||||||
* AEBaseBlock blk = (AEBaseBlock) rh.getBlock(); FlipableIcon ico =
|
* rh.getBlock(); FlipableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST ); ico.setFlip(
|
||||||
* blk.getRendererInstance().getTexture( ForgeDirection.EAST );
|
* false, true ); }
|
||||||
* ico.setFlip( false, true ); }
|
|
||||||
*
|
*
|
||||||
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 );
|
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I(
|
||||||
* Tessellator.instance.setColorOpaque_I( myColor.mediumVariant );
|
* myColor.mediumVariant ); rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces( (AEBaseBlock)
|
||||||
* rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces(
|
* rh.getBlock(), x, y, z, renderer );
|
||||||
* (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
|
||||||
*
|
*
|
||||||
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
|
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( defb, defb, defb, defb, defb,
|
||||||
* rh.setTexture( defb, defb, defb, defb, defb, defb ); renderAllFaces(
|
* defb ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
||||||
* (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
|
||||||
*
|
*
|
||||||
* renderer.uvRotateBottom = renderer.uvRotateEast =
|
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
|
||||||
* renderer.uvRotateNorth = renderer.uvRotateSouth =
|
|
||||||
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
|
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
|
||||||
*
|
*
|
||||||
* rh.setTexture( getTexture( getCableColor() ) ); }
|
* rh.setTexture( getTexture( getCableColor() ) ); }
|
||||||
@@ -288,6 +283,7 @@ public class PartDenseCable extends PartCable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( getTexture( getCableColor() ) );
|
rh.setTexture( getTexture( getCableColor() ) );
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import appeng.api.util.AECableType;
|
|||||||
import appeng.me.GridAccessException;
|
import appeng.me.GridAccessException;
|
||||||
import appeng.me.helpers.AENetworkProxy;
|
import appeng.me.helpers.AENetworkProxy;
|
||||||
import appeng.parts.AEBasePart;
|
import appeng.parts.AEBasePart;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
||||||
{
|
{
|
||||||
@@ -92,6 +94,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
Icon myIcon = is.getIconIndex();
|
Icon myIcon = is.getIconIndex();
|
||||||
@@ -108,6 +111,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
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.me.cache.helpers.TunnelCollection;
|
||||||
import appeng.parts.PartBasicState;
|
import appeng.parts.PartBasicState;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||||
{
|
{
|
||||||
@@ -259,6 +261,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( getTypeTexture() );
|
rh.setTexture( getTypeTexture() );
|
||||||
@@ -266,8 +269,8 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
|||||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
rh.renderInventoryBox( renderer );
|
rh.renderInventoryBox( renderer );
|
||||||
|
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(), is.getIconIndex(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(),
|
||||||
CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||||
|
|
||||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
rh.renderInventoryBox( renderer );
|
rh.renderInventoryBox( renderer );
|
||||||
@@ -279,6 +282,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.useSimpliedRendering( x, y, z, this );
|
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.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
rh.renderBlock( x, y, z, renderer );
|
rh.renderBlock( x, y, z, renderer );
|
||||||
|
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(), is.getIconIndex(),
|
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.BlockP2PTunnel2.getIcon(),
|
||||||
CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||||
|
|
||||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
rh.renderBlock( x, y, z, renderer );
|
rh.renderBlock( x, y, z, renderer );
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartDarkMonitor extends PartMonitor
|
public class PartDarkMonitor extends PartMonitor
|
||||||
{
|
{
|
||||||
@@ -17,6 +19,7 @@ public class PartDarkMonitor extends PartMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
@@ -33,6 +36,7 @@ public class PartDarkMonitor extends PartMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
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.me.GridAccessException;
|
||||||
import appeng.parts.AEBasePart;
|
import appeng.parts.AEBasePart;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartMonitor extends AEBasePart implements IPartMonitor
|
public class PartMonitor extends AEBasePart implements IPartMonitor
|
||||||
{
|
{
|
||||||
@@ -123,6 +125,7 @@ public class PartMonitor extends AEBasePart implements IPartMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
@@ -145,6 +148,7 @@ public class PartMonitor extends AEBasePart implements IPartMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
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 net.minecraftforge.common.ForgeDirection;
|
||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartSemiDarkMonitor extends PartMonitor
|
public class PartSemiDarkMonitor extends PartMonitor
|
||||||
{
|
{
|
||||||
@@ -17,6 +19,7 @@ public class PartSemiDarkMonitor extends PartMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||||
@@ -36,6 +39,7 @@ public class PartSemiDarkMonitor extends PartMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
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.me.GridAccessException;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.item.AEItemStack;
|
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
|
public class PartStorageMonitor extends PartMonitor implements IPartStorageMonitor, IStackWatcherHost
|
||||||
{
|
{
|
||||||
@@ -169,6 +171,7 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
Tessellator tess = Tessellator.instance;
|
Tessellator tess = Tessellator.instance;
|
||||||
|
|||||||
Reference in New Issue
Block a user