Class InterModComms.IMCMessage

  • Enclosing class:
    InterModComms

    public static final class InterModComms.IMCMessage
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String method  
      private java.lang.String modId  
      private java.lang.String senderModId  
      private java.util.function.Supplier<?> thing  
    • Constructor Summary

      Constructors 
      Constructor Description
      IMCMessage​(java.lang.String senderModId, java.lang.String modId, java.lang.String method, java.util.function.Supplier<?> thing)  
    • Field Detail

      • modId

        private final java.lang.String modId
      • method

        private final java.lang.String method
      • senderModId

        private final java.lang.String senderModId
      • thing

        private final java.util.function.Supplier<?> thing
    • Constructor Detail

      • IMCMessage

        IMCMessage​(java.lang.String senderModId,
                   java.lang.String modId,
                   java.lang.String method,
                   java.util.function.Supplier<?> thing)
    • Method Detail

      • getSenderModId

        public final java.lang.String getSenderModId()
        Returns:
        The modid of the sender. This is supplied by the caller, or by the active mod container context. Consider it unreliable.
      • getModId

        public final java.lang.String getModId()
        Returns:
        The modid being sent to.
      • getMethod

        public final java.lang.String getMethod()
        Returns:
        The method being sent to.
      • getMessageSupplier

        public final <T> java.util.function.Supplier<T> getMessageSupplier()
        Type Parameters:
        T - The type of the message.
        Returns:
        A Supplier of the message.