Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -28,15 +29,17 @@ import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
import appeng.tile.networking.TileController;
|
||||
|
||||
|
||||
public class RenderBlockController extends BaseBlockRender
|
||||
{
|
||||
|
||||
public RenderBlockController() {
|
||||
public RenderBlockController()
|
||||
{
|
||||
super( false, 20 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld(AEBaseBlock blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
|
||||
public boolean renderInWorld( AEBaseBlock blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
{
|
||||
|
||||
boolean xx = this.getTileEntity( world, x - 1, y, z ) instanceof TileController && this.getTileEntity( world, x + 1, y, z ) instanceof TileController;
|
||||
@@ -49,12 +52,12 @@ public class RenderBlockController extends BaseBlockRender
|
||||
|
||||
ExtraBlockTextures lights = null;
|
||||
|
||||
if ( xx && !yy && !zz )
|
||||
if( xx && !yy && !zz )
|
||||
{
|
||||
if ( hasPower )
|
||||
if( hasPower )
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumnPowered.getIcon() );
|
||||
if ( isConflict )
|
||||
if( isConflict )
|
||||
lights = ExtraBlockTextures.BlockControllerColumnConflict;
|
||||
else
|
||||
lights = ExtraBlockTextures.BlockControllerColumnLights;
|
||||
@@ -67,12 +70,12 @@ public class RenderBlockController extends BaseBlockRender
|
||||
renderer.uvRotateTop = 1;
|
||||
renderer.uvRotateBottom = 1;
|
||||
}
|
||||
else if ( !xx && yy && !zz )
|
||||
else if( !xx && yy && !zz )
|
||||
{
|
||||
if ( hasPower )
|
||||
if( hasPower )
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumnPowered.getIcon() );
|
||||
if ( isConflict )
|
||||
if( isConflict )
|
||||
lights = ExtraBlockTextures.BlockControllerColumnConflict;
|
||||
else
|
||||
lights = ExtraBlockTextures.BlockControllerColumnLights;
|
||||
@@ -83,12 +86,12 @@ public class RenderBlockController extends BaseBlockRender
|
||||
renderer.uvRotateEast = 0;
|
||||
renderer.uvRotateNorth = 0;
|
||||
}
|
||||
else if ( !xx && !yy && zz )
|
||||
else if( !xx && !yy && zz )
|
||||
{
|
||||
if ( hasPower )
|
||||
if( hasPower )
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumnPowered.getIcon() );
|
||||
if ( isConflict )
|
||||
if( isConflict )
|
||||
lights = ExtraBlockTextures.BlockControllerColumnConflict;
|
||||
else
|
||||
lights = ExtraBlockTextures.BlockControllerColumnLights;
|
||||
@@ -100,33 +103,32 @@ public class RenderBlockController extends BaseBlockRender
|
||||
renderer.uvRotateSouth = 1;
|
||||
renderer.uvRotateTop = 0;
|
||||
}
|
||||
else if ( (xx ? 1 : 0) + (yy ? 1 : 0) + (zz ? 1 : 0) >= 2 )
|
||||
else if( ( xx ? 1 : 0 ) + ( yy ? 1 : 0 ) + ( zz ? 1 : 0 ) >= 2 )
|
||||
{
|
||||
int v = (Math.abs( x ) + Math.abs( y ) + Math.abs( z )) % 2;
|
||||
int v = ( Math.abs( x ) + Math.abs( y ) + Math.abs( z ) ) % 2;
|
||||
renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
if ( v == 0 )
|
||||
if( v == 0 )
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerInsideA.getIcon() );
|
||||
else
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerInsideB.getIcon() );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( hasPower )
|
||||
if( hasPower )
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerPowered.getIcon() );
|
||||
if ( isConflict )
|
||||
if( isConflict )
|
||||
lights = ExtraBlockTextures.BlockControllerConflict;
|
||||
else
|
||||
lights = ExtraBlockTextures.BlockControllerLights;
|
||||
}
|
||||
else
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
}
|
||||
|
||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
if ( lights != null )
|
||||
if( lights != null )
|
||||
{
|
||||
Tessellator.instance.setColorOpaque_F( 1.0f, 1.0f, 1.0f );
|
||||
Tessellator.instance.setBrightness( 14 << 20 | 14 << 4 );
|
||||
@@ -143,9 +145,9 @@ public class RenderBlockController extends BaseBlockRender
|
||||
return out;
|
||||
}
|
||||
|
||||
private TileEntity getTileEntity(IBlockAccess world, int x, int y, int z)
|
||||
private TileEntity getTileEntity( IBlockAccess world, int x, int y, int z )
|
||||
{
|
||||
if ( y >= 0 )
|
||||
if( y >= 0 )
|
||||
return world.getTileEntity( x, y, z );
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user