Package net.minecraft.server.jsonrpc
Record Class IncomingRpcMethod.Method<Params,Result>
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.IncomingRpcMethod.Method<Params,Result>
- All Implemented Interfaces:
IncomingRpcMethod
- Enclosing interface:
IncomingRpcMethod
public static record IncomingRpcMethod.Method<Params,Result> (MethodInfo info, IncomingRpcMethod.Attributes attributes, com.mojang.serialization.Codec<Params> paramsCodec, com.mojang.serialization.Codec<Result> resultCodec, IncomingRpcMethod.RpcMethodFunction<Params,Result> function)
extends Record
implements IncomingRpcMethod
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.jsonrpc.IncomingRpcMethod
IncomingRpcMethod.Attributes, IncomingRpcMethod.Factory<T extends IncomingRpcMethod>, IncomingRpcMethod.IncomingRpcMethodBuilder<T extends IncomingRpcMethod>, IncomingRpcMethod.Method<Params,Result>, IncomingRpcMethod.ParameterlessMethod<Result>, IncomingRpcMethod.ParameterlessRpcMethodFunction<Result>, IncomingRpcMethod.RpcMethodFunction<Params, Result> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IncomingRpcMethod.AttributesThe field for theattributesrecord component.private final IncomingRpcMethod.RpcMethodFunction<Params, Result> The field for thefunctionrecord component.private final MethodInfoThe field for theinforecord component.private final com.mojang.serialization.Codec<Params> The field for theparamsCodecrecord component.private final com.mojang.serialization.Codec<Result> The field for theresultCodecrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMethod(MethodInfo info, IncomingRpcMethod.Attributes attributes, com.mojang.serialization.Codec<Params> paramsCodec, com.mojang.serialization.Codec<Result> resultCodec, IncomingRpcMethod.RpcMethodFunction<Params, Result> function) Creates an instance of aMethodrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(MinecraftApi p_442932_, JsonElement p_443044_, ClientInfo p_442918_) Returns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.com.mojang.serialization.Codec<Params> Returns the value of theparamsCodecrecord component.com.mojang.serialization.Codec<Result> Returns the value of theresultCodecrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
info
The field for theinforecord component. -
attributes
The field for theattributesrecord component. -
paramsCodec
The field for theparamsCodecrecord component. -
resultCodec
The field for theresultCodecrecord component. -
function
The field for thefunctionrecord component.
-
-
Constructor Details
-
Method
public Method(MethodInfo info, IncomingRpcMethod.Attributes attributes, com.mojang.serialization.Codec<Params> paramsCodec, com.mojang.serialization.Codec<Result> resultCodec, IncomingRpcMethod.RpcMethodFunction<Params, Result> function) Creates an instance of aMethodrecord class.- Parameters:
info- the value for theinforecord componentattributes- the value for theattributesrecord componentparamsCodec- the value for theparamsCodecrecord componentresultCodec- the value for theresultCodecrecord componentfunction- the value for thefunctionrecord component
-
-
Method Details
-
apply
public JsonElement apply(MinecraftApi p_442932_, @Nullable JsonElement p_443044_, ClientInfo p_442918_) - Specified by:
applyin interfaceIncomingRpcMethod
-
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). -
info
Returns the value of theinforecord component.- Specified by:
infoin interfaceIncomingRpcMethod- Returns:
- the value of the
inforecord component
-
attributes
Returns the value of theattributesrecord component.- Specified by:
attributesin interfaceIncomingRpcMethod- Returns:
- the value of the
attributesrecord component
-
paramsCodec
Returns the value of theparamsCodecrecord component.- Returns:
- the value of the
paramsCodecrecord component
-
resultCodec
Returns the value of theresultCodecrecord component.- Returns:
- the value of the
resultCodecrecord component
-
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-