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 egj$aintermediary net/minecraft/class_7479$class_7481named net/minecraft/client/network/ChatPreviewer$Responseofficial aintermediary comp_826named receivedTimeStampofficial bintermediary comp_827named queryofficial cintermediary comp_828named previewText
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thepreviewTextrecord component.private final StringThe field for thequeryrecord component.private final longThe field for thereceivedTimeStamprecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConsume(String message) Returns whether the response can be consumed for themessage.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepreviewTextrecord component.query()Returns the value of thequeryrecord component.longReturns the value of thereceivedTimeStamprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
receivedTimeStamp
private final long receivedTimeStampThe field for thereceivedTimeStamprecord component. -
query
The field for thequeryrecord component. -
previewText
The field for thepreviewTextrecord component.
-
-
Constructor Details
-
Response
-
-
Method Details
-
canConsume
Returns whether the response can be consumed for themessage.This returns
trueif themessageequals the queried message and the cooldown has passed.- Returns:
- whether the response can be consumed for the
message - Mappings:
Namespace Name Mixin selector official aLegj$a;a(Ljava/lang/String;)Zintermediary method_44045Lnet/minecraft/class_7479$class_7481;method_44045(Ljava/lang/String;)Znamed canConsumeLnet/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 thereceivedTimeStamprecord component.- Returns:
- the value of the
receivedTimeStamprecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
previewText
Returns the value of thepreviewTextrecord component.- Returns:
- the value of the
previewTextrecord component
-