Package net.minecraft.server.jsonrpc.api
Record Class Schema<T>
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.api.Schema<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<T> The field for thecodecrecord component.static final com.mojang.serialization.Codec<? extends Schema<?>> static final SchemaComponent<Difficulty> static final Schema<DiscoveryService.DiscoverResponse> The field for theenumValuesrecord component.static final SchemaComponent<GameType> static final SchemaComponent<IpBanlistService.IncomingIpBanDto> static final SchemaComponent<IpBanlistService.IpBanDto> The field for theitemsrecord component.static final SchemaComponent<PlayerService.KickDto> static final SchemaComponent<Message> static final SchemaComponent<OperatorService.OperatorDto> static final Schema<PermissionLevel> static final SchemaComponent<BanlistService.UserBanDto> static final SchemaComponent<PlayerDto> The field for thepropertiesrecord component.The field for thereferencerecord component.static final Schema<GameRuleType> private static final List<SchemaComponent<?>> static final SchemaComponent<ServerStateService.ServerState> static final SchemaComponent<ServerStateService.SystemMessage> The field for thetyperecord component.static final SchemaComponent<GameRulesService.GameRuleUpdate<?>> static final SchemaComponent<GameRulesService.GameRuleUpdate<?>> static final SchemaComponent<DiscoveryService.DiscoverInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasArray()com.mojang.serialization.Codec<T> codec()Returns the value of thecodecrecord component.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.info()items()Returns the value of theitemsrecord component.static <E extends Enum<E> & StringRepresentable>
Schema<E> static <E extends Enum<E> & StringRepresentable>
Schema<E> static <T> Schema<T> static <T> Schema<T> static <T> Schema<T> static <T> Schema<T> Returns the value of thepropertiesrecord component.static <T> Schema<T> record(com.mojang.serialization.Codec<T> pCodec) private static <T> Schema<T> Returns the value of thereferencerecord component.private static <T> SchemaComponent<T> registerSchema(String pName, Schema<T> pSchema) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.static <T> com.mojang.serialization.Codec<Schema<T>>
-
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
The field for thecodecrecord component. -
CODEC
-
SCHEMA_REGISTRY
-
BOOL_SCHEMA
-
INT_SCHEMA
-
BOOL_OR_INT_SCHEMA
-
NUMBER_SCHEMA
-
STRING_SCHEMA
-
UUID_SCHEMA
-
DISCOVERY_SCHEMA
-
DIFFICULTY_SCHEMA
-
GAME_TYPE_SCHEMA
-
PERMISSION_LEVEL_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, List<String> type, Optional<Schema<?>> items, Map<String, Schema<?>> properties, List<String> enumValues, com.mojang.serialization.Codec<T> codec) 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 componentcodec- the value for thecodecrecord component
-
-
Method Details
-
typedCodec
-
info
-
registerSchema
-
getSchemaRegistry
-
ofRef
-
ofType
-
ofTypes
-
ofEnum
-
ofEnum
public static <E extends Enum<E> & StringRepresentable> Schema<E> ofEnum(Supplier<E[]> pEnumValues, com.mojang.serialization.Codec<E> pCodec) -
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
-
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-