Package net.minecraftforge.fml
Record Class InterModComms.IMCMessage
java.lang.Object
java.lang.Record
net.minecraftforge.fml.InterModComms.IMCMessage
- Enclosing class:
- InterModComms
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Supplier<?> The field for themessageSupplierrecord component.private final StringThe field for themethodrecord component.private final StringThe field for themodIdrecord component.private final StringThe field for thesenderModIdrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionIMCMessage(String senderModId, String modId, String method, Supplier<?> messageSupplier) Creates an instance of aIMCMessagerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final <T> Supplier<T> Deprecated.final StringDeprecated.final StringgetModId()Deprecated.final StringDeprecated.final inthashCode()Returns a hash code value for this object.Supplier<?> Returns the value of themessageSupplierrecord component.method()Returns the value of themethodrecord component.modId()Returns the value of themodIdrecord component.Returns the value of thesenderModIdrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
senderModIdThe field for thesenderModIdrecord component.
- 
modIdThe field for themodIdrecord component.
- 
methodThe field for themethodrecord component.
- 
messageSupplierThe field for themessageSupplierrecord component.
 
- 
- 
Constructor Details- 
IMCMessageCreates an instance of aIMCMessagerecord class.- Parameters:
- senderModId- the value for the- senderModIdrecord component
- modId- the value for the- modIdrecord component
- method- the value for the- methodrecord component
- messageSupplier- the value for the- messageSupplierrecord component
 
 
- 
- 
Method Details- 
getSenderModIdDeprecated.Deprecated: usesenderModId()- Returns:
- The modid of the sender. This is supplied by the caller, or by the active mod container context. Consider it unreliable.
 
- 
getModIdDeprecated.Deprecated: usemodId()- Returns:
- The modid being sent to.
 
- 
getMethodDeprecated.Deprecated: usemethod()- Returns:
- The method being sent to.
 
- 
getMessageSupplierDeprecated.- Type Parameters:
- T- The type of the message.
- Returns:
- A Supplierof the message. UsemessageSupplier()
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
senderModIdReturns the value of thesenderModIdrecord component.- Returns:
- the value of the senderModIdrecord component
 
- 
modIdReturns the value of themodIdrecord component.- Returns:
- the value of the modIdrecord component
 
- 
methodReturns the value of themethodrecord component.- Returns:
- the value of the methodrecord component
 
- 
messageSupplierReturns the value of themessageSupplierrecord component.- Returns:
- the value of the messageSupplierrecord component
 
 
-