public interface SmeltingRecipe extends Recipe, CatalogType
SmeltingRecipe.Builder
.Modifier and Type | Interface and Description |
---|---|
static interface |
SmeltingRecipe.Builder
Builds a simple furnace recipe.
|
Modifier and Type | Method and Description |
---|---|
static SmeltingRecipe.Builder |
builder()
Builds a simple furnace recipe.
|
ItemStackSnapshot |
getExemplaryIngredient()
|
default String |
getId()
Gets the unique identifier of this
CatalogType . |
default String |
getName()
Gets the human-readable name of this individual
CatalogType . |
Optional<SmeltingResult> |
getResult(ItemStackSnapshot ingredient)
Returns the
SmeltingResult containing the resulting
ItemStackSnapshot and the amount of experience released. |
boolean |
isValid(ItemStackSnapshot ingredient)
Checks if the given
ItemStackSnapshot fits the required
constraints to craft this SmeltingRecipe . |
getExemplaryResult
static SmeltingRecipe.Builder builder()
SmeltingRecipe
manually, too.SmeltingRecipe
builderdefault String getId()
CatalogType
CatalogType
. The identifier is
case insensitive, thus there cannot be another instance with a different
character case. The id of this instance must remain the same for the
entire duration of its existence. The identifier can be formatted however
needed.
A typical id format follows the pattern of `modId:name`
or `minecraft:name`
. However the prefix may be omitted for
default/vanilla minecraft types.
getId
in interface CatalogType
default String getName()
CatalogType
CatalogType
. This
name is not guaranteed to be unique. This value should not be used for
serialization.getName
in interface CatalogType
ItemStackSnapshot getExemplaryIngredient()
ItemStackSnapshot
as explained aboveboolean isValid(ItemStackSnapshot ingredient)
ItemStackSnapshot
fits the required
constraints to craft this SmeltingRecipe
.ingredient
- The ingredient to check againstOptional<SmeltingResult> getResult(ItemStackSnapshot ingredient)
Returns the SmeltingResult
containing the resulting
ItemStackSnapshot
and the amount of experience released.
This method should be used instead of the Recipe.getExemplaryResult()
method, as it customizes the result further depending on the specified
ingredient ItemStackSnapshot
. It is advised to use
the output of Recipe.getExemplaryResult()
, modify it accordingly,
and return
it.
ingredient
- The ItemStackSnapshot
currently being smeltedSmeltingResult
, or Optional.empty()
if the recipe is not valid according to
isValid(ItemStackSnapshot)
.