Package net.minecraftforge.network
Record Class SimpleChannel.SimpleContext<BUF extends FriendlyByteBuf,BASE> 
java.lang.Object
java.lang.Record
net.minecraftforge.network.SimpleChannel.SimpleContext<BUF,BASE> 
- Enclosing class:
- SimpleChannel
private static record SimpleChannel.SimpleContext<BUF extends FriendlyByteBuf,BASE> (SimpleChannel channel, @Nullable NetworkProtocol<BUF extends FriendlyByteBuf> protocol, @Nullable PacketFlow flow)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final SimpleChannelThe field for thechannelrecord component.private final @Nullable PacketFlowThe field for theflowrecord component.private final @Nullable NetworkProtocol<BUF> The field for theprotocolrecord component.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionSimpleContext(SimpleChannel channel) privateSimpleContext(SimpleChannel channel, @Nullable NetworkProtocol<BUF> protocol, @Nullable PacketFlow flow) Creates an instance of aSimpleContextrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable PacketFlowflow()Returns the value of theflowrecord component.private SimpleChannel.SimpleContext<BUF, BASE> flow(@Nullable PacketFlow flow) final inthashCode()Returns a hash code value for this object.@Nullable NetworkProtocol<BUF> protocol()Returns the value of theprotocolrecord component.<NEWBUF extends FriendlyByteBuf>
 SimpleChannel.SimpleContext<NEWBUF, BASE> protocol(NetworkProtocol<NEWBUF> protocol) final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
channelThe field for thechannelrecord component.
- 
protocolThe field for theprotocolrecord component.
- 
flowThe field for theflowrecord component.
 
- 
- 
Constructor Details- 
SimpleContext
- 
SimpleContextprivate SimpleContext(SimpleChannel channel, @Nullable @Nullable NetworkProtocol<BUF> protocol, @Nullable @Nullable PacketFlow flow) Creates an instance of aSimpleContextrecord class.- Parameters:
- channel- the value for the- channelrecord component
- protocol- the value for the- protocolrecord component
- flow- the value for the- flowrecord component
 
 
- 
- 
Method Details- 
protocolpublic <NEWBUF extends FriendlyByteBuf> SimpleChannel.SimpleContext<NEWBUF,BASE> protocol(NetworkProtocol<NEWBUF> protocol) 
- 
flow
- 
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).
- 
channelReturns the value of thechannelrecord component.- Returns:
- the value of the channelrecord component
 
- 
protocolReturns the value of theprotocolrecord component.- Returns:
- the value of the protocolrecord component
 
- 
flowReturns the value of theflowrecord component.- Returns:
- the value of the flowrecord component
 
 
-