mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Use the reply logical side when enqueing work
When receiving a packet, NetworkDirection.getLogicalSide details where the packet was the packet was sent from. Therefore, on a client it'll be SERVER (and vice virsa), and so the work is queued on the sever thread, instead of using Minecraft.
This commit is contained in:
1 parent
c3c979f11a
commit
eefc4d3e84
1 file changed
+1
-1
@@ -173,7 +173,7 @@ public class NetworkEvent extends Event
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <V> ListenableFuture<V> enqueueWork(Runnable runnable) {
|
||||
return (ListenableFuture<V>)LogicalSidedProvider.WORKQUEUE.<IThreadListener>get(getDirection().getLogicalSide()).addScheduledTask(runnable);
|
||||
return (ListenableFuture<V>)LogicalSidedProvider.WORKQUEUE.<IThreadListener>get(getDirection().reply().getLogicalSide()).addScheduledTask(runnable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user