Formatted code

This commit is contained in:
yueh
2015-12-24 02:03:16 +01:00
parent e94a0cfccf
commit c9e8a6e939
216 changed files with 1196 additions and 1187 deletions
@@ -187,12 +187,9 @@ public class Ingredient implements IIngredient
/*
* Object o = Item.itemRegistry.getObject( nameSpace + ":" + itemName ); if ( o instanceof Item ) return new
* ItemStack( (Item) o, qty, meta );
*
* if ( o instanceof Block ) return new ItemStack( (Block) o, qty, meta );
*
* o = Item.itemRegistry.getObject( nameSpace + ":item." + itemName ); if ( o instanceof Item ) return new
* ItemStack( (Item) o, qty, meta );
*
* o = Block.blockRegistry.getObject( nameSpace + ":tile." + itemName ); if ( o instanceof Block && (!(o
* instanceof BlockAir)) ) return new ItemStack( (Block) o, qty, meta );
*/
@@ -178,6 +178,6 @@ public final class DisassembleRecipe implements IRecipe
public ItemStack[] getRemainingItems(
final InventoryCrafting inv )
{
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
return ForgeHooks.defaultRecipeGetRemainingItems( inv );
}
}
@@ -96,12 +96,12 @@ public final class FacadeRecipe implements IRecipe
{
return null;
}
@Override
public ItemStack[] getRemainingItems(
final InventoryCrafting inv )
{
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
return ForgeHooks.defaultRecipeGetRemainingItems( inv );
}
}
@@ -105,7 +105,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
final Map<Character, IIngredient> itemMap = new HashMap<Character, IIngredient>();
for(; idx < recipe.length; idx += 2 )
for( ; idx < recipe.length; idx += 2 )
{
final Character chr = (Character) recipe[idx];
final Object in = recipe[idx + 1];
@@ -270,7 +270,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
{
return false;
}
return ( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
return( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
}
public ShapedRecipe setMirrored( final boolean mirror )
@@ -324,12 +324,12 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
this.disable = true;
}
}
@Override
public ItemStack[] getRemainingItems(
final InventoryCrafting inv )
{
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
return ForgeHooks.defaultRecipeGetRemainingItems( inv );
}
}
@@ -146,7 +146,7 @@ public class ShapelessRecipe implements IRecipe, IRecipeBakeable
private boolean checkItemEquals( final ItemStack target, final ItemStack input )
{
return ( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
return( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
}
/**
@@ -179,12 +179,12 @@ public class ShapelessRecipe implements IRecipe, IRecipeBakeable
this.disable = true;
}
}
@Override
public ItemStack[] getRemainingItems(
final InventoryCrafting inv )
{
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
return ForgeHooks.defaultRecipeGetRemainingItems( inv );
}
}
@@ -45,11 +45,11 @@ public final class Inscribe extends InscriberProcess
@Override
public void register() throws RegistrationError, MissingIngredientError
{
if ( this.getImprintable() == null )
if( this.getImprintable() == null )
{
return;
}
if ( this.getOutput() == null )
if( this.getOutput() == null )
{
return;
}
@@ -57,8 +57,8 @@ public final class Inscribe extends InscriberProcess
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
Collections.addAll( inputs, realInput );
final ItemStack top = (this.getTopOptional() == null) ? null : this.getTopOptional().getItemStack();
final ItemStack bot = (this.getBotOptional() == null) ? null : this.getBotOptional().getItemStack();
final ItemStack top = ( this.getTopOptional() == null ) ? null : this.getTopOptional().getItemStack();
final ItemStack bot = ( this.getBotOptional() == null ) ? null : this.getBotOptional().getItemStack();
final ItemStack output = this.getOutput().getItemStack();
final InscriberProcessType type = InscriberProcessType.Inscribe;
@@ -1,3 +1,4 @@
package appeng.recipes.handlers;
@@ -77,7 +78,7 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
{
String pattern = "inscriber ";
if ( this.output != null )
if( this.output != null )
{
pattern += this.output.getQty() + '\n';
pattern += handler.getName( this.output ) + '\n';
@@ -88,7 +89,7 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
pattern += handler.getName( this.topOptional ) + '\n';
}
if ( this.imprintable != null )
if( this.imprintable != null )
{
pattern += handler.getName( this.imprintable );
}
@@ -45,11 +45,11 @@ public final class Press extends InscriberProcess
@Override
public void register() throws RegistrationError, MissingIngredientError
{
if ( this.getImprintable() == null )
if( this.getImprintable() == null )
{
return;
}
if ( this.getOutput() == null )
if( this.getOutput() == null )
{
return;
}
@@ -230,7 +230,8 @@ public class RecipeResourceCopier
try
{
final Enumeration<JarEntry> entries = jar.entries(); // gives ALL entries in jar
final Collection<String> result = new HashSet<String>( INITIAL_RESOURCE_CAPACITY ); // avoid duplicates
final Collection<String> result = new HashSet<String>( INITIAL_RESOURCE_CAPACITY ); // avoid
// duplicates
// in case it is a
// subdirectory