Package net.minecraftforge.network
Record Class PayloadChannel.Builder.BuilderContext<BUF extends FriendlyByteBuf,BASE>
java.lang.Object
java.lang.Record
net.minecraftforge.network.PayloadChannel.Builder.BuilderContext<BUF,BASE>
- Enclosing class:
PayloadChannel.Builder
private static record PayloadChannel.Builder.BuilderContext<BUF extends FriendlyByteBuf,BASE> (PayloadChannel.Builder builder, @Nullable NetworkProtocol<BUF extends FriendlyByteBuf> protocol, @Nullable PacketFlow flow)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PayloadChannel.BuilderThe field for thebuilderrecord component.private final @Nullable PacketFlowThe field for theflowrecord component.private final @Nullable NetworkProtocol<BUF> The field for theprotocolrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionBuilderContext(PayloadChannel.Builder builder) privateBuilderContext(PayloadChannel.Builder builder, @Nullable NetworkProtocol<BUF> protocol, @Nullable PacketFlow flow) Creates an instance of aBuilderContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the value of thebuilderrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable PacketFlowflow()Returns the value of theflowrecord component.private PayloadChannel.Builder.BuilderContext<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>
PayloadChannel.Builder.BuilderContext<NEWBUF, BASE> protocol(NetworkProtocol<NEWBUF> protocol) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
builder
The field for thebuilderrecord component. -
protocol
The field for theprotocolrecord component. -
flow
The field for theflowrecord component.
-
-
Constructor Details
-
BuilderContext
-
BuilderContext
private BuilderContext(PayloadChannel.Builder builder, @Nullable @Nullable NetworkProtocol<BUF> protocol, @Nullable @Nullable PacketFlow flow) Creates an instance of aBuilderContextrecord class.- Parameters:
builder- the value for thebuilderrecord componentprotocol- the value for theprotocolrecord componentflow- the value for theflowrecord component
-
-
Method Details
-
protocol
public <NEWBUF extends FriendlyByteBuf> PayloadChannel.Builder.BuilderContext<NEWBUF,BASE> protocol(NetworkProtocol<NEWBUF> protocol) -
flow
-
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). -
builder
Returns the value of thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-
protocol
Returns the value of theprotocolrecord component.- Returns:
- the value of the
protocolrecord component
-
flow
Returns the value of theflowrecord component.- Returns:
- the value of the
flowrecord component
-