2018-11-11 13:26:19 +01:00
|
|
|
package de.ellpeck.naturesaura.api.recipes;
|
2018-10-16 01:36:30 +02:00
|
|
|
|
2018-11-11 13:26:19 +01:00
|
|
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
2018-10-16 01:36:30 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2018-10-22 00:14:52 +02:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2018-10-16 01:36:30 +02:00
|
|
|
|
|
|
|
public class TreeRitualRecipe {
|
|
|
|
|
2018-10-22 00:14:52 +02:00
|
|
|
public final ResourceLocation name;
|
2018-10-16 01:36:30 +02:00
|
|
|
public final ItemStack saplingType;
|
|
|
|
public final ItemStack[] items;
|
|
|
|
public final ItemStack result;
|
|
|
|
public final int time;
|
|
|
|
|
2018-10-22 00:14:52 +02:00
|
|
|
public TreeRitualRecipe(ResourceLocation name, ItemStack saplingType, ItemStack result, int time, ItemStack... items) {
|
|
|
|
this.name = name;
|
2018-10-16 01:36:30 +02:00
|
|
|
this.saplingType = saplingType;
|
|
|
|
this.items = items;
|
|
|
|
this.result = result;
|
|
|
|
this.time = time;
|
2018-11-11 16:50:51 +01:00
|
|
|
}
|
2018-10-16 01:36:30 +02:00
|
|
|
|
2018-11-19 21:55:00 +01:00
|
|
|
public boolean matches(ItemStack expected, ItemStack found) {
|
|
|
|
return ItemStack.areItemsEqual(expected, found) && ItemStack.areItemStackShareTagsEqual(expected, found);
|
|
|
|
}
|
|
|
|
|
2018-11-11 16:50:51 +01:00
|
|
|
public TreeRitualRecipe register() {
|
2018-11-11 13:26:19 +01:00
|
|
|
NaturesAuraAPI.TREE_RITUAL_RECIPES.put(this.name, this);
|
2018-11-11 16:50:51 +01:00
|
|
|
return this;
|
2018-10-16 01:36:30 +02:00
|
|
|
}
|
|
|
|
}
|