Sequence<T : Object, U : Object>

Link to sequencet--object-u--object

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

For example, when a level ticks.

Импорт класса

Link to импорт-класса

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.util.sequence.Sequence;

Name: getContext

Gets the context for this sequence.

Returns: The context for this sequence.
Return Type: SequenceContext<T,U>

ZenScript
Copy
// Sequence.getContext() as SequenceContext<T,U>

mySequence.getContext();

Name: isComplete

Checks if this sequence is complete.

Returns: true if complete, false otherwise.
Return Type: boolean

ZenScript
Copy
// Sequence.isComplete() as boolean

mySequence.isComplete();

Name: isStopped

Checks if this sequence is stopped or not.

Returns: true if stopped, false otherwise.
Return Type: boolean

ZenScript
Copy
// Sequence.isStopped() as boolean

mySequence.isStopped();

Name: stop

Stops this sequence, subsequent tasks will not be ran.

ZenScript
Copy
// Sequence.stop()

mySequence.stop();

Name: tick

Ticks this sequence.

ZenScript
Copy
// Sequence.tick()

mySequence.tick();

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
контекст
Тип
SequenceContext<T,U>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the context for this sequence.
Название
isComplete
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
Checks if this sequence is complete.
Название
stopped
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
Checks if this sequence is stopped or not.