Package net.minecraft.util
Class PendingTaskRunner
java.lang.Object
net.minecraft.util.PendingTaskRunner
A runner for tasks that have a running state and can hold one pending task.
If there is no running tasks, calling run(java.lang.Runnable) will run the passed task
and marks the runner as running. During this state, calling the run method will set
the task as pending. If called multiple times, only the last task will be called.
Calling runPending() forces it to run the pending task, if any.
- Mappings:
Namespace Name official rgintermediary net/minecraft/class_7493named net/minecraft/util/PendingTaskRunner
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns the task and marks the runner as running if there is no running task, otherwise sets the task as the pending task.voidRuns the pending task, if any, and marks the runner as not running.
-
Field Details
-
running
private boolean running- Mappings:
Namespace Name Mixin selector official aLrg;a:Zintermediary field_39385Lnet/minecraft/class_7493;field_39385:Znamed runningLnet/minecraft/util/PendingTaskRunner;running:Z
-
pending
- Mappings:
Namespace Name Mixin selector official bLrg;b:Ljava/lang/Runnable;intermediary field_39386Lnet/minecraft/class_7493;field_39386:Ljava/lang/Runnable;named pendingLnet/minecraft/util/PendingTaskRunner;pending:Ljava/lang/Runnable;
-
-
Constructor Details
-
PendingTaskRunner
public PendingTaskRunner()
-
-
Method Details
-
runPending
public void runPending()Runs the pending task, if any, and marks the runner as not running.- Mappings:
Namespace Name Mixin selector official aLrg;a()Vintermediary method_44122Lnet/minecraft/class_7493;method_44122()Vnamed runPendingLnet/minecraft/util/PendingTaskRunner;runPending()V
-
run
Runs the task and marks the runner as running if there is no running task, otherwise sets the task as the pending task. This overwrites the old pending task.- Mappings:
Namespace Name Mixin selector official aLrg;a(Ljava/lang/Runnable;)Vintermediary method_44123Lnet/minecraft/class_7493;method_44123(Ljava/lang/Runnable;)Vnamed runLnet/minecraft/util/PendingTaskRunner;run(Ljava/lang/Runnable;)V
-