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
Modifier and TypeFieldDescriptionprivate final PayloadChannel.Builder
The field for thebuilder
record component.private final @Nullable PacketFlow
The field for theflow
record component.private final @Nullable NetworkProtocol
<BUF> The field for theprotocol
record component. -
Constructor Summary
ModifierConstructorDescriptionBuilderContext
(PayloadChannel.Builder builder) private
BuilderContext
(PayloadChannel.Builder builder, @Nullable NetworkProtocol<BUF> protocol, @Nullable PacketFlow flow) Creates an instance of aBuilderContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns the value of thebuilder
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable PacketFlow
flow()
Returns the value of theflow
record component.private PayloadChannel.Builder.BuilderContext
<BUF, BASE> flow
(@Nullable PacketFlow flow) final int
hashCode()
Returns a hash code value for this object.@Nullable NetworkProtocol
<BUF> protocol()
Returns the value of theprotocol
record component.<NEWBUF extends FriendlyByteBuf>
PayloadChannel.Builder.BuilderContext<NEWBUF, BASE> protocol
(NetworkProtocol<NEWBUF> protocol) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
builder
The field for thebuilder
record component. -
protocol
The field for theprotocol
record component. -
flow
The field for theflow
record component.
-
-
Constructor Details
-
BuilderContext
-
BuilderContext
private BuilderContext(PayloadChannel.Builder builder, @Nullable @Nullable NetworkProtocol<BUF> protocol, @Nullable @Nullable PacketFlow flow) Creates an instance of aBuilderContext
record class.- Parameters:
builder
- the value for thebuilder
record componentprotocol
- the value for theprotocol
record componentflow
- the value for theflow
record 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 thebuilder
record component.- Returns:
- the value of the
builder
record component
-
protocol
Returns the value of theprotocol
record component.- Returns:
- the value of the
protocol
record component
-
flow
Returns the value of theflow
record component.- Returns:
- the value of the
flow
record component
-