Puts everywhere brackets

This commit is contained in:
thatsIch
2015-04-29 02:30:53 +02:00
parent 23aa8fd72d
commit 64ed05a1b4
465 changed files with 6726 additions and 14 deletions
@@ -62,7 +62,9 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
this.charge -= this.ticksPerRotation;
ICrankable g = this.getGrinder();
if( g != null )
{
g.applyTurn();
}
}
this.rotation--;
@@ -72,12 +74,16 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
public ICrankable getGrinder()
{
if( Platform.isClient() )
{
return null;
}
ForgeDirection grinder = this.getUp().getOpposite();
TileEntity te = this.worldObj.getTileEntity( this.xCoord + grinder.offsetX, this.yCoord + grinder.offsetY, this.zCoord + grinder.offsetZ );
if( te instanceof ICrankable )
{
return (ICrankable) te;
}
return null;
}
@@ -113,7 +119,9 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
public boolean power()
{
if( Platform.isClient() )
{
return false;
}
if( this.rotation < 3 )
{
@@ -69,7 +69,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
public boolean canInsertItem( int slotIndex, ItemStack insertingItem, int side )
{
if( AEApi.instance().registries().grinder().getRecipeForInput( insertingItem ) == null )
{
return false;
}
return slotIndex >= 0 && slotIndex <= 2;
}
@@ -90,7 +92,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
public boolean canTurn()
{
if( Platform.isClient() )
{
return false;
}
if( null == this.getStackInSlot( 6 ) ) // Add if there isn't one...
{
@@ -99,7 +103,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
{
ItemStack item = src.getStackInSlot( x );
if( item == null )
{
continue;
}
IGrinderEntry r = AEApi.instance().registries().grinder().getRecipeForInput( item );
if( r != null )
@@ -111,7 +117,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
ais.stackSize = r.getInput().stackSize;
if( item.stackSize <= 0 )
{
item = null;
}
src.setInventorySlotContents( x, item );
this.setInventorySlotContents( 6, ais );
@@ -128,7 +136,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
public void applyTurn()
{
if( Platform.isClient() )
{
return;
}
this.points++;
@@ -137,7 +147,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
if( r != null )
{
if( r.getEnergyCost() > this.points )
{
return;
}
this.points = 0;
InventoryAdaptor sia = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( this, 3, 3, true ), ForgeDirection.EAST );
@@ -146,11 +158,15 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
float chance = ( Platform.getRandomInt() % 2000 ) / 2000.0f;
if( chance <= r.getOptionalChance() )
{
this.addItem( sia, r.getOptionalOutput() );
}
chance = ( Platform.getRandomInt() % 2000 ) / 2000.0f;
if( chance <= r.getSecondOptionalChance() )
{
this.addItem( sia, r.getSecondOptionalOutput() );
}
this.setInventorySlotContents( 6, null );
}
@@ -159,7 +175,9 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
private void addItem( InventoryAdaptor sia, ItemStack output )
{
if( output == null )
{
return;
}
ItemStack notAdded = sia.addItems( output );
if( notAdded != null )