Finally use Java7 <>
This commit is contained in:
@@ -89,7 +89,7 @@ public class GroupIngredient implements IIngredient
|
||||
return new ItemStack[0];
|
||||
}
|
||||
|
||||
final List<ItemStack> out = new LinkedList<ItemStack>();
|
||||
final List<ItemStack> out = new LinkedList<>();
|
||||
this.isInside = true;
|
||||
try
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ public class IngredientSet implements IIngredient
|
||||
return new ItemStack[0];
|
||||
}
|
||||
|
||||
final List<ItemStack> out = new LinkedList<ItemStack>();
|
||||
final List<ItemStack> out = new LinkedList<>();
|
||||
out.addAll( this.items );
|
||||
|
||||
if( out.isEmpty() )
|
||||
|
||||
@@ -32,11 +32,11 @@ import appeng.api.recipes.ICraftHandler;
|
||||
public class RecipeData
|
||||
{
|
||||
|
||||
final Map<String, String> aliases = new HashMap<String, String>();
|
||||
final Map<String, GroupIngredient> groups = new HashMap<String, GroupIngredient>();
|
||||
final Map<String, String> aliases = new HashMap<>();
|
||||
final Map<String, GroupIngredient> groups = new HashMap<>();
|
||||
|
||||
final List<ICraftHandler> handlers = new LinkedList<ICraftHandler>();
|
||||
final Set<String> knownItem = new HashSet<String>();
|
||||
final List<ICraftHandler> handlers = new LinkedList<>();
|
||||
final Set<String> knownItem = new HashSet<>();
|
||||
boolean crash = true;
|
||||
boolean exceptions = true;
|
||||
boolean errorOnMissing = true;
|
||||
|
||||
@@ -84,7 +84,7 @@ import appeng.recipes.handlers.OreRegistration;
|
||||
public class RecipeHandler implements IRecipeHandler
|
||||
{
|
||||
private final RecipeData data;
|
||||
private final List<String> tokens = new LinkedList<String>();
|
||||
private final List<String> tokens = new LinkedList<>();
|
||||
|
||||
public RecipeHandler()
|
||||
{
|
||||
@@ -379,7 +379,7 @@ public class RecipeHandler implements IRecipeHandler
|
||||
throw new IllegalStateException( "Recipes must now be loaded in Init." );
|
||||
}
|
||||
|
||||
final Map<Class, Integer> processed = new HashMap<Class, Integer>();
|
||||
final Map<Class, Integer> processed = new HashMap<>();
|
||||
for( final ICraftHandler ch : this.data.handlers )
|
||||
{
|
||||
try
|
||||
@@ -505,7 +505,7 @@ public class RecipeHandler implements IRecipeHandler
|
||||
|
||||
private List<IWebsiteSerializer> findRecipe( final ItemStack output )
|
||||
{
|
||||
final List<IWebsiteSerializer> out = new LinkedList<IWebsiteSerializer>();
|
||||
final List<IWebsiteSerializer> out = new LinkedList<>();
|
||||
|
||||
for( final ICraftHandler ch : this.data.handlers )
|
||||
{
|
||||
@@ -683,8 +683,8 @@ public class RecipeHandler implements IRecipeHandler
|
||||
|
||||
private List<List<IIngredient>> parseLines( final Iterable<String> subList ) throws RecipeError
|
||||
{
|
||||
final List<List<IIngredient>> out = new LinkedList<List<IIngredient>>();
|
||||
List<IIngredient> cList = new LinkedList<IIngredient>();
|
||||
final List<List<IIngredient>> out = new LinkedList<>();
|
||||
List<IIngredient> cList = new LinkedList<>();
|
||||
|
||||
boolean hasQty = false;
|
||||
int qty = 1;
|
||||
@@ -701,7 +701,7 @@ public class RecipeHandler implements IRecipeHandler
|
||||
{
|
||||
out.add( cList );
|
||||
}
|
||||
cList = new LinkedList<IIngredient>();
|
||||
cList = new LinkedList<>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -60,8 +60,8 @@ public final class DisassembleRecipe extends net.minecraftforge.registries.IForg
|
||||
final IItems items = definitions.items();
|
||||
final IMaterials mats = definitions.materials();
|
||||
|
||||
this.cellMappings = new HashMap<IItemDefinition, IItemDefinition>( 4 );
|
||||
this.nonCellMappings = new HashMap<IItemDefinition, IItemDefinition>( 5 );
|
||||
this.cellMappings = new HashMap<>( 4 );
|
||||
this.nonCellMappings = new HashMap<>( 5 );
|
||||
|
||||
this.cellMappings.put( items.cell1k(), mats.cell1kPart() );
|
||||
this.cellMappings.put( items.cell4k(), mats.cell4kPart() );
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ShapedRecipe extends net.minecraftforge.registries.IForgeRegistryEn
|
||||
throw new IllegalStateException( ret.toString() );
|
||||
}
|
||||
|
||||
final Map<Character, IIngredient> itemMap = new HashMap<Character, IIngredient>();
|
||||
final Map<Character, IIngredient> itemMap = new HashMap<>();
|
||||
|
||||
for( ; idx < recipe.length; idx += 2 )
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ import appeng.api.recipes.IIngredient;
|
||||
public class ShapelessRecipe extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements IRecipe, IRecipeBakeable
|
||||
{
|
||||
|
||||
private final ArrayList<Object> input = new ArrayList<Object>();
|
||||
private final ArrayList<Object> input = new ArrayList<>();
|
||||
private ItemStack output = ItemStack.EMPTY;
|
||||
private boolean disable = false;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ShapelessRecipe extends net.minecraftforge.registries.IForgeRegistr
|
||||
return false;
|
||||
}
|
||||
|
||||
final ArrayList<Object> required = new ArrayList<Object>( this.input );
|
||||
final ArrayList<Object> required = new ArrayList<>( this.input );
|
||||
|
||||
for( int x = 0; x < var1.getSizeInventory(); x++ )
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class Inscribe extends InscriberProcess
|
||||
|
||||
final IInscriberRecipeBuilder builder = AEApi.instance().registries().inscriber().builder();
|
||||
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
|
||||
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
|
||||
final List<ItemStack> inputs = new ArrayList<>( realInput.length );
|
||||
Collections.addAll( inputs, realInput );
|
||||
final ItemStack top = ( this.getTopOptional() == null ) ? ItemStack.EMPTY : this.getTopOptional().getItemStack();
|
||||
final ItemStack bot = ( this.getBotOptional() == null ) ? ItemStack.EMPTY : this.getBotOptional().getItemStack();
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class Press extends InscriberProcess
|
||||
|
||||
final IInscriberRecipeBuilder builder = AEApi.instance().registries().inscriber().builder();
|
||||
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
|
||||
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
|
||||
final List<ItemStack> inputs = new ArrayList<>( realInput.length );
|
||||
Collections.addAll( inputs, realInput );
|
||||
final ItemStack top = ( this.getTopOptional() == null ) ? ItemStack.EMPTY : this.getTopOptional().getItemStack();
|
||||
final ItemStack bot = ( this.getBotOptional() == null ) ? ItemStack.EMPTY : this.getBotOptional().getItemStack();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
char first = 'A';
|
||||
final List<Object> args = new ArrayList<Object>();
|
||||
final List<Object> args = new ArrayList<>();
|
||||
|
||||
for( int y = 0; y < this.rows; y++ )
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
final List<Object> args = new ArrayList<Object>();
|
||||
final List<Object> args = new ArrayList<>();
|
||||
for( final IIngredient i : this.inputs )
|
||||
{
|
||||
args.add( i );
|
||||
|
||||
@@ -231,7 +231,7 @@ 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
|
||||
final Collection<String> result = new HashSet<>( INITIAL_RESOURCE_CAPACITY ); // avoid
|
||||
// duplicates
|
||||
|
||||
// in case it is a
|
||||
|
||||
@@ -36,7 +36,7 @@ public class OreDictionaryHandler
|
||||
|
||||
public static final OreDictionaryHandler INSTANCE = new OreDictionaryHandler();
|
||||
|
||||
private final List<IOreListener> oreListeners = new ArrayList<IOreListener>();
|
||||
private final List<IOreListener> oreListeners = new ArrayList<>();
|
||||
|
||||
private boolean enableRebaking = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user