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

Sequence

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.util.sequence.Sequence;

Description

A sequence is a series of tasks that run after each other when the actor ticks.

For example, when a level ticks.

Members

Getter
Gets the context for this sequence.
script.zs
// Sequence<T,U>.context as SequenceContext<T, U>
mySequence.context

Return Type: SequenceContext<T, U>

context() as SequenceContext<T, U>
Gets the context for this sequence.

Returns: The context for this sequence.

script.zs
// Sequence<T,U>.context() as SequenceContext<T, U>;
mySequence.context();

Return Type: SequenceContext<T, U>

Getter
Checks if this sequence is complete.
script.zs
// Sequence<T,U>.isComplete as bool
mySequence.isComplete

Return Type: bool

isComplete() as bool
Checks if this sequence is complete.

Returns: true if complete, false otherwise.

script.zs
// Sequence<T,U>.isComplete() as bool;
mySequence.isComplete();

Return Type: bool

stop()
Stops this sequence, subsequent tasks will not be ran.
script.zs
// Sequence<T,U>.stop();
mySequence.stop();
Getter
Checks if this sequence is stopped or not.
script.zs
// Sequence<T,U>.stopped as bool
mySequence.stopped

Return Type: bool

stopped() as bool
Checks if this sequence is stopped or not.

Returns: true if stopped, false otherwise.

script.zs
// Sequence<T,U>.stopped() as bool;
mySequence.stopped();

Return Type: bool

tick()
Ticks this sequence.
script.zs
// Sequence<T,U>.tick();
mySequence.tick();