Package net.minecraft.network.state
Record Class NetworkStateBuilder.PacketType<T extends PacketListener,P extends Packet<? super T>,B extends ByteBuf,C>
java.lang.Object
java.lang.Record
net.minecraft.network.state.NetworkStateBuilder.PacketType<T,P,B,C>
- Record Components:
type-codec-modifier-
- Enclosing class:
NetworkStateBuilder<T extends PacketListener,B extends ByteBuf, C>
private static record NetworkStateBuilder.PacketType<T extends PacketListener,P extends Packet<? super T>,B extends ByteBuf,C> (PacketType<P extends Packet<? super T>> type, PacketCodec<? super B extends ByteBuf,P extends Packet<? super T>> codec, @Nullable PacketCodecModifier<B extends ByteBuf,P extends Packet<? super T>,C> modifier)
extends Record
- Mappings:
Namespace Name named net/minecraft/network/state/NetworkStateBuilder$PacketTypeintermediary net/minecraft/class_9147$class_9148official abi$anamed typeintermediary comp_2232official anamed codecintermediary comp_2233official bnamed modifierintermediary comp_3880official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PacketCodec<? super B, P> The field for thecodecrecord component.private final @Nullable PacketCodecModifier<B, P, C> The field for themodifierrecord component.private final PacketType<P> The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPacketType(PacketType<P> type, PacketCodec<? super B, P> serializer, @Nullable PacketCodecModifier<B, P, C> modifier) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SideValidatingDispatchingCodecBuilder<ByteBuf, T> builder, Function<ByteBuf, B> bufUpgrader, C context) PacketCodec<? super B, P> 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.modifier()Returns the value of themodifierrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
Constructor Details
-
PacketType
PacketType(PacketType<P> type, PacketCodec<? super B, P> serializer, @Nullable @Nullable PacketCodecModifier<B, P, C> modifier) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/network/state/NetworkStateBuilder$PacketType;<init>(Lnet/minecraft/network/packet/PacketType;Lnet/minecraft/network/codec/PacketCodec;Lnet/minecraft/network/packet/PacketCodecModifier;)Vintermediary <init>Lnet/minecraft/class_9147$class_9148;<init>(Lnet/minecraft/class_9145;Lnet/minecraft/class_9139;Lnet/minecraft/class_10945;)Vofficial <init>Labi$a;<init>(Labf;Laat;Labc;)V
-
-
Method Details
-
add
public void add(SideValidatingDispatchingCodecBuilder<ByteBuf, T> builder, Function<ByteBuf, B> bufUpgrader, C context) - Mappings:
Namespace Name Mixin selector named addLnet/minecraft/network/state/NetworkStateBuilder$PacketType;add(Lnet/minecraft/network/handler/SideValidatingDispatchingCodecBuilder;Ljava/util/function/Function;Ljava/lang/Object;)Vintermediary method_56459Lnet/minecraft/class_9147$class_9148;method_56459(Lnet/minecraft/class_9146;Ljava/util/function/Function;Ljava/lang/Object;)Vofficial aLabi$a;a(Labh;Ljava/util/function/Function;Ljava/lang/Object;)V
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-