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 listener) Passes this Packet on to the PacketListener for processing.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 interface 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
-
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
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ClientCommonPacketListener>
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-