Class ResultSupplier.Context
-
- All Implemented Interfaces:
public final class ResultSupplier.ContextThis class contains ResultSupplier parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumResultSupplier.Context.CallModeIndicates the purpose of a supply invocation.
-
Field Summary
Fields Modifier and Type Field Description private final CReciperecipeprivate final MappedRelationrelationprivate final Map<CoordinateComponent, ItemStack>mappedprivate final BooleanshiftClickedprivate final IntegercalledTimesprivate final UUIDcrafterIdprivate final ResultSupplier.Context.CallModecallModeprivate final AsyncContextasyncContext
-
Constructor Summary
Constructors Constructor Description ResultSupplier.Context(CRecipe recipe, MappedRelation relation, Map<CoordinateComponent, ItemStack> mapped, Boolean shiftClicked, Integer calledTimes, UUID crafterId, ResultSupplier.Context.CallMode callMode, AsyncContext asyncContext)ResultSupplier.Context(CRecipe recipe, MappedRelation relation, Map<CoordinateComponent, ItemStack> mapped, Boolean shiftClicked, Integer calledTimes, UUID crafterId, ResultSupplier.Context.CallMode callMode)
-
Method Summary
Modifier and Type Method Description final CRecipegetRecipe()final MappedRelationgetRelation()final Map<CoordinateComponent, ItemStack>getMapped()final BooleangetShiftClicked()final IntegergetCalledTimes()final UUIDgetCrafterId()final ResultSupplier.Context.CallModegetCallMode()final AsyncContextgetAsyncContext()final ResultSupplier.ContextcopyWith(AsyncContext asyncContext)Copy with a given parameter. final ResultSupplier.ContexttoAsync()If no async context exists, returns a newly added one. final BooleanisAsync()Returns whether this inspection is async. -
-
Constructor Detail
-
ResultSupplier.Context
ResultSupplier.Context(CRecipe recipe, MappedRelation relation, Map<CoordinateComponent, ItemStack> mapped, Boolean shiftClicked, Integer calledTimes, UUID crafterId, ResultSupplier.Context.CallMode callMode, AsyncContext asyncContext)
- Parameters:
recipe- A CRecipe instance what contains thisrelation- Coordinate mapping between a CRecipe and an input Inventorymapped- Coordinates and input items mappingshiftClicked- Shift-clicked or notcalledTimes- Calculated minimum amount with CMatter.amountcrafterId- Crafter UUIDcallMode- Indicates whether this invocation is a real craft or an icon generation for display (since 5.0.asyncContext- Async context (since 5.0.20).
-
ResultSupplier.Context
ResultSupplier.Context(CRecipe recipe, MappedRelation relation, Map<CoordinateComponent, ItemStack> mapped, Boolean shiftClicked, Integer calledTimes, UUID crafterId, ResultSupplier.Context.CallMode callMode)
- Parameters:
recipe- A CRecipe instance what contains thisrelation- Coordinate mapping between a CRecipe and an input Inventorymapped- Coordinates and input items mappingshiftClicked- Shift-clicked or notcalledTimes- Calculated minimum amount with CMatter.amountcrafterId- Crafter UUIDcallMode- Indicates whether this invocation is a real craft or an icon generation for display (since 5.0.
-
-
Method Detail
-
getRelation
final MappedRelation getRelation()
-
getMapped
final Map<CoordinateComponent, ItemStack> getMapped()
-
getShiftClicked
final Boolean getShiftClicked()
-
getCalledTimes
final Integer getCalledTimes()
-
getCrafterId
final UUID getCrafterId()
-
getCallMode
final ResultSupplier.Context.CallMode getCallMode()
-
getAsyncContext
final AsyncContext getAsyncContext()
-
copyWith
final ResultSupplier.Context copyWith(AsyncContext asyncContext)
Copy with a given parameter.
- Parameters:
asyncContext- Async states context- Returns:
ResultSupplier.Context Changes applied context
- Since:
5.0.20
-
toAsync
final ResultSupplier.Context toAsync()
If no async context exists, returns a newly added one.
- Returns:
ResultSupplier.Context Modified context
- Since:
5.0.20
-
-
-
-