Class TaskImpl
java.lang.Object
com.refinedmods.refinedstorage.api.autocrafting.task.TaskImpl
- All Implemented Interfaces:
Task
,ResourceListListener
,RootStorageListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
afterInsert
(ResourceKey insertedResource, long insertedAmount) Called after a resource has been inserted into theRootStorage
.long
beforeInsert
(ResourceKey insertedResource, long insertedAmount) Called before a resource is inserted into theRootStorage
.void
cancel()
void
Called when a list operation has occurred.getActor()
long
getId()
getState()
boolean
boolean
step
(RootStorage rootStorage, ExternalPatternSinkProvider sinkProvider, StepBehavior stepBehavior, TaskListener listener)
-
Constructor Details
-
TaskImpl
-
TaskImpl
-
-
Method Details
-
getActor
-
shouldNotify
public boolean shouldNotify()- Specified by:
shouldNotify
in interfaceTask
-
getResource
- Specified by:
getResource
in interfaceTask
-
getAmount
public long getAmount() -
getId
-
getState
-
step
public boolean step(RootStorage rootStorage, ExternalPatternSinkProvider sinkProvider, StepBehavior stepBehavior, TaskListener listener) -
cancel
public void cancel() -
getStatus
-
createSnapshot
-
beforeInsert
Description copied from interface:RootStorageListener
Called before a resource is inserted into theRootStorage
. Use this to intercept resources before they get inserted.- Specified by:
beforeInsert
in interfaceRootStorageListener
- Parameters:
insertedResource
- the resourceinsertedAmount
- the amount- Returns:
- the amount intercepted that will not be passed to other before insert listeners and the storage
-
afterInsert
Description copied from interface:RootStorageListener
Called after a resource has been inserted into theRootStorage
. Use this to detect when something has been inserted.- Specified by:
afterInsert
in interfaceRootStorageListener
- Parameters:
insertedResource
- the resourceinsertedAmount
- the amount- Returns:
- the amount reserved that will not be passed to other after insert listeners
-
changed
Description copied from interface:ResourceListListener
Called when a list operation has occurred.- Specified by:
changed
in interfaceResourceListListener
- Parameters:
change
- the change
-