Fixes #3024: Crash on recipe lookup for disabled features (#3026)

* Fixes #3024: Crash on recipe lookup for disabled features

Adds a new recipe condition for a single AEFeature or a list of them.
Moved the factories to their own package, in preparation of phasing out
the old recipe handling.
This commit is contained in:
yueh
2017-08-17 17:17:26 +02:00
committed by GitHub
parent 488ef1b544
commit 630fae3f73
7 changed files with 219 additions and 56 deletions
@@ -1,6 +1,12 @@
[
{
"name": "appliedenergistics2:interface",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": ["interface"]
}
],
"ingredient": [
{
"item": "appliedenergistics2:interface"
@@ -13,6 +19,12 @@
},
{
"name": "appliedenergistics2:knife",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": "quartz_knife"
}
],
"ingredient": [
{
"item": "appliedenergistics2:certus_quartz_cutting_knife",
@@ -26,6 +38,12 @@
},
{
"name": "appliedenergistics2:wrench",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": ["quartz_wrench"]
}
],
"ingredient": [
{
"item": "appliedenergistics2:certus_quartz_wrench"
@@ -1,12 +1,13 @@
{
"conditions": {
"material_exists": "appeng.recipes.RecipeHandler$MaterialExists"
"material_exists": "appeng.recipes.factories.conditions.MaterialExists",
"features": "appeng.recipes.factories.conditions.Features"
},
"ingredients": {
"part": "appeng.recipes.RecipeHandler$PartFactory"
"part": "appeng.recipes.factories.ingredients.PartIngredientFactory"
},
"recipes": {
"part_shaped": "appeng.recipes.helpers.PartRecipeFactory",
"part_shapeless": "appeng.recipes.helpers.PartRecipeFactory"
"part_shaped": "appeng.recipes.factories.recipes.PartRecipeFactory",
"part_shapeless": "appeng.recipes.factories.recipes.PartRecipeFactory"
}
}