Package net.minecraftforge.network
Record Class PayloadChannel.Builder.Protocol<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload> 
java.lang.Object
java.lang.Record
net.minecraftforge.network.PayloadChannel.Builder.Protocol<BUF,BASE> 
- All Implemented Interfaces:
- ChannelBuildable<CustomPacketPayload>,- PayloadConnection<BASE>,- PayloadProtocol<BUF,,- BASE> - PayloadChannel.Builder.ProtocolFactory<BUF,,- BASE> - BaseProtocol<PayloadFlow<BUF,- BASE>, - PayloadProtocol<BUF, - BASE>> 
- Enclosing class:
- PayloadChannel.Builder
private static record PayloadChannel.Builder.Protocol<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload> (PayloadChannel.Builder.BuilderContext<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload> ctx)
extends Record
implements PayloadChannel.Builder.ProtocolFactory<BUF,BASE>, PayloadProtocol<BUF,BASE>   
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final PayloadChannel.Builder.BuilderContext<BUF, BASE> The field for thectxrecord component.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateCreates an instance of aProtocolrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionctx()Returns the value of thectxrecord component.final booleanIndicates whether some other object is "equal to" this one.flow(@Nullable PacketFlow flow) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.network.simple.BaseProtocolbidirectional, bidirectional, clientbound, clientbound, flow, flow, serverbound, serverboundMethods inherited from interface net.minecraftforge.network.PayloadChannel.Builder.ProtocolFactorybuild, protocol, protocolMethods inherited from interface net.minecraftforge.network.payload.PayloadConnectionany, any, any, any, configuration, configuration, configuration, configuration, login, login, login, login, play, play, play, play, protocol, protocol
- 
Field Details- 
ctxprivate final PayloadChannel.Builder.BuilderContext<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload> ctxThe field for thectxrecord component.
 
- 
- 
Constructor Details- 
ProtocolCreates an instance of aProtocolrecord class.- Parameters:
- ctx- the value for the- ctxrecord component
 
 
- 
- 
Method Details- 
flow- Specified by:
- flowin interface- BaseProtocol<BUF extends FriendlyByteBuf,- BASE extends CustomPacketPayload> 
 
- 
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).
- 
ctxReturns the value of thectxrecord component.- Specified by:
- ctxin interface- PayloadChannel.Builder.ProtocolFactory<BUF extends FriendlyByteBuf,- BASE extends CustomPacketPayload> 
- Returns:
- the value of the ctxrecord component
 
 
-