MCPcopy Create free account
hub / github.com/Teneted/Tenet / sendTo

Method sendTo

src/main/java/net/minecraftforge/fml/InterModComms.java:92–96  ·  view source on GitHub ↗

Send IMC to remote. Sender will default to the active modcontainer, or minecraft if not. @param modId the mod id to send to @param method the method name to send @param thing the thing associated with the method name @return true if the message was enqueued for sending (the target modid is loaded)

(final String modId, final String method, final Supplier<?> thing)

Source from the content-addressed store, hash-verified

90 * @return true if the message was enqueued for sending (the target modid is loaded)
91 */
92 public static boolean sendTo(final String modId, final String method, final Supplier<?> thing) {
93 if (!ModList.get().isLoaded(modId)) return false;
94 containerQueues.computeIfAbsent(modId, k->new ConcurrentLinkedQueue<>()).add(new IMCMessage(ModLoadingContext.get().getActiveContainer().getModId(), modId, method, thing));
95 return true;
96 }
97
98 /**
99 * Send IMC to remote.

Callers

nothing calls this directly

Calls 6

getMethod · 0.95
getMethod · 0.95
getActiveContainerMethod · 0.80
isLoadedMethod · 0.65
addMethod · 0.65
getModIdMethod · 0.65

Tested by

no test coverage detected