Record Class ClientboundResourcePackPushPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket
- All Implemented Interfaces:
- Packet<ClientCommonPacketListener>
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionClientboundResourcePackPushPacket(UUID id, String url, String hash, boolean required, Component prompt) Creates an instance of aClientboundResourcePackPushPacketrecord class.ClientboundResourcePackPushPacket(FriendlyByteBuf p_314581_) 
- 
Method SummaryModifier 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.url()Returns the value of theurlrecord component.voidwrite(FriendlyByteBuf p_314511_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable, nextProtocol
- 
Field Details- 
idThe field for theidrecord component.
- 
urlThe field for theurlrecord component.
- 
hashThe field for thehashrecord component.
- 
requiredprivate final boolean requiredThe field for therequiredrecord component.
- 
promptThe field for thepromptrecord component.
- 
MAX_HASH_LENGTHpublic static final int MAX_HASH_LENGTH- See Also:
 
 
- 
- 
Constructor Details- 
ClientboundResourcePackPushPacketpublic ClientboundResourcePackPushPacket(UUID id, String url, String hash, boolean required, @Nullable Component prompt) Creates an instance of aClientboundResourcePackPushPacketrecord class.- Parameters:
- id- the value for the- idrecord component
- url- the value for the- urlrecord component
- hash- the value for the- hashrecord component
- required- the value for the- requiredrecord component
- prompt- the value for the- promptrecord component
 
- 
ClientboundResourcePackPushPacket
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ClientCommonPacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ClientCommonPacketListener>
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
idReturns the value of theidrecord component.- Returns:
- the value of the idrecord component
 
- 
urlReturns the value of theurlrecord component.- Returns:
- the value of the urlrecord component
 
- 
hashReturns the value of thehashrecord component.- Returns:
- the value of the hashrecord component
 
- 
requiredpublic boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the requiredrecord component
 
- 
promptReturns the value of thepromptrecord component.- Returns:
- the value of the promptrecord component
 
 
-