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$NetworkStateImplintermediary net/minecraft/class_9147$class_9149official zl$bnamed idintermediary comp_2234official anamed sideintermediary comp_2235official bnamed codecintermediary comp_2236official cnamed bundleHandlerintermediary comp_2237official d
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.NetworkState
NetworkState.Factory<T extends PacketListener,B extends ByteBuf> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable PacketBundleHandlerThe field for thebundleHandlerrecord component.private final PacketCodec<ByteBuf, Packet<? super L>> The field for thecodecrecord component.private final NetworkPhaseThe field for theidrecord component.private final NetworkSideThe field for thesiderecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNetworkStateImpl(NetworkPhase networkPhase, NetworkSide networkSide, PacketCodec<ByteBuf, Packet<? super L>> packetCodec, @Nullable PacketBundleHandler packetBundleHandler) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebundleHandlerrecord component.PacketCodec<ByteBuf, Packet<? super L>> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.side()Returns the value of thesiderecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
side
The field for thesiderecord component. -
codec
The field for thecodecrecord component. -
bundleHandler
The field for thebundleHandlerrecord 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 thebundleHandlerrecord component.- Specified by:
bundleHandlerin interfaceNetworkState<L extends PacketListener>- Returns:
- the value of the
bundleHandlerrecord 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 theidrecord component.- Specified by:
idin interfaceNetworkState<L extends PacketListener>- Returns:
- the value of the
idrecord component
-
side
Returns the value of thesiderecord component.- Specified by:
sidein interfaceNetworkState<L extends PacketListener>- Returns:
- the value of the
siderecord component
-
codec
Returns the value of thecodecrecord component.- Specified by:
codecin interfaceNetworkState<L extends PacketListener>- Returns:
- the value of the
codecrecord component
-