This closes #17 and closes #58, I tested and it worked using the script given

Also changes like all packages
inb4 "jared changes a package name in ModTweaker2 breaking compatability
with everything" drama tweet.
This commit is contained in:
jaredlll08 committed 2015-02-20 23:57:32 +02:00
1 parent 4fd2551072
commit ec562b62ea
187 files changed
+977 -991

No files matched your search

@@ -0,0 +1,56 @@
package modtweaker2.mods.fsp.handlers;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
import modtweaker2.util.BaseMapAddition;
import modtweaker2.util.BaseMapRemoval;
import net.minecraft.item.ItemStack;
import org.apache.commons.lang3.tuple.MutablePair;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import flaxbeard.steamcraft.api.SteamcraftRegistry;
import static modtweaker2.helpers.InputHelper.*;
import static modtweaker2.helpers.StackHelper.*;
@ZenClass("mods.fsp.Furnace")
public class Furnace {
@ZenMethod
public static void addSteamFood(IItemStack input, IItemStack output) {
MineTweakerAPI.apply(new AddSteamFood(toStack(input), MutablePair.of(toStack(input).getItem(), toStack(input).getItemDamage()), MutablePair.of(toStack(output).getItem(), toStack(output).getItemDamage())));
}
private static class AddSteamFood extends BaseMapAddition {
private final ItemStack stack;
public AddSteamFood(ItemStack stack, MutablePair key, MutablePair recipe) {
super("FSP Furnace - Steam Food", SteamcraftRegistry.steamedFoods, key, recipe);
this.stack = stack;
}
@Override
public String getRecipeInfo() {
return stack.getDisplayName();
}
}
@ZenMethod
public static void removeSteamFood(IItemStack input) {
MineTweakerAPI.apply(new RemoveSteamFood(toStack(input), MutablePair.of(toStack(input).getItem(), toStack(input).getItemDamage())));
}
private static class RemoveSteamFood extends BaseMapRemoval {
private final ItemStack stack;
public RemoveSteamFood(ItemStack stack, MutablePair key) {
super("FSP Furnace - Steam Food", SteamcraftRegistry.steamedFoods, key);
this.stack = stack;
}
@Override
public String getRecipeInfo() {
return stack.getDisplayName();
}
}
}