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 intprivate final ComponentThe field for thepromptrecord component.private final booleanThe field for therequiredrecord component.private final StringThe field for theurlrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundResourcePackPushPacket(UUID id, String url, String hash, boolean required, Component prompt) Creates an instance of aClientboundResourcePackPushPacketrecord class.ClientboundResourcePackPushPacket(FriendlyByteBuf p_310933_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientCommonPacketListener p_312649_) 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.voidwrite(FriendlyByteBuf p_310067_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, nextProtocol
-
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:
-
-
Constructor Details
-
ClientboundResourcePackPushPacket
public ClientboundResourcePackPushPacket(UUID id, String url, String hash, boolean required, @Nullable 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
-
ClientboundResourcePackPushPacket
-
-
Method Details
-
write
- Specified by:
writein 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
-