Package net.minecraft.server.jsonrpc.api
Record Class MethodInfo
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.api.MethodInfo
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thedescriptionrecord component.static final com.mojang.serialization.MapCodec<MethodInfo> The field for theparamsrecord component.private final Optional<ResultInfo> The field for theresultrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMethodInfo(String description, Optional<ParamInfo> params, Optional<ResultInfo> result) Creates an instance of aMethodInforecord class.MethodInfo(String p_442898_, ParamInfo p_451419_, ResultInfo p_450926_) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.named(ResourceLocation pName) params()Returns the value of theparamsrecord component.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
description
The field for thedescriptionrecord component. -
params
The field for theparamsrecord component. -
result
The field for theresultrecord component. -
PARAMS_CODEC
-
MAP_CODEC
-
-
Constructor Details
-
MethodInfo
-
MethodInfo
Creates an instance of aMethodInforecord class.- Parameters:
description- the value for thedescriptionrecord componentparams- the value for theparamsrecord componentresult- the value for theresultrecord component
-
-
Method Details
-
named
-
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). -
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-