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
+14 -2
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())