Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.halestormxv.mysterium.recipes;
- import com.halestormxv.mysterium.init.RecipeSerializerInit;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.crafting.IRecipeSerializer;
- import net.minecraft.item.crafting.Ingredient;
- import net.minecraft.util.NonNullList;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.world.World;
- import net.minecraftforge.items.wrapper.RecipeWrapper;
- public class LunarForgeRecipe implements ILunarForgeRecipe {
- protected final ResourceLocation id;
- protected final Ingredient input;
- protected final ItemStack output;
- protected final float xp;
- protected final int cookTime;
- public LunarForgeRecipe(ResourceLocation id, Ingredient input, ItemStack output, float xp, int cookTime) {
- this.id = id;
- this.output = output;
- this.input = input;
- this.xp = xp;
- this.cookTime = cookTime;
- }
- @Override
- public boolean matches(RecipeWrapper inv, World worldIn) {
- if (this.input.test(inv.getStackInSlot(0))) {
- return true;
- }
- return false;
- }
- @Override
- public ItemStack getCraftingResult(RecipeWrapper inv) {
- return this.output;
- }
- @Override
- public ItemStack getRecipeOutput() {
- return this.output;
- }
- @Override
- public ResourceLocation getId() {
- return this.id;
- }
- @Override
- public IRecipeSerializer<?> getSerializer() {
- return RecipeSerializerInit.LUNAR_FORGE_SERIALIZER.get();
- }
- @Override
- public Ingredient getInput() {
- return this.input;
- }
- @Override
- public NonNullList<Ingredient> getIngredients() {
- return NonNullList.from(null, this.input);
- }
- public float getXp(){
- return this.xp;
- }
- public int getCookTime(){
- return this.cookTime;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement