Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
@@ -18,6 +18,7 @@
package appeng.parts.misc;
import java.io.IOException;
import java.util.List;
import java.util.Random;
@@ -48,6 +49,7 @@ import appeng.api.parts.IPartRenderHelper;
import appeng.api.parts.ISimplifiedBundle;
import appeng.api.parts.PartItemStack;
public class PartCableAnchor implements IPart
{
@@ -56,35 +58,29 @@ public class PartCableAnchor implements IPart
IPartHost host = null;
ForgeDirection mySide = ForgeDirection.UP;
public PartCableAnchor(ItemStack is) {
public PartCableAnchor( ItemStack is )
{
this.is = is;
}
@Override
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
public void getBoxes( IPartCollisionHelper bch )
{
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
IIcon myIcon = this.is.getIconIndex();
rh.setTexture( myIcon );
if ( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
rh.setBounds( 7, 7, 10, 9, 9, 14 );
if( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
bch.addBox( 7, 7, 10, 9, 9, 14 );
else
rh.setBounds( 7, 7, 10, 9, 9, 16 );
rh.renderBlock( x, y, z, renderer );
rh.setTexture( null );
bch.addBox( 7, 7, 10, 9, 9, 16 );
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random r)
public ItemStack getItemStack( PartItemStack wrenched )
{
return this.is;
}
@Override
@SideOnly(Side.CLIENT)
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
@SideOnly( Side.CLIENT )
public void renderInventory( IPartRenderHelper instance, RenderBlocks renderer )
{
instance.setTexture( this.is.getIconIndex() );
instance.setBounds( 7, 7, 4, 9, 9, 14 );
@@ -93,18 +89,31 @@ public class PartCableAnchor implements IPart
}
@Override
public void getBoxes(IPartCollisionHelper bch)
@SideOnly( Side.CLIENT )
public void renderStatic( int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer )
{
if ( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
bch.addBox( 7, 7, 10, 9, 9, 14 );
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
IIcon myIcon = this.is.getIconIndex();
rh.setTexture( myIcon );
if( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
rh.setBounds( 7, 7, 10, 9, 9, 14 );
else
bch.addBox( 7, 7, 10, 9, 9, 16 );
rh.setBounds( 7, 7, 10, 9, 9, 16 );
rh.renderBlock( x, y, z, renderer );
rh.setTexture( null );
}
@Override
public ItemStack getItemStack(PartItemStack wrenched)
@SideOnly( Side.CLIENT )
public void renderDynamic( double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer )
{
return this.is;
}
@Override
public IIcon getBreakingTexture()
{
return null;
}
@Override
@@ -113,13 +122,6 @@ public class PartCableAnchor implements IPart
return false;
}
@Override
@SideOnly(Side.CLIENT)
public void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer)
{
}
@Override
public boolean isSolid()
{
@@ -133,13 +135,13 @@ public class PartCableAnchor implements IPart
}
@Override
public void writeToNBT(NBTTagCompound data)
public void writeToNBT( NBTTagCompound data )
{
}
@Override
public void readFromNBT(NBTTagCompound data)
public void readFromNBT( NBTTagCompound data )
{
}
@@ -150,6 +152,12 @@ public class PartCableAnchor implements IPart
return 0;
}
@Override
public boolean isLadder( EntityLivingBase entity )
{
return this.mySide.offsetY == 0 && ( entity.isCollidedHorizontally || !entity.onGround );
}
@Override
public void onNeighborChanged()
{
@@ -169,13 +177,13 @@ public class PartCableAnchor implements IPart
}
@Override
public void writeToStream(ByteBuf data) throws IOException
public void writeToStream( ByteBuf data ) throws IOException
{
}
@Override
public boolean readFromStream(ByteBuf data) throws IOException
public boolean readFromStream( ByteBuf data ) throws IOException
{
return false;
}
@@ -187,7 +195,7 @@ public class PartCableAnchor implements IPart
}
@Override
public void onEntityCollision(Entity entity)
public void onEntityCollision( Entity entity )
{
}
@@ -211,20 +219,26 @@ public class PartCableAnchor implements IPart
}
@Override
public void setPartHostInfo(ForgeDirection side, IPartHost host, TileEntity tile)
public void setPartHostInfo( ForgeDirection side, IPartHost host, TileEntity tile )
{
this.host = host;
this.mySide = side;
}
@Override
public boolean onActivate(EntityPlayer player, Vec3 pos)
public boolean onActivate( EntityPlayer player, Vec3 pos )
{
return false;
}
@Override
public void getDrops(List<ItemStack> drops, boolean wrenched)
public boolean onShiftActivate( EntityPlayer player, Vec3 pos )
{
return false;
}
@Override
public void getDrops( List<ItemStack> drops, boolean wrenched )
{
}
@@ -236,32 +250,21 @@ public class PartCableAnchor implements IPart
}
@Override
public boolean isLadder(EntityLivingBase entity)
{
return this.mySide.offsetY == 0 && ( entity.isCollidedHorizontally || ! entity.onGround );
}
@Override
public boolean onShiftActivate(EntityPlayer player, Vec3 pos)
{
return false;
}
@Override
public void onPlacement(EntityPlayer player, ItemStack held, ForgeDirection side)
@SideOnly( Side.CLIENT )
public void randomDisplayTick( World world, int x, int y, int z, Random r )
{
}
@Override
public boolean canBePlacedOn(BusSupport what)
public void onPlacement( EntityPlayer player, ItemStack held, ForgeDirection side )
{
}
@Override
public boolean canBePlacedOn( BusSupport what )
{
return what == BusSupport.CABLE || what == BusSupport.DENSE_CABLE;
}
@Override
public IIcon getBreakingTexture()
{
return null;
}
}