Record Class ResourcePackSendS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.common.ResourcePackSendS2CPacket
- Record Components:
id-url-hash-required-prompt-
- All Implemented Interfaces:
Packet<ClientCommonPacketListener>
public record ResourcePackSendS2CPacket(UUID id, String url, String hash, boolean required, Optional<Text> prompt)
extends Record
implements Packet<ClientCommonPacketListener>
- Mappings:
Namespace Name official zbintermediary net/minecraft/class_2720named net/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacketofficial cintermediary comp_2158named idofficial dintermediary comp_2159named urlofficial eintermediary comp_2160named hashofficial fintermediary comp_2161named requiredofficial gintermediary comp_2162named prompt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<ByteBuf, ResourcePackSendS2CPacket> private final StringThe field for thehashrecord component.private final UUIDThe field for theidrecord component.static final intThe field for thepromptrecord component.private final booleanThe field for therequiredrecord component.private final StringThe field for theurlrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ClientCommonPacketListener clientCommonPacketListener) final booleanIndicates whether some other object is "equal to" this one.hash()Returns the value of thehashrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.prompt()Returns the value of thepromptrecord component.booleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
id
The field for theidrecord component. -
url
The field for theurlrecord component. -
hash
The field for thehashrecord component. -
required
private final boolean requiredThe field for therequiredrecord component. -
prompt
The field for thepromptrecord component. -
MAX_HASH_LENGTH
public static final int MAX_HASH_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector official aLzb;a:Iintermediary field_33340Lnet/minecraft/class_2720;field_33340:Inamed MAX_HASH_LENGTHLnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;MAX_HASH_LENGTH:I
-
CODEC
- Mappings:
Namespace Name Mixin selector official bLzb;b:Lyg;intermediary field_48626Lnet/minecraft/class_2720;field_48626:Lnet/minecraft/class_9139;named CODECLnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
ResourcePackSendS2CPacket
-
-
Method Details
-
getPacketId
- Specified by:
getPacketIdin interfacePacket<ClientCommonPacketListener>- Mappings:
Namespace Name Mixin selector official aLyp;a()Lyr;intermediary method_55846Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;named getPacketIdLnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;
-
apply
- Specified by:
applyin interfacePacket<ClientCommonPacketListener>- Mappings:
Namespace Name Mixin selector official aLzb;a(Lyv;)Vintermediary method_11774Lnet/minecraft/class_2720;method_11774(Lnet/minecraft/class_8705;)Vnamed applyLnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;apply(Lnet/minecraft/network/listener/ClientCommonPacketListener;)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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
hash
Returns the value of thehashrecord component.- Returns:
- the value of the
hashrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
prompt
Returns the value of thepromptrecord component.- Returns:
- the value of the
promptrecord component
-