Context
class Context @JvmOverloads constructor(val recipe: CRecipe, val relation: MappedRelation, val mapped: Map<CoordinateComponent, ItemStack>, val shiftClicked: Boolean, val calledTimes: Int, val crafterId: UUID, val callMode: ResultSupplier.Context.CallMode, val asyncContext: AsyncContext? = null)
This class contains ResultSupplier parameters.
Parameters
recipe
A CRecipe instance what contains this
crafter Id
Crafter UUID
relation
Coordinate mapping between a CRecipe and an input Inventory
mapped
Coordinates and input items mapping
shift Clicked
Shift-clicked or not
called Times
Calculated minimum amount with CMatter.amount
call Mode
Indicates whether this invocation is a real craft or an icon generation for display (since 5.0.21)
async Context
Async context (since 5.0.20). When non-null, supply implementations should periodically check AsyncContext.isInterrupted and return early if true.
Constructors
Link copied to clipboard
constructor(recipe: CRecipe, relation: MappedRelation, mapped: Map<CoordinateComponent, ItemStack>, shiftClicked: Boolean, calledTimes: Int, crafterId: UUID, callMode: ResultSupplier.Context.CallMode, asyncContext: AsyncContext? = null)
Types
Link copied to clipboard
Indicates the purpose of a supply invocation.