From 72d85aecc96ed45d1ee734851fbcc7b50771de99 Mon Sep 17 00:00:00 2001 From: thatsIch Date: Sun, 17 May 2015 23:51:57 +0200 Subject: [PATCH] Use interface for collections --- src/main/java/appeng/recipes/RecipeHandler.java | 6 +++--- src/main/java/appeng/recipes/game/ShapedRecipe.java | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/appeng/recipes/RecipeHandler.java b/src/main/java/appeng/recipes/RecipeHandler.java index 2f112dd73..8e5b6dd65 100644 --- a/src/main/java/appeng/recipes/RecipeHandler.java +++ b/src/main/java/appeng/recipes/RecipeHandler.java @@ -1,6 +1,6 @@ /* * This file is part of Applied Energistics 2. - * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. * * Applied Energistics 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -26,10 +26,10 @@ import java.io.IOException; import java.util.HashMap; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; - import javax.annotation.Nonnull; import com.google.common.base.Optional; @@ -362,7 +362,7 @@ public class RecipeHandler implements IRecipeHandler throw new IllegalStateException( "Recipes must now be loaded in Init." ); } - HashMap processed = new HashMap(); + Map processed = new HashMap(); try { for( ICraftHandler ch : this.data.Handlers ) diff --git a/src/main/java/appeng/recipes/game/ShapedRecipe.java b/src/main/java/appeng/recipes/game/ShapedRecipe.java index 2e57a0523..c18f76f1b 100644 --- a/src/main/java/appeng/recipes/game/ShapedRecipe.java +++ b/src/main/java/appeng/recipes/game/ShapedRecipe.java @@ -1,6 +1,6 @@ /* * This file is part of Applied Energistics 2. - * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. * * Applied Energistics 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -21,6 +21,7 @@ package appeng.recipes.game; import java.util.ArrayList; import java.util.HashMap; +import java.util.Map; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; @@ -103,7 +104,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable throw new IllegalStateException( ret.toString() ); } - HashMap itemMap = new HashMap(); + Map itemMap = new HashMap(); for(; idx < recipe.length; idx += 2 ) { @@ -112,7 +113,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable if( in instanceof IIngredient ) { - itemMap.put( chr, in ); + itemMap.put( chr, (IIngredient) in ); } else {