Record Class ClientboundResourcePackPushPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket
- All Implemented Interfaces:
Packet<ClientCommonPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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.static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundResourcePackPushPacket> private final StringThe field for theurlrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientCommonPacketListener p_314609_) 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.type()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.protocol.Packet
isSkippable, isTerminal
-
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:
-
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf,ClientboundResourcePackPushPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundResourcePackPushPacket
public ClientboundResourcePackPushPacket(UUID id, String url, String hash, boolean required, Optional<Component> prompt) Creates an instance of aClientboundResourcePackPushPacketrecord class.- Parameters:
id- the value for theidrecord componenturl- the value for theurlrecord componenthash- the value for thehashrecord componentrequired- the value for therequiredrecord componentprompt- the value for thepromptrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientCommonPacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientCommonPacketListener>
-
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
-