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
named net/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket
intermediary net/minecraft/class_2720
official zt
named id
intermediary comp_2158
official c
named url
intermediary comp_2159
official d
named hash
intermediary comp_2160
official e
named required
intermediary comp_2161
official f
named prompt
intermediary comp_2162
official g
  • Field Details

    • id

      private final UUID id
      The field for the id record component.
    • url

      private final String url
      The field for the url record component.
    • hash

      private final String hash
      The field for the hash record component.
    • required

      private final boolean required
      The field for the required record component.
    • prompt

      private final Optional<Text> prompt
      The field for the prompt record component.
    • MAX_HASH_LENGTH

      public static final int MAX_HASH_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_HASH_LENGTH Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;MAX_HASH_LENGTH:I
      intermediary field_33340 Lnet/minecraft/class_2720;field_33340:I
      official a Lzt;a:I
    • CODEC

      public static final PacketCodec<ByteBuf,ResourcePackSendS2CPacket> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48626 Lnet/minecraft/class_2720;field_48626:Lnet/minecraft/class_9139;
      official b Lzt;b:Lyx;
  • Constructor Details

    • ResourcePackSendS2CPacket

      public ResourcePackSendS2CPacket(UUID uUID, String string, String string2, boolean bool, Optional<Text> optional)
  • Method Details

    • getPacketId

      public PacketType<ResourcePackSendS2CPacket> getPacketId()
      Specified by:
      getPacketId in interface Packet<ClientCommonPacketListener>
      Mappings:
      Namespace Name Mixin selector
      named getPacketId Lnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;
      intermediary method_55846 Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;
      official a Lzg;a()Lzi;
    • apply

      public void apply(ClientCommonPacketListener clientCommonPacketListener)
      Specified by:
      apply in interface Packet<ClientCommonPacketListener>
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;apply(Lnet/minecraft/network/listener/ClientCommonPacketListener;)V
      intermediary method_11774 Lnet/minecraft/class_2720;method_11774(Lnet/minecraft/class_8705;)V
      official a Lzt;a(Lzm;)V
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • hash

      public String hash()
      Returns the value of the hash record component.
      Returns:
      the value of the hash record component
    • required

      public boolean required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component
    • prompt

      public Optional<Text> prompt()
      Returns the value of the prompt record component.
      Returns:
      the value of the prompt record component