Fixes #219 Potentialy breaking for MT scripts.

This commit is contained in:
Modmuss50 2015-11-11 08:21:21 +00:00
parent a8bcb76db6
commit f326dbfec9
10 changed files with 44 additions and 22 deletions

View file

@ -73,8 +73,10 @@ public class MTAlloySmelter {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -68,8 +68,10 @@ public class MTAssemblingMachine {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -67,8 +67,10 @@ public class MTBlastFurnace {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -67,13 +67,17 @@ public class MTCentrifuge {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
@ZenMethod @ZenMethod
public static void removeInputRecipe(IItemStack output) { public static void removeInputRecipe(IIngredient output) {
MineTweakerAPI.apply(new RemoveInput(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new RemoveInput(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class RemoveInput implements IUndoableAction { private static class RemoveInput implements IUndoableAction {

View file

@ -67,8 +67,10 @@ public class MTChemicalReactor {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -80,8 +80,10 @@ public class MTGrinder {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -68,8 +68,10 @@ public class MTImplosionCompressor {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -67,8 +67,10 @@ public class MTIndustrialElectrolyzer {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -91,8 +91,10 @@ public class MTIndustrialSawmill {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {

View file

@ -66,8 +66,10 @@ public class MTPlateCuttingMachine {
} }
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IIngredient output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output))); for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
} }
private static class Remove implements IUndoableAction { private static class Remove implements IUndoableAction {