Class ExplosionCraftingRecipe

java.lang.Object
me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
me.desht.pneumaticcraft.api.crafting.recipe.ExplosionCraftingRecipe
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<PneumaticCraftRecipe.DummyIInventory>
Direct Known Subclasses:
ExplosionCraftingRecipeImpl

public abstract class ExplosionCraftingRecipe extends PneumaticCraftRecipe
  • Constructor Details

    • ExplosionCraftingRecipe

      protected ExplosionCraftingRecipe(net.minecraft.resources.ResourceLocation id)
  • Method Details

    • getInput

      public abstract net.minecraft.world.item.crafting.Ingredient getInput()
      Get the input ingredient for this recipe.
      Returns:
      the input ingredient
    • getAmount

      public abstract int getAmount()
      Get the number of items which will be taken from the input to create the output item.

      This should be the number of items in any itemstack returned from getInput().getMatchedStacks(); for basic Ingredient ingredients, this will always be 1, but custom ingredient subclasses could return a large number.

      Returns:
      the number of items
    • getOutputs

      public abstract List<net.minecraft.world.item.ItemStack> getOutputs()
      Get a list of the output item(s).
      Returns:
      the outputs
    • getLossRate

      public abstract int getLossRate()
      Get the recipe loss rate, as a percentage.
      Returns:
      the loss rate
    • matches

      public abstract boolean matches(net.minecraft.world.item.ItemStack stack)
      Check if the given itemstack matches this recipe. The stack's item should match, and additionally there should be at least getAmount() items in the stack.
      Parameters:
      stack - the itemstack to check
      Returns:
      true if this itemstack matches this recipe, false otherwise