This commit is contained in:
AlgorithmX2 2014-04-14 02:39:39 -05:00
commit 506b7a7129
6 changed files with 17 additions and 17 deletions

View file

@ -2,6 +2,7 @@ package appeng.client.render.blocks;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
@ -19,9 +20,9 @@ public class RenderBlockController extends BaseBlockRender
public boolean renderInWorld(AEBaseBlock blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
{
boolean xx = world.getTileEntity( x - 1, y, z ) instanceof TileController && world.getTileEntity( x + 1, y, z ) instanceof TileController;
boolean yy = world.getTileEntity( x, y - 1, z ) instanceof TileController && world.getTileEntity( x, y + 1, z ) instanceof TileController;
boolean zz = world.getTileEntity( x, y, z - 1 ) instanceof TileController && world.getTileEntity( x, y, z + 1 ) instanceof TileController;
boolean xx = getTileEntity( world, x - 1, y, z ) instanceof TileController && getTileEntity( world, x + 1, y, z ) instanceof TileController;
boolean yy = getTileEntity( world, x, y - 1, z ) instanceof TileController && getTileEntity( world, x, y + 1, z ) instanceof TileController;
boolean zz = getTileEntity( world, x, y, z - 1 ) instanceof TileController && getTileEntity( world, x, y, z + 1 ) instanceof TileController;
int meta = world.getBlockMetadata( x, y, z );
boolean hasPower = meta > 0;
@ -122,4 +123,11 @@ public class RenderBlockController extends BaseBlockRender
renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
return out;
}
private TileEntity getTileEntity(IBlockAccess world, int x, int y, int z)
{
if ( y >= 0 )
return world.getTileEntity( x, y, z );
return null;
}
}

View file

@ -428,7 +428,6 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
@Override
public void partChanged()
{
AELog.info( "rebuildSlotMap" );
if ( tile() instanceof TIInventoryTile )
((TIInventoryTile) tile()).rebuildSlotMap();
@ -485,11 +484,6 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
cb.onInputsChanged( world, x, y, z, side, inputValues );
}
public void markDirty()
{
markForSave();
}
@Override
public void onInputChanged(World world, int x, int y, int z, ForgeDirection side, int inputValue)
{

View file

@ -124,8 +124,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I
@Override
public void getBoxes(IPartCollsionHelper bch)
{
bch.addBox( 6, 6, 11, 10, 10, 12 );
bch.addBox( 6, 6, 12, 10, 10, 13 );
bch.addBox( 6, 6, 11, 10, 10, 13 );
bch.addBox( 5, 5, 13, 11, 11, 14 );
bch.addBox( 4, 4, 14, 12, 12, 16 );
}

View file

@ -110,10 +110,8 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
@Override
public void getBoxes(IPartCollsionHelper bch)
{
bch.addBox( 3, 3, 15, 13, 13, 16 );
bch.addBox( 2, 2, 14, 14, 14, 15 );
bch.addBox( 5, 5, 12, 11, 11, 13 );
bch.addBox( 5, 5, 13, 11, 11, 14 );
bch.addBox( 2, 2, 14, 14, 14, 16 );
bch.addBox( 5, 5, 12, 11, 11, 14 );
}
@Override

View file

@ -328,8 +328,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
bch.addBox( 3, 3, 15, 13, 13, 16 );
bch.addBox( 2, 2, 14, 14, 14, 15 );
bch.addBox( 5, 5, 12, 11, 11, 13 );
bch.addBox( 5, 5, 13, 11, 11, 14 );
bch.addBox( 5, 5, 12, 11, 11, 14 );
}
@Override

View file

@ -332,6 +332,8 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
@Override
public void getBoxes(IPartCollsionHelper bch)
{
bch.addBox( 5, 5, 12, 11, 11, 13 );
bch.addBox( 3, 3, 13, 13, 13, 14 );
bch.addBox( 2, 2, 14, 14, 14, 16 );
}