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 TypeMethodDescriptionlongafterInsert(ResourceKey insertedResource, long insertedAmount) Called after a resource has been inserted into theRootStorage.longbeforeInsert(ResourceKey insertedResource, long insertedAmount) Called before a resource is inserted into theRootStorage.voidcancel()voidCalled when a list operation has occurred.getActor()longgetId()getState()booleanbooleanstep(RootStorage rootStorage, ExternalPatternSinkProvider sinkProvider, StepBehavior stepBehavior, TaskListener listener)
-
Constructor Details
-
TaskImpl
-
TaskImpl
-
-
Method Details
-
getActor
-
shouldNotify
public boolean shouldNotify()- Specified by:
shouldNotifyin interfaceTask
-
getResource
- Specified by:
getResourcein 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:RootStorageListenerCalled before a resource is inserted into theRootStorage. Use this to intercept resources before they get inserted.- Specified by:
beforeInsertin 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:RootStorageListenerCalled after a resource has been inserted into theRootStorage. Use this to detect when something has been inserted.- Specified by:
afterInsertin 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:ResourceListListenerCalled when a list operation has occurred.- Specified by:
changedin interfaceResourceListListener- Parameters:
change- the change
-