Record Class ConfigurationPayloadContext
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.handling.ConfigurationPayloadContext
- Record Components:
 replyHandler- A reply handler that can be used to send a reply to the player.packetHandler- The packet handler that can be used to immediately process other packets.taskCompletedHandler- The task completed handler that can be used to indicate that a configuration task has been completed.workHandler- A work handler that can be used to schedule work to be done on the main thread.flow- The flow of the packet.channelHandlerContext- The channel handler context.player- The player of the payload.
- All Implemented Interfaces:
 IPayloadContext
public record ConfigurationPayloadContext(IReplyHandler replyHandler, IPacketHandler packetHandler, ITaskCompletedHandler taskCompletedHandler, ISynchronizedWorkHandler workHandler, PacketFlow flow, io.netty.channel.ChannelHandlerContext channelHandlerContext, Optional<Player> player)
extends Record
implements IPayloadContext
The context that is passed to a handler for a payload that arrives during the configuration phase of the connection.
- Implementation Note:
 - The 
player()will be filled with the current client side player if the payload was sent by the server, the server will only populate this field if it is not configuring the client. 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.netty.channel.ChannelHandlerContextThe field for thechannelHandlerContextrecord component.private final PacketFlowThe field for theflowrecord component.private final IPacketHandlerThe field for thepacketHandlerrecord component.The field for theplayerrecord component.private final IReplyHandlerThe field for thereplyHandlerrecord component.private final ITaskCompletedHandlerThe field for thetaskCompletedHandlerrecord component.private final ISynchronizedWorkHandlerThe field for theworkHandlerrecord component. - 
Constructor Summary
ConstructorsConstructorDescriptionConfigurationPayloadContext(IReplyHandler replyHandler, IPacketHandler packetHandler, ITaskCompletedHandler taskCompletedHandler, ISynchronizedWorkHandler workHandler, PacketFlow flow, io.netty.channel.ChannelHandlerContext channelHandlerContext, Optional<Player> player) Creates an instance of aConfigurationPayloadContextrecord class. - 
Method Summary
Modifier and TypeMethodDescriptionio.netty.channel.ChannelHandlerContextReturns the value of thechannelHandlerContextrecord component.final booleanIndicates whether some other object is "equal to" this one.flow()Returns the value of theflowrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepacketHandlerrecord component.player()Returns the value of theplayerrecord component.protocol()Returns the protocol of the connection.Returns the value of thereplyHandlerrecord component.Returns the value of thetaskCompletedHandlerrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkHandlerrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.network.handling.IPayloadContext
level 
- 
Field Details
- 
replyHandler
The field for thereplyHandlerrecord component. - 
packetHandler
The field for thepacketHandlerrecord component. - 
taskCompletedHandler
The field for thetaskCompletedHandlerrecord component. - 
workHandler
The field for theworkHandlerrecord component. - 
flow
The field for theflowrecord component. - 
channelHandlerContext
private final io.netty.channel.ChannelHandlerContext channelHandlerContextThe field for thechannelHandlerContextrecord component. - 
player
The field for theplayerrecord component. 
 - 
 - 
Constructor Details
- 
ConfigurationPayloadContext
public ConfigurationPayloadContext(IReplyHandler replyHandler, IPacketHandler packetHandler, ITaskCompletedHandler taskCompletedHandler, ISynchronizedWorkHandler workHandler, PacketFlow flow, io.netty.channel.ChannelHandlerContext channelHandlerContext, Optional<Player> player) Creates an instance of aConfigurationPayloadContextrecord class.- Parameters:
 replyHandler- the value for thereplyHandlerrecord componentpacketHandler- the value for thepacketHandlerrecord componenttaskCompletedHandler- the value for thetaskCompletedHandlerrecord componentworkHandler- the value for theworkHandlerrecord componentflow- the value for theflowrecord componentchannelHandlerContext- the value for thechannelHandlerContextrecord componentplayer- the value for theplayerrecord component
 
 - 
 - 
Method Details
- 
protocol
Description copied from interface:IPayloadContextReturns the protocol of the connection.- Specified by:
 protocolin interfaceIPayloadContext- Returns:
 - the protocol of the connection
 
 - 
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). - 
replyHandler
Returns the value of thereplyHandlerrecord component.- Specified by:
 replyHandlerin interfaceIPayloadContext- Returns:
 - the value of the 
replyHandlerrecord component 
 - 
packetHandler
Returns the value of thepacketHandlerrecord component.- Specified by:
 packetHandlerin interfaceIPayloadContext- Returns:
 - the value of the 
packetHandlerrecord component 
 - 
taskCompletedHandler
Returns the value of thetaskCompletedHandlerrecord component.- Returns:
 - the value of the 
taskCompletedHandlerrecord component 
 - 
workHandler
Returns the value of theworkHandlerrecord component.- Specified by:
 workHandlerin interfaceIPayloadContext- Returns:
 - the value of the 
workHandlerrecord component 
 - 
flow
Returns the value of theflowrecord component.- Specified by:
 flowin interfaceIPayloadContext- Returns:
 - the value of the 
flowrecord component 
 - 
channelHandlerContext
public io.netty.channel.ChannelHandlerContext channelHandlerContext()Returns the value of thechannelHandlerContextrecord component.- Specified by:
 channelHandlerContextin interfaceIPayloadContext- Returns:
 - the value of the 
channelHandlerContextrecord component 
 - 
player
Returns the value of theplayerrecord component.- Specified by:
 playerin interfaceIPayloadContext- Returns:
 - the value of the 
playerrecord component 
 
 -