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
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output)));
public static void removeRecipe(IIngredient output) {
for(IItemStack itemStack : output.getItems()){
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(itemStack)));
}
}
private static class Remove implements IUndoableAction {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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