mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Track the active mod within DeferredWorkQueue (#7973)
This commit is contained in:
1 parent
ce13efbac9
commit
892c3669e0
4 files changed
+15
-12
No files matched your search
+2
-2
@@ -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!"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user