Record Class ClientboundResourcePackPushPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket
- All Implemented Interfaces:
Packet<ClientCommonPacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for thehash
record component.private final UUID
The field for theid
record component.static final int
The field for theprompt
record component.private final boolean
The field for therequired
record component.static final StreamCodec
<io.netty.buffer.ByteBuf, ClientboundResourcePackPushPacket> private final String
The field for theurl
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientCommonPacketListener p_314609_) hash()
Returns the value of thehash
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.prompt()
Returns the value of theprompt
record component.boolean
required()
Returns the value of therequired
record component.final String
toString()
Returns a string representation of this record class.type()
url()
Returns the value of theurl
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
id
The field for theid
record component. -
url
The field for theurl
record component. -
hash
The field for thehash
record component. -
required
private final boolean requiredThe field for therequired
record component. -
prompt
The field for theprompt
record 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 aClientboundResourcePackPushPacket
record class.- Parameters:
id
- the value for theid
record componenturl
- the value for theurl
record componenthash
- the value for thehash
record componentrequired
- the value for therequired
record componentprompt
- the value for theprompt
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientCommonPacketListener>
-
handle
- Specified by:
handle
in 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 theid
record component.- Returns:
- the value of the
id
record component
-
url
Returns the value of theurl
record component.- Returns:
- the value of the
url
record component
-
hash
Returns the value of thehash
record component.- Returns:
- the value of the
hash
record component
-
required
public boolean required()Returns the value of therequired
record component.- Returns:
- the value of the
required
record component
-
prompt
Returns the value of theprompt
record component.- Returns:
- the value of the
prompt
record component
-