mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-12 00:07:57 +00:00
Finally!
This commit is contained in:
1 parent
78d97bd885
commit
504f150711
4 files changed
+14
-6
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package modtweaker2.mods.tfcraft.handlers;
|
||||
|
||||
import static modtweaker2.helpers.StackHelper.areEqual;
|
||||
import static modtweaker2.helpers.InputHelper.toStack;
|
||||
import static com.bioxx.tfc.api.Crafting.AnvilReq.getReqFromInt;
|
||||
|
||||
@@ -66,7 +67,7 @@ public class Anvil {
|
||||
public void apply() {
|
||||
ArrayList<AnvilRecipe> toRemove = new ArrayList<AnvilRecipe>();
|
||||
for (AnvilRecipe recipe : AnvilManager.getInstance().getRecipeList()){
|
||||
if (recipe.getCraftingResult() != null && recipe.getCraftingResult() == stack){
|
||||
if (recipe.getCraftingResult() != null && areEqual(recipe.getCraftingResult(), stack)){
|
||||
toRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package modtweaker2.mods.tfcraft.handlers;
|
||||
|
||||
import static modtweaker2.helpers.InputHelper.toFluid;
|
||||
import static modtweaker2.helpers.InputHelper.toStack;
|
||||
import static modtweaker2.helpers.StackHelper.areEqual;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -81,12 +82,12 @@ public class Barrel {
|
||||
public void apply() {
|
||||
ArrayList<BarrelRecipe> toRemove = new ArrayList<BarrelRecipe>();
|
||||
for (BarrelRecipe recipe : BarrelManager.getInstance().getRecipes()){
|
||||
if (recipe.getRecipeOutIS() != null && recipe.getRecipeOutIS() == stack){
|
||||
if (recipe.getRecipeOutIS() != null && areEqual(recipe.getRecipeOutIS(), stack)){
|
||||
toRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
for (BarrelRecipe recipe : BarrelManager.getInstance().getRecipes()){
|
||||
if (recipe.getRecipeOutFluid() != null && recipe.getRecipeOutFluid() == fluid){
|
||||
if (recipe.getRecipeOutFluid() != null && recipe.getRecipeOutFluid().isFluidEqual(fluid)){
|
||||
toRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package modtweaker2.mods.tfcraft.handlers;
|
||||
|
||||
import static modtweaker2.helpers.InputHelper.toStack;
|
||||
import static modtweaker2.helpers.StackHelper.areEqual;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -19,11 +20,15 @@ import com.bioxx.tfc.api.Crafting.KilnRecipe;
|
||||
@ZenClass("mods.tfcraft.Kiln")
|
||||
public class Kiln {
|
||||
|
||||
/** Deprecated, since pottery kiln will check <code>x instanceof ItemPotteryBase</code>
|
||||
* <p>If you have a such item, you might consider to use it
|
||||
*/
|
||||
@Deprecated
|
||||
@ZenMethod
|
||||
public static void add(IItemStack input, int lv, IItemStack output){
|
||||
MineTweakerAPI.apply(new AddRecipe(new KilnRecipe(toStack(input), lv, toStack(output))));
|
||||
}
|
||||
|
||||
|
||||
@ZenMethod
|
||||
public static void remove(IItemStack stack){
|
||||
MineTweakerAPI.apply(new RemoveRecipe(toStack(stack)));
|
||||
@@ -44,7 +49,7 @@ public class Kiln {
|
||||
public void apply() {
|
||||
ArrayList<KilnRecipe> toRemove = new ArrayList<KilnRecipe>();
|
||||
for (KilnRecipe recipe : KilnCraftingManager.getInstance().getRecipeList()){
|
||||
if (recipe.getCraftingResult() != null && recipe.getCraftingResult() == stack){
|
||||
if (recipe.getCraftingResult() != null && areEqual(recipe.getCraftingResult(), stack)){
|
||||
toRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package modtweaker2.mods.tfcraft.handlers;
|
||||
|
||||
import static modtweaker2.helpers.InputHelper.toStack;
|
||||
import static modtweaker2.helpers.StackHelper.areEqual;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -45,7 +46,7 @@ public class Quern {
|
||||
public void apply() {
|
||||
ArrayList<QuernRecipe> toRemove = new ArrayList<QuernRecipe>();
|
||||
for (QuernRecipe recipe : QuernManager.getInstance().getRecipes()){
|
||||
if (recipe.getResult() !=null && recipe.getResult() == stack){
|
||||
if (recipe.getResult() !=null && areEqual(recipe.getResult(), stack)){
|
||||
toRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user