Package net.minecraft.server.jsonrpc.api
Record Class Schema
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.api.Schema
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Schemastatic final com.mojang.serialization.Codec<Schema> static final SchemaComponentThe field for theenumValuesrecord component.static final SchemaComponentstatic final SchemaComponentstatic final Schemastatic final SchemaComponentThe field for theitemsrecord component.static final SchemaComponentstatic final SchemaComponentstatic final Schemastatic final SchemaComponentstatic final SchemaComponentstatic final SchemaComponentThe field for thepropertiesrecord component.The field for thereferencerecord component.static final Schemaprivate static final List<SchemaComponent> static final SchemaComponentstatic final Schemastatic final SchemaComponentThe field for thetyperecord component.static final SchemaComponentstatic final SchemaComponentstatic final Schemastatic final SchemaComponent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaasArray()Returns the value of theenumValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.static List<SchemaComponent> final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.static <E extends Enum<E> & StringRepresentable>
Schemastatic Schemastatic Schemastatic SchemaReturns the value of thepropertiesrecord component.static Schemarecord()static SchemaReturns the value of thereferencerecord component.private static SchemaComponentregisterSchema(String pName, Schema pSchema) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
reference
The field for thereferencerecord component. -
type
The field for thetyperecord component. -
items
The field for theitemsrecord component. -
properties
The field for thepropertiesrecord component. -
enumValues
The field for theenumValuesrecord component. -
CODEC
-
SCHEMA_REGISTRY
-
BOOL_SCHEMA
-
INT_SCHEMA
-
NUMBER_SCHEMA
-
STRING_SCHEMA
-
UUID_SCHEMA
-
DIFFICULTY_SCHEMA
-
GAME_TYPE_SCHEMA
-
PLAYER_SCHEMA
-
VERSION_SCHEMA
-
SERVER_STATE_SCHEMA
-
RULE_TYPE_SCHEMA
-
TYPED_GAME_RULE_SCHEMA
-
UNTYPED_GAME_RULE_SCHEMA
-
MESSAGE_SCHEMA
-
SYSTEM_MESSAGE_SCHEMA
-
KICK_PLAYER_SCHEMA
-
OPERATOR_SCHEMA
-
INCOMING_IP_BAN_SCHEMA
-
IP_BAN_SCHEMA
-
PLAYER_BAN_SCHEMA
-
-
Constructor Details
-
Schema
public Schema(Optional<URI> reference, Optional<String> type, Optional<Schema> items, Optional<Map<String, Schema>> properties, Optional<List<String>> enumValues) Creates an instance of aSchemarecord class.- Parameters:
reference- the value for thereferencerecord componenttype- the value for thetyperecord componentitems- the value for theitemsrecord componentproperties- the value for thepropertiesrecord componentenumValues- the value for theenumValuesrecord component
-
-
Method Details
-
registerSchema
-
getSchemaRegistry
-
ofRef
-
ofType
-
ofEnum
-
ofEnum
-
arrayOf
-
record
-
record
-
withField
-
asArray
-
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). -
reference
Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
enumValues
Returns the value of theenumValuesrecord component.- Returns:
- the value of the
enumValuesrecord component
-