Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ExkvaRecipeData {
- static class RecipeIn {
- private ItemStack[] in;
- RecipeIn(ItemStack[] input) {
- this.in = input.clone();
- }
- }
- static class RecipeOut {
- private Item out;
- private int amt;
- RecipeOut(Item item, int quantity) {
- this.out = item;
- this.amt = quantity;
- }
- public Item getOut() { return out; }
- public int getAmt() { return amt; }
- }
- protected static Map<RecipeIn, RecipeOut> recipes = new HashMap<RecipeIn, RecipeOut>();
- public static void registerRecipe(ItemStack[] input, Item output, int quantity) {
- recipes.put(new RecipeIn(input), new RecipeOut(output, quantity));
- }
- public static ItemStack getOutput(RecipeIn in) {
- RecipeOut result = recipes.get(in);
- return new ItemStack(result.getOut(), result.getAmt());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement