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
@@ -80,7 +80,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
{
ResolverResult resolver = null;
for ( ItemStack crystalSeedStack : AEApi.instance().definitions().items().crystalSeed().maybeStack( 1 ).asSet() )
for( ItemStack crystalSeedStack : AEApi.instance().definitions().items().crystalSeed().maybeStack( 1 ).asSet() )
{
crystalSeedStack.setItemDamage( certus2 );
crystalSeedStack = newStyle( crystalSeedStack );
@@ -98,7 +98,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
private int getProgress( ItemStack is )
{
if ( is.hasTagCompound() )
if( is.hasTagCompound() )
{
return is.getTagCompound().getInteger( "progress" );
}
@@ -120,28 +120,28 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
final IMaterials materials = AEApi.instance().definitions().materials();
final int size = is.stackSize;
if ( newDamage == Certus + SINGLE_OFFSET )
if( newDamage == Certus + SINGLE_OFFSET )
{
for ( ItemStack quartzStack : materials.purifiedCertusQuartzCrystal().maybeStack( size ).asSet() )
for( ItemStack quartzStack : materials.purifiedCertusQuartzCrystal().maybeStack( size ).asSet() )
{
return quartzStack;
}
}
if ( newDamage == Nether + SINGLE_OFFSET )
if( newDamage == Nether + SINGLE_OFFSET )
{
for ( ItemStack quartzStack : materials.purifiedNetherQuartzCrystal().maybeStack( size ).asSet() )
for( ItemStack quartzStack : materials.purifiedNetherQuartzCrystal().maybeStack( size ).asSet() )
{
return quartzStack;
}
}
if ( newDamage == Fluix + SINGLE_OFFSET )
if( newDamage == Fluix + SINGLE_OFFSET )
{
for ( ItemStack quartzStack : materials.purifiedFluixCrystal().maybeStack( size ).asSet() )
for( ItemStack quartzStack : materials.purifiedFluixCrystal().maybeStack( size ).asSet() )
{
return quartzStack;
}
}
if ( newDamage > END )
if( newDamage > END )
return null;
this.setProgress( is, newDamage );
@@ -153,10 +153,6 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
NBTTagCompound comp = Platform.openNbtData( is );
comp.setInteger( "progress", newDamage );
is.setItemDamage( is.getItemDamage() / LEVEL_OFFSET * LEVEL_OFFSET );
} @Override
public int getEntityLifespan( ItemStack itemStack, World world )
{
return Integer.MAX_VALUE;
}
@Override
@@ -173,25 +169,31 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
lines.add( Math.floor( (float) progress / (float) ( SINGLE_OFFSET / 100 ) ) + "%" );
super.addCheckedInformation( stack, player, lines, displayAdditionalInformation );
} @Override
}
@Override
public int getEntityLifespan( ItemStack itemStack, World world )
{
return Integer.MAX_VALUE;
}
@Override
public String getUnlocalizedName( ItemStack is )
{
int damage = this.getProgress( is );
if ( damage < Certus + SINGLE_OFFSET )
if( damage < Certus + SINGLE_OFFSET )
return this.getUnlocalizedName() + ".Certus";
if ( damage < Nether + SINGLE_OFFSET )
if( damage < Nether + SINGLE_OFFSET )
return this.getUnlocalizedName() + ".Nether";
if ( damage < Fluix + SINGLE_OFFSET )
if( damage < Fluix + SINGLE_OFFSET )
return this.getUnlocalizedName() + ".Fluix";
return this.getUnlocalizedName();
}
@Override
public boolean isDamageable()
{
@@ -223,27 +225,27 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
int damage = this.getProgress( stack );
if ( damage < Certus + SINGLE_OFFSET )
if( damage < Certus + SINGLE_OFFSET )
list = this.certus;
else if ( damage < Nether + SINGLE_OFFSET )
else if( damage < Nether + SINGLE_OFFSET )
{
damage -= Nether;
list = this.nether;
}
else if ( damage < Fluix + SINGLE_OFFSET )
else if( damage < Fluix + SINGLE_OFFSET )
{
damage -= Fluix;
list = this.fluix;
}
if ( list == null )
if( list == null )
return Items.diamond.getIconFromDamage( 0 );
if ( damage < LEVEL_OFFSET )
if( damage < LEVEL_OFFSET )
return list[0];
else if ( damage < LEVEL_OFFSET * 2 )
else if( damage < LEVEL_OFFSET * 2 )
return list[1];
else
return list[2];
@@ -282,7 +284,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
egc.motionY = location.motionY;
egc.motionZ = location.motionZ;
if ( location instanceof EntityItem )
if( location instanceof EntityItem )
egc.delayBeforeCanPickup = ( (EntityItem) location ).delayBeforeCanPickup;
return egc;
@@ -306,6 +308,4 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + Nether ) ) );
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + Fluix ) ) );
}
}
@@ -53,7 +53,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
{
this.setFeature( EnumSet.of( AEFeature.Patterns ) );
this.setMaxStackSize( 1 );
if ( Platform.isClient() )
if( Platform.isClient() )
MinecraftForgeClient.registerItemRenderer( this, new ItemEncodedPatternRenderer() );
}
@@ -73,18 +73,18 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
private boolean clearPattern( ItemStack stack, EntityPlayer player )
{
if ( player.isSneaking() )
if( player.isSneaking() )
{
if ( Platform.isClient() )
if( Platform.isClient() )
return false;
InventoryPlayer inv = player.inventory;
for ( int s = 0; s < player.inventory.getSizeInventory(); s++ )
for( int s = 0; s < player.inventory.getSizeInventory(); s++ )
{
if ( inv.getStackInSlot( s ) == stack )
if( inv.getStackInSlot( s ) == stack )
{
for ( ItemStack blankPattern : AEApi.instance().definitions().materials().blankPattern().maybeStack( stack.stackSize ).asSet() )
for( ItemStack blankPattern : AEApi.instance().definitions().materials().blankPattern().maybeStack( stack.stackSize ).asSet() )
{
inv.setInventorySlotContents( s, blankPattern );
}
@@ -102,7 +102,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
{
ICraftingPatternDetails details = this.getPatternForItem( stack, player.worldObj );
if ( details == null )
if( details == null )
{
lines.add( EnumChatFormatting.RED + GuiText.InvalidPattern.getLocal() );
return;
@@ -118,9 +118,9 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
String with = GuiText.With.getLocal() + ": ";
boolean first = true;
for ( IAEItemStack anOut : out )
for( IAEItemStack anOut : out )
{
if ( anOut == null )
if( anOut == null )
{
continue;
}
@@ -130,9 +130,9 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
}
first = true;
for ( IAEItemStack anIn : in )
for( IAEItemStack anIn : in )
{
if ( anIn == null )
if( anIn == null )
{
continue;
}
@@ -149,7 +149,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
{
return new PatternHelper( is, w );
}
catch ( Throwable t )
catch( Throwable t )
{
return null;
}
@@ -158,16 +158,16 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
public ItemStack getOutput( ItemStack item )
{
ItemStack out = SIMPLE_CACHE.get( item );
if ( out != null )
if( out != null )
return out;
World w = CommonHelper.proxy.getWorld();
if ( w == null )
if( w == null )
return null;
ICraftingPatternDetails details = this.getPatternForItem( item, w );
if ( details == null )
if( details == null )
return null;
SIMPLE_CACHE.put( item, out = details.getCondensedOutputs()[0].getItemStack() );
@@ -45,7 +45,7 @@ public class ItemPaintBall extends AEBaseItem
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
this.setHasSubtypes( true );
if ( Platform.isClient() )
if( Platform.isClient() )
MinecraftForgeClient.registerItemRenderer( this, new PaintBallRender() );
}
@@ -63,10 +63,10 @@ public class ItemPaintBall extends AEBaseItem
public AEColor getColor( ItemStack is )
{
int dmg = is.getItemDamage();
if ( dmg >= DAMAGE_THRESHOLD )
if( dmg >= DAMAGE_THRESHOLD )
dmg -= DAMAGE_THRESHOLD;
if ( dmg >= AEColor.values().length )
if( dmg >= AEColor.values().length )
return AEColor.Transparent;
return AEColor.values()[dmg];
@@ -75,12 +75,12 @@ public class ItemPaintBall extends AEBaseItem
@Override
public void getSubItems( Item i, CreativeTabs ct, List l )
{
for ( AEColor c : AEColor.values() )
if ( c != AEColor.Transparent )
for( AEColor c : AEColor.values() )
if( c != AEColor.Transparent )
l.add( new ItemStack( this, 1, c.ordinal() ) );
for ( AEColor c : AEColor.values() )
if ( c != AEColor.Transparent )
for( AEColor c : AEColor.values() )
if( c != AEColor.Transparent )
l.add( new ItemStack( this, 1, DAMAGE_THRESHOLD + c.ordinal() ) );
}