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:
parent
c3c979f11a
commit
eefc4d3e84
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue