Package net.minecraftforge.fml
Record Class InterModComms.IMCMessage
java.lang.Object
java.lang.Record
net.minecraftforge.fml.InterModComms.IMCMessage
- Enclosing class:
- InterModComms
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIMCMessage(String senderModId, String modId, String method, Supplier<?> messageSupplier)Creates an instance of aIMCMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.<T> Supplier<T>Deprecated.Deprecated.getModId()Deprecated.Deprecated.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.toString()Returns a string representation of this record class.
-
Field Details
-
senderModId
The field for thesenderModIdrecord component. -
modId
The field for themodIdrecord component. -
method
The field for themethodrecord component. -
messageSupplier
The field for themessageSupplierrecord component.
-
-
Constructor Details
-
IMCMessage
Creates an instance of aIMCMessagerecord class.- Parameters:
senderModId- the value for thesenderModIdrecord componentmodId- the value for themodIdrecord componentmethod- the value for themethodrecord componentmessageSupplier- the value for themessageSupplierrecord component
-
-
Method Details
-
getSenderModId
Deprecated.Deprecated: usesenderModId()- Returns:
- The modid of the sender. This is supplied by the caller, or by the active mod container context. Consider it unreliable.
-
getModId
Deprecated.Deprecated: usemodId()- Returns:
- The modid being sent to.
-
getMethod
Deprecated.Deprecated: usemethod()- Returns:
- The method being sent to.
-
getMessageSupplier
Deprecated.- Type Parameters:
T- The type of the message.- Returns:
- A
Supplierof the message. UsemessageSupplier()
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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). -
senderModId
Returns the value of thesenderModIdrecord component.- Returns:
- the value of the
senderModIdrecord component
-
modId
Returns the value of themodIdrecord component.- Returns:
- the value of the
modIdrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
messageSupplier
Returns the value of themessageSupplierrecord component.- Returns:
- the value of the
messageSupplierrecord component
-