Applied Energistics 2 Fixes

- Fixed getRecipeInfo() for Grinder displayed output instead of input
- Fixed wildcard support for item damage
- Added Botania special flower support
- Tested all AE2 script functions
This commit is contained in:
Zixxl 2015-06-29 17:15:23 +02:00
parent da33cc6fab
commit f8d537e857
3 changed files with 10 additions and 7 deletions

View file

@ -48,8 +48,8 @@ public class StackHelper {
return false;
}
// Do we have a wildcard (<*>) or an actual item?
if(ingredient.getItems() != null) {
// Check for Botania special flowers
if(ingredient.getItems() != null && Botania.isSubtile(toStack(itemStack))) {
for(IItemStack item : ingredient.getItems()) {
if(areEqual(toStack(item), toStack(itemStack))) {
return true;

View file

@ -1,8 +1,9 @@
package modtweaker2.mods.appeng.handlers;
import static modtweaker2.helpers.InputHelper.getStackDescription;
import static modtweaker2.helpers.InputHelper.toIngredient;
import static modtweaker2.helpers.InputHelper.toIItemStack;
import static modtweaker2.helpers.InputHelper.toStack;
import static modtweaker2.helpers.StackHelper.matches;
import java.util.LinkedList;
@ -78,7 +79,7 @@ public class Grind {
LinkedList<IGrinderEntry> result = new LinkedList<IGrinderEntry>();
for(IGrinderEntry entry : AEApi.instance().registries().grinder().getRecipes()) {
if(entry != null && entry.getOutput() != null && output.contains(toIngredient(entry.getOutput()))) {
if(entry != null && entry.getOutput() != null && matches(output, toIItemStack(entry.getOutput()))) {
result.add(entry);
}
}
@ -98,7 +99,7 @@ public class Grind {
@Override
public String getRecipeInfo(IGrinderEntry recipe) {
return getStackDescription(recipe.getOutput());
return getStackDescription(recipe.getInput());
}
}

View file

@ -1,9 +1,11 @@
package modtweaker2.mods.appeng.handlers;
import static modtweaker2.helpers.InputHelper.getStackDescription;
import static modtweaker2.helpers.InputHelper.toIngredient;
import static modtweaker2.helpers.InputHelper.toIItemStack;
import static modtweaker2.helpers.InputHelper.toStack;
import static modtweaker2.helpers.InputHelper.toStacks;
import static modtweaker2.helpers.StackHelper.matches;
import java.util.LinkedList;
@ -98,7 +100,7 @@ public class Inscriber {
LinkedList<IInscriberRecipe> result = new LinkedList<IInscriberRecipe>();
for(IInscriberRecipe entry : AEApi.instance().registries().inscriber().getRecipes()) {
if(entry != null && entry.getOutput() != null && output.contains(toIngredient(entry.getOutput()))) {
if(entry != null && entry.getOutput() != null && matches(output, toIItemStack(entry.getOutput()))) {
result.add(entry);
}
}