Record Class ReportingContext
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.chat.report.ReportingContext
public record ReportingContext(AbuseReportSender sender, ReportEnvironment environment, ChatLog chatLog)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ChatLog
The field for thechatLog
record component.private final ReportEnvironment
The field for theenvironment
record component.private static final int
private final AbuseReportSender
The field for thesender
record component. -
Constructor Summary
ConstructorDescriptionReportingContext
(AbuseReportSender sender, ReportEnvironment environment, ChatLog chatLog) Creates an instance of aReportingContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionchatLog()
Returns the value of thechatLog
record component.static ReportingContext
create
(ReportEnvironment p_239686_, com.mojang.authlib.minecraft.UserApiService p_239687_) Returns the value of theenvironment
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
matches
(ReportEnvironment p_239734_) sender()
Returns the value of thesender
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
sender
The field for thesender
record component. -
environment
The field for theenvironment
record component. -
chatLog
The field for thechatLog
record component. -
LOG_CAPACITY
private static final int LOG_CAPACITY- See Also:
-
-
Constructor Details
-
ReportingContext
Creates an instance of aReportingContext
record class.- Parameters:
sender
- the value for thesender
record componentenvironment
- the value for theenvironment
record componentchatLog
- the value for thechatLog
record component
-
-
Method Details
-
create
public static ReportingContext create(ReportEnvironment p_239686_, com.mojang.authlib.minecraft.UserApiService p_239687_) -
matches
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
sender
Returns the value of thesender
record component.- Returns:
- the value of the
sender
record component
-
environment
Returns the value of theenvironment
record component.- Returns:
- the value of the
environment
record component
-
chatLog
Returns the value of thechatLog
record component.- Returns:
- the value of the
chatLog
record component
-