Class SyncTasks
java.lang.Object
com.viaversion.viafabricplus.base.sync_tasks.SyncTasks
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis identifier is an internal identifier used to identify packets that are sent by ViaFabricPlus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringexecuteSyncTask(Consumer<net.minecraft.network.RegistryFriendlyByteBuf> task) Executes a task synchronized with the main thread from networking threadsstatic voidhandleSyncTask(net.minecraft.network.FriendlyByteBuf buf) Handles a sync task that was sent from the networking threadstatic voidinit()
-
Field Details
-
PACKET_SYNC_IDENTIFIER
This identifier is an internal identifier used to identify packets that are sent by ViaFabricPlus
-
-
Constructor Details
-
SyncTasks
public SyncTasks()
-
-
Method Details
-
init
public static void init() -
executeSyncTask
Executes a task synchronized with the main thread from networking threads- Parameters:
task- The task to execute- Returns:
- The uuid of the task
-
handleSyncTask
public static void handleSyncTask(net.minecraft.network.FriendlyByteBuf buf) Handles a sync task that was sent from the networking thread- Parameters:
buf- The packet buffer
-