Package net.minecraftforge.fml
Class InterModComms
java.lang.Object
net.minecraftforge.fml.InterModComms
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final recordprivate static class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static ConcurrentMap<String, ConcurrentLinkedQueue<InterModComms.IMCMessage>> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Stream<InterModComms.IMCMessage> getMessages(String modId) Retrieve all message for your modid.static Stream<InterModComms.IMCMessage> getMessages(String modId, Predicate<String> methodMatcher) Retrieve pending messages for your modid.static booleanSend IMC to remote.static booleanSend IMC to remote.
- 
Field Details- 
containerQueuesprivate static ConcurrentMap<String,ConcurrentLinkedQueue<InterModComms.IMCMessage>> containerQueues
 
- 
- 
Constructor Details- 
InterModCommspublic InterModComms()
 
- 
- 
Method Details- 
sendToSend IMC to remote. Sender will default to the active modcontainer, or minecraft if not.- Parameters:
- modId- the mod id to send to
- method- the method name to send
- thing- the thing associated with the method name
- Returns:
- true if the message was enqueued for sending (the target modid is loaded)
 
- 
sendToSend IMC to remote.- Parameters:
- senderModId- the mod id you are sending from
- modId- the mod id to send to
- method- the method name to send
- thing- the thing associated with the method name
- Returns:
- true if the message was enqueued for sending (the target modid is loaded)
 
- 
getMessagespublic static Stream<InterModComms.IMCMessage> getMessages(String modId, Predicate<String> methodMatcher) Retrieve pending messages for your modid. Use the predicate to filter the method name.- Parameters:
- modId- the modid you are querying for
- methodMatcher- a predicate for the method you are interested in
- Returns:
- All messages passing the supplied method predicate
 
- 
getMessagesRetrieve all message for your modid.- Parameters:
- modId- the modid you are querying for
- Returns:
- All messages
 
 
-