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
-
Nested Class Summary
Nested classes/interfaces inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
PneumaticCraftRecipe.DummyIInventory -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExplosionCraftingRecipe(net.minecraft.resources.ResourceLocation id) -
Method Summary
Modifier and TypeMethodDescriptionabstract intGet the number of items which will be taken from the input to create the output item.abstract net.minecraft.world.item.crafting.IngredientgetInput()Get the input ingredient for this recipe.abstract intGet the recipe loss rate, as a percentage.abstract List<net.minecraft.world.item.ItemStack>Get a list of the output item(s).abstract booleanmatches(net.minecraft.world.item.ItemStack stack) Check if the given itemstack matches this recipe.Methods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matches, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getSerializer, getToastSymbol, getType, isIncomplete
-
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 basicIngredientingredients, this will always be 1, but custom ingredient subclasses could return a large number.- Returns:
- the number of items
-
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 leastgetAmount()items in the stack.- Parameters:
stack- the itemstack to check- Returns:
- true if this itemstack matches this recipe, false otherwise
-