Closes #1054: Adds an Inscriber API for Developers

This commit is contained in:
thatsIch
2015-04-05 20:16:02 +02:00
parent 1bb8de3570
commit 06bca227d0
19 changed files with 904 additions and 187 deletions
@@ -30,6 +30,8 @@ import java.util.Map.Entry;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.annotation.Nonnull;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -63,6 +65,12 @@ import appeng.recipes.handlers.IWebsiteSerializer;
import appeng.recipes.handlers.OreRegistration;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv2
* @since rv0
*/
public class RecipeHandler implements IRecipeHandler
{
@@ -84,21 +92,18 @@ public class RecipeHandler implements IRecipeHandler
this.data.Handlers.add( ch );
}
public String getName( IIngredient i )
public String getName( @Nonnull IIngredient i )
{
try
{
for( ItemStack is : i.getItemStackSet() )
{
try
{
return this.getName( is );
}
catch( RecipeError ignored )
{
}
return this.getName( is );
}
}
catch( RecipeError ignored )
{
}
catch( Throwable t )
{
t.printStackTrace();