Constructor for the RecipeIngredient class
The type of the ingredient.
The stack size of the ingredient
The the ingredient item definition based on the type.
ReadonlydefinitionThe the ingredient item definition based on the type.
ReadonlystackThe stack size of the ingredient
ReadonlytypeThe type of the ingredient.
StaticreadRead a value from the stream.
The BinaryStream to read from.
The value read from the stream.
StaticreadReads an ingredient as it is written in item stack requests. Unlike recipes, the descriptor variant index is the descriptor type (empty, name, molang, item tag), followed by the legacy type byte and the payload, and the stack size is a uint16.
The stream to read from.
The ingredient.
StaticwriteWrite a value to the stream.
The BinaryStream to write to.
The value to write.
StaticwriteWrites an ingredient as it is written in item stack requests.
The stream to write to.
The ingredient to write.
Since v2168, an ingredient is a variant: index 0 is an empty descriptor, and index 1 is a named descriptor ("name", "molang" or "item_tag") followed by its payload. Items are referenced by name; the network id ("Default") and alias descriptors no longer exist on the wire. Name descriptors are read as
InternalType.Deferred.