Website recipes need AE Items.

Ignore BC Items.
This commit is contained in:
AlgorithmX2 2014-03-09 16:39:30 -05:00
parent 49fcc7f510
commit dfd24a6756
4 changed files with 29 additions and 3 deletions

View file

@ -148,6 +148,9 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
featureFlags.add( feature );
}
if ( featureFlags.contains( AEFeature.WebsiteRecipes ) )
featureFlags.add( AEFeature.DuplicateItems );
for (Enum e : settings.getSettings())
{
String Category = e.getClass().getSimpleName();

View file

@ -59,7 +59,16 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
{
for (ISubItemResolver sir : resolvers)
{
ResolveResult rr = sir.resolveItemByName( nameSpace, itemName );
ResolveResult rr = null;
try
{
rr = sir.resolveItemByName( nameSpace, itemName );
}
catch (Throwable t)
{
AELog.error( t );
}
if ( rr != null )
return rr;

View file

@ -25,6 +25,8 @@ public class AEItemResolver implements ISubItemResolver
return new ResolveResult( "ItemCrystalSeed", ItemCrystalSeed.Nether );
if ( itemName.equalsIgnoreCase( "ItemCrystalSeed.Fluix" ) )
return new ResolveResult( "ItemCrystalSeed", ItemCrystalSeed.Fluix );
return null;
}
if ( itemName.startsWith( "ItemMaterial." ) )

View file

@ -23,6 +23,7 @@ import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.IRecipeLoader;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.features.AEFeature;
import appeng.items.materials.ItemMaterial;
import appeng.items.parts.ItemPart;
@ -180,7 +181,15 @@ public class RecipeHandler implements IRecipeHandler
try
{
for (ItemStack is : i.getItemStackSet())
return getName( is );
{
try
{
return getName( is );
}
catch (RecipeError notappicable)
{
}
}
}
catch (Throwable t)
{
@ -191,11 +200,14 @@ public class RecipeHandler implements IRecipeHandler
return i.getNameSpace() + ":" + i.getItemName();
}
public String getName(ItemStack is)
public String getName(ItemStack is) throws RecipeError
{
UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor( is.getItem() );
String realName = id.modId + ":" + id.name;
if ( !id.modId.equals( AppEng.modid ) && !id.modId.equals( "minecraft" ) )
throw new RecipeError( "Not applicable for website" );
if ( is.getItem() == AEApi.instance().blocks().blockSkyStone.item() )
{
switch (is.getItemDamage())