Fixed RemoveAll in CraftTweaker. Closes #1410
This commit is contained in:
parent
ca9508c381
commit
8e12543902
14 changed files with 65 additions and 12 deletions
|
@ -59,6 +59,11 @@ public class CTAlloySmelter extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.alloySmelterRecipe;
|
||||
|
|
|
@ -55,6 +55,11 @@ public class CTAssemblingMachine extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.assemblingMachineRecipe;
|
||||
|
|
|
@ -55,6 +55,11 @@ public class CTBlastFurnace extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.blastFurnaceRecipe;
|
||||
|
|
|
@ -55,6 +55,11 @@ public class CTCentrifuge extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.centrifugeRecipe;
|
||||
|
|
|
@ -55,6 +55,11 @@ public class CTChemicalReactor extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.chemicalReactorRecipe;
|
||||
|
|
|
@ -43,10 +43,7 @@ public class CTCompressor extends CTGeneric {
|
|||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output1, IIngredient input1, int ticktime, int euTick) {
|
||||
ItemStack oInput1 = (ItemStack) CraftTweakerCompat.toObject(input1);
|
||||
|
||||
//public CompressorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
|
||||
CompressorRecipe r = new CompressorRecipe(oInput1, CraftTweakerCompat.toStack(output1), ticktime, euTick);
|
||||
|
||||
addRecipe(r);
|
||||
}
|
||||
|
||||
|
@ -59,6 +56,11 @@ public class CTCompressor extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.compressorRecipe;
|
||||
|
|
|
@ -59,6 +59,11 @@ public class CTDistillationTower extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.distillationTowerRecipe;
|
||||
|
|
|
@ -32,16 +32,12 @@ import net.minecraft.item.ItemStack;
|
|||
import reborncore.api.recipe.IBaseRecipeType;
|
||||
import reborncore.api.recipe.RecipeHandler;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CTGeneric {
|
||||
public static String getMachineName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void addRecipe(BaseRecipe recipe) {
|
||||
CraftTweakerAPI.apply(new Add(recipe));
|
||||
|
@ -147,9 +143,4 @@ public class CTGeneric {
|
|||
return "Removing all recipes from " + name;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,11 @@ public class CTGrinder extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.grinderRecipe;
|
||||
|
|
|
@ -56,6 +56,11 @@ public class CTImplosionCompressor extends CTGeneric {
|
|||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.implosionCompressorRecipe;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,11 @@ public class CTIndustrialElectrolyzer extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.industrialElectrolyzerRecipe;
|
||||
|
|
|
@ -100,6 +100,11 @@ public class CTIndustrialGrinder extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get reference machine name
|
||||
|
|
|
@ -76,6 +76,11 @@ public class CTIndustrialSawmill extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.industrialSawmillRecipe;
|
||||
|
|
|
@ -53,6 +53,11 @@ public class CTVacuumFreezer extends CTGeneric {
|
|||
public static void removeRecipe(IItemStack output) {
|
||||
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll(){
|
||||
CraftTweakerAPI.apply(new RemoveAll(getMachineName()));
|
||||
}
|
||||
|
||||
public static String getMachineName() {
|
||||
return Reference.vacuumFreezerRecipe;
|
||||
|
|
Loading…
Reference in a new issue