mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-24 22:24:30 +00:00
Also changes like all packages inb4 "jared changes a package name in ModTweaker2 breaking compatability with everything" drama tweet.
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user