Record Class DiscoveryService.DiscoverResponse
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.DiscoveryService.DiscoverResponse
- Enclosing class:
DiscoveryService
public static record DiscoveryService.DiscoverResponse(String jsonRpcProtocolVersion, DiscoveryService.DiscoverInfo discoverInfo, List<MethodInfo.Named> methods, DiscoveryService.DiscoverComponents components)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DiscoveryService.DiscoverResponse> private final DiscoveryService.DiscoverComponentsThe field for thecomponentsrecord component.private final DiscoveryService.DiscoverInfoThe field for thediscoverInforecord component.private final StringThe field for thejsonRpcProtocolVersionrecord component.private final List<MethodInfo.Named> The field for themethodsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDiscoverResponse(String jsonRpcProtocolVersion, DiscoveryService.DiscoverInfo discoverInfo, List<MethodInfo.Named> methods, DiscoveryService.DiscoverComponents components) Creates an instance of aDiscoverResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentsrecord component.Returns the value of thediscoverInforecord component.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 thejsonRpcProtocolVersionrecord component.methods()Returns the value of themethodsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
jsonRpcProtocolVersion
The field for thejsonRpcProtocolVersionrecord component. -
discoverInfo
The field for thediscoverInforecord component. -
methods
The field for themethodsrecord component. -
components
The field for thecomponentsrecord component. -
CODEC
-
-
Constructor Details
-
DiscoverResponse
public DiscoverResponse(String jsonRpcProtocolVersion, DiscoveryService.DiscoverInfo discoverInfo, List<MethodInfo.Named> methods, DiscoveryService.DiscoverComponents components) Creates an instance of aDiscoverResponserecord class.- Parameters:
jsonRpcProtocolVersion- the value for thejsonRpcProtocolVersionrecord componentdiscoverInfo- the value for thediscoverInforecord componentmethods- the value for themethodsrecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
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). -
jsonRpcProtocolVersion
Returns the value of thejsonRpcProtocolVersionrecord component.- Returns:
- the value of the
jsonRpcProtocolVersionrecord component
-
discoverInfo
Returns the value of thediscoverInforecord component.- Returns:
- the value of the
discoverInforecord component
-
methods
Returns the value of themethodsrecord component.- Returns:
- the value of the
methodsrecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-