Class endstone::RecipeIngredient¶
ClassList > endstone > RecipeIngredient
Represents a potential item match within a recipe. More...
#include <endstone/inventory/recipe_ingredient.h>
Inherits the following classes: endstone::Object
Inherited by the following classes: endstone::ComplexAliasIngredient, endstone::ExactIngredient, endstone::ItemTagIngredient, endstone::ItemTypeIngredient, endstone::MolangIngredient
Public Functions¶
| Type | Name |
|---|---|
| virtual int | getCount () const = 0 Get how many items this ingredient consumes. |
| virtual bool | test (const ItemStack & item) const = 0 |
| ~RecipeIngredient () override |
Public Functions inherited from endstone::Object¶
See endstone::Object
| Type | Name |
|---|---|
| T * | as () Attempts to cast this object to the given type T. |
| const T * | as () const Attempts to cast this object to the given type T. |
| virtual ClassInfo | getClassInfo () const = 0 |
| bool | is () const Checks if this object is an instance of the given type T (or a subclass of T). |
| virtual bool | isInstanceOf (ClassInfo target) const = 0 |
| virtual | ~Object () = default |
Detailed Description¶
All choices within a recipe must be satisfied for it to be craftable.
Public Functions Documentation¶
function getCount¶
Get how many items this ingredient consumes.
Bedrock records a count on each ingredient where Java repeats the ingredient instead.
Returns:
the number of items consumed
function test¶
function ~RecipeIngredient¶
The documentation for this class was generated from the following file include/endstone/inventory/recipe_ingredient.h