Package net.minecraft.network
Record Class NetworkStateBuilder.NetworkStateImpl<L extends PacketListener>
java.lang.Object
java.lang.Record
net.minecraft.network.NetworkStateBuilder.NetworkStateImpl<L>
- Record Components:
id
-side
-codec
-bundleHandler
-
- All Implemented Interfaces:
NetworkState<L>
- Enclosing class:
NetworkStateBuilder<T extends PacketListener,
B extends ByteBuf>
private static record NetworkStateBuilder.NetworkStateImpl<L extends PacketListener>(NetworkPhase id, NetworkSide side, PacketCodec<ByteBuf,Packet<? super L extends PacketListener>> codec, @Nullable PacketBundleHandler bundleHandler)
extends Record
implements NetworkState<L>
- Mappings:
Namespace Name named net/minecraft/network/NetworkStateBuilder$NetworkStateImpl
intermediary net/minecraft/class_9147$class_9149
official zl$b
named id
intermediary comp_2234
official a
named side
intermediary comp_2235
official b
named codec
intermediary comp_2236
official c
named bundleHandler
intermediary comp_2237
official d
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.NetworkState
NetworkState.Factory<T extends PacketListener,
B extends ByteBuf> -
Field Summary
Modifier and TypeFieldDescriptionprivate final @Nullable PacketBundleHandler
The field for thebundleHandler
record component.private final PacketCodec
<ByteBuf, Packet<? super L>> The field for thecodec
record component.private final NetworkPhase
The field for theid
record component.private final NetworkSide
The field for theside
record component. -
Constructor Summary
ConstructorDescriptionNetworkStateImpl
(NetworkPhase networkPhase, NetworkSide networkSide, PacketCodec<ByteBuf, Packet<? super L>> packetCodec, @Nullable PacketBundleHandler packetBundleHandler) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebundleHandler
record component.PacketCodec
<ByteBuf, Packet<? super L>> codec()
Returns the value of thecodec
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.side()
Returns the value of theside
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
id
The field for theid
record component. -
side
The field for theside
record component. -
codec
The field for thecodec
record component. -
bundleHandler
The field for thebundleHandler
record component.
-
-
Constructor Details
-
NetworkStateImpl
NetworkStateImpl(NetworkPhase networkPhase, NetworkSide networkSide, PacketCodec<ByteBuf, Packet<? super L>> packetCodec, @Nullable @Nullable PacketBundleHandler packetBundleHandler)
-
-
Method Details
-
bundleHandler
Returns the value of thebundleHandler
record component.- Specified by:
bundleHandler
in interfaceNetworkState<L extends PacketListener>
- Returns:
- the value of the
bundleHandler
record component
-
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)
. -
id
Returns the value of theid
record component.- Specified by:
id
in interfaceNetworkState<L extends PacketListener>
- Returns:
- the value of the
id
record component
-
side
Returns the value of theside
record component.- Specified by:
side
in interfaceNetworkState<L extends PacketListener>
- Returns:
- the value of the
side
record component
-
codec
Returns the value of thecodec
record component.- Specified by:
codec
in interfaceNetworkState<L extends PacketListener>
- Returns:
- the value of the
codec
record component
-