Track the active mod within DeferredWorkQueue (#7973)

This commit is contained in:
Jonathan Coates authored and GitHub committed 2021-08-18 12:46:33 -07:00
1 parent ce13efbac9
commit 892c3669e0
4 files changed
+15 -12

No files matched your search

@@ -40,10 +40,10 @@ public class ParallelDispatchEvent extends ModLifecycleEvent {
}
public CompletableFuture<Void> enqueueWork(Runnable work) {
return getQueue().map(q->q.enqueueWork(getContainer().getModInfo(), work)).orElseThrow(()->new RuntimeException("No work queue found!"));
return getQueue().map(q->q.enqueueWork(getContainer(), work)).orElseThrow(()->new RuntimeException("No work queue found!"));
}
public <T> CompletableFuture<T> enqueueWork(Supplier<T> work) {
return getQueue().map(q->q.enqueueWork(getContainer().getModInfo(), work)).orElseThrow(()->new RuntimeException("No work queue found!"));
return getQueue().map(q->q.enqueueWork(getContainer(), work)).orElseThrow(()->new RuntimeException("No work queue found!"));
}
}