Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

InstantTask

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.sequence.task.type.InstantTask;

Description

A task that will run immediately.

Implements

InstantTask<T, U> implements the following interfaces:

ISequenceTask<T, U>

Constructors

new<T, U>(actorConsumer as function(t as T) as void)
script.zs
// new InstantTask<T,U>(actorConsumer as function(t as T) as void);
new InstantTask<T, U>(myConsumer);

Parameters:

actorConsumer Type: function(t as T) as void
new<T, U>(actorConsumer as BiConsumer<T, SequenceContext<T, U>>)
script.zs
// new InstantTask<T,U>(actorConsumer as BiConsumer<T, SequenceContext<T, U>>);
new InstantTask<T, U>(myBiConsumer);

Parameters:

actorConsumer Type: BiConsumer<T, SequenceContext<T, U>>

Members