Package net.minecraft.client.network
Record Class ChatPreviewer.Response
java.lang.Object
java.lang.Record
net.minecraft.client.network.ChatPreviewer.Response
- Record Components:
receivedTimeStamp
-query
- the message that was queried to previewpreviewText
-
- Enclosing class:
ChatPreviewer
@Environment(CLIENT)
private static record ChatPreviewer.Response(long receivedTimeStamp, String query, @Nullable Text previewText)
extends Record
A response to the preview query.
- Mappings:
Namespace Name official egh$a
intermediary net/minecraft/class_7479$class_7481
named net/minecraft/client/network/ChatPreviewer$Response
official a
intermediary comp_826
named receivedTimeStamp
official b
intermediary comp_827
named query
official c
intermediary comp_828
named previewText
-
Field Summary
Modifier and TypeFieldDescriptionThe field for thepreviewText
record component.private final String
The field for thequery
record component.private final long
The field for thereceivedTimeStamp
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canConsume
(String message) Returns whether the response can be consumed for themessage
.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepreviewText
record component.query()
Returns the value of thequery
record component.long
Returns the value of thereceivedTimeStamp
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
receivedTimeStamp
private final long receivedTimeStampThe field for thereceivedTimeStamp
record component. -
query
The field for thequery
record component. -
previewText
The field for thepreviewText
record component.
-
-
Constructor Details
-
Response
-
-
Method Details
-
canConsume
Returns whether the response can be consumed for themessage
.This returns
true
if themessage
equals the queried message and the cooldown has passed.- Returns:
- whether the response can be consumed for the
message
- Mappings:
Namespace Name Mixin selector official a
Legh$a;a(Ljava/lang/String;)Z
intermediary method_44045
Lnet/minecraft/class_7479$class_7481;method_44045(Ljava/lang/String;)Z
named canConsume
Lnet/minecraft/client/network/ChatPreviewer$Response;canConsume(Ljava/lang/String;)Z
-
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 '=='. -
receivedTimeStamp
public long receivedTimeStamp()Returns the value of thereceivedTimeStamp
record component.- Returns:
- the value of the
receivedTimeStamp
record component
-
query
Returns the value of thequery
record component.- Returns:
- the value of the
query
record component
-
previewText
Returns the value of thepreviewText
record component.- Returns:
- the value of the
previewText
record component
-