类 InterModComms
java.lang.Object
net.minecraftforge.fml.InterModComms
-
嵌套类概要
嵌套类修饰符和类型类说明static final record
private static final record
-
字段概要
字段修饰符和类型字段说明private static final ConcurrentMap
<String, ConcurrentLinkedQueue<InterModComms.IMCMessage>> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static 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 boolean
Send IMC to remote.static boolean
Send IMC to remote.
-
字段详细资料
-
containerQueues
private static final ConcurrentMap<String,ConcurrentLinkedQueue<InterModComms.IMCMessage>> containerQueues
-
-
构造器详细资料
-
InterModComms
public InterModComms()
-
-
方法详细资料
-
sendTo
Send IMC to remote. Sender will default to the active modcontainer, or minecraft if not.- 参数:
modId
- the mod id to send tomethod
- the method name to sendthing
- the thing associated with the method name- 返回:
- true if the message was enqueued for sending (the target modid is loaded)
-
sendTo
Send IMC to remote.- 参数:
senderModId
- the mod id you are sending frommodId
- the mod id to send tomethod
- the method name to sendthing
- the thing associated with the method name- 返回:
- true if the message was enqueued for sending (the target modid is loaded)
-
getMessages
public static Stream<InterModComms.IMCMessage> getMessages(String modId, Predicate<String> methodMatcher) Retrieve pending messages for your modid. Use the predicate to filter the method name.- 参数:
modId
- the modid you are querying formethodMatcher
- a predicate for the method you are interested in- 返回:
- All messages passing the supplied method predicate
-
getMessages
Retrieve all message for your modid.- 参数:
modId
- the modid you are querying for- 返回:
- All messages
-