Record Class ForgeNetworkHandler.Message<T>
java.lang.Object
java.lang.Record
commonnetwork.networking.ForgeNetworkHandler.Message<T>
- Enclosing class:
ForgeNetworkHandler
public static record ForgeNetworkHandler.Message<T>(net.minecraftforge.network.Channel<net.minecraft.network.protocol.common.custom.CustomPacketPayload> channel, PacketContainer<T> container)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMessage(net.minecraftforge.network.Channel<net.minecraft.network.protocol.common.custom.CustomPacketPayload> channel, PacketContainer<T> container) Creates an instance of aMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraftforge.network.Channel<net.minecraft.network.protocol.common.custom.CustomPacketPayload> channel()Returns the value of thechannelrecord component.Returns the value of thecontainerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Message
public Message(net.minecraftforge.network.Channel<net.minecraft.network.protocol.common.custom.CustomPacketPayload> channel, PacketContainer<T> container) Creates an instance of aMessagerecord class.- Parameters:
channel- the value for thechannelrecord componentcontainer- the value for thecontainerrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
channel
public net.minecraftforge.network.Channel<net.minecraft.network.protocol.common.custom.CustomPacketPayload> channel()Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
container
Returns the value of thecontainerrecord component.- Returns:
- the value of the
containerrecord component
-