Quilt Loader 1
Loading...
Searching...
No Matches
net.fabricmc.loader.api.metadata.CustomValue Interface Reference

Represents a custom value in the fabric.mod.json. More...

Inheritance diagram for net.fabricmc.loader.api.metadata.CustomValue:
net.fabricmc.loader.api.metadata.CustomValue.CvArray net.fabricmc.loader.api.metadata.CustomValue.CvObject org.quiltmc.loader.impl.fabric.metadata.CustomValueImpl

Classes

interface  CvArray
 Represents an CvType#ARRAY value. More...
interface  CvObject
 Represents an CvType#OBJECT value. More...
enum  CvType
 The possible types of a custom value. More...

Public Member Functions

CvType getType ()
 Returns the type of the value.
CvObject getAsObject ()
 Returns this value as an CvType#OBJECT.
CvArray getAsArray ()
 Returns this value as an CvType#ARRAY.
String getAsString ()
 Returns this value as a CvType#STRING.
Number getAsNumber ()
 Returns this value as a CvType#NUMBER.
boolean getAsBoolean ()
 Returns this value as a CvType#BOOLEAN.

Detailed Description

Represents a custom value in the fabric.mod.json.

Deprecated
Please use quilt's org.quiltmc.loader.api.ModMetadata instead.

Member Function Documentation

◆ getAsArray()

CvArray net.fabricmc.loader.api.metadata.CustomValue.getAsArray ( )

Returns this value as an CvType#ARRAY.

Returns
this value
Exceptions
ClassCastExceptionif this value is not an array

Implemented in org.quiltmc.loader.impl.fabric.metadata.CustomValueImpl.

◆ getAsBoolean()

boolean net.fabricmc.loader.api.metadata.CustomValue.getAsBoolean ( )

Returns this value as a CvType#BOOLEAN.

Returns
this value
Exceptions
ClassCastExceptionif this value is not a boolean

Implemented in org.quiltmc.loader.impl.fabric.metadata.CustomValueImpl.

◆ getAsNumber()

Number net.fabricmc.loader.api.metadata.CustomValue.getAsNumber ( )

Returns this value as a CvType#NUMBER.

Returns
this value
Exceptions
ClassCastExceptionif this value is not a number

Implemented in org.quiltmc.loader.impl.fabric.metadata.CustomValueImpl.

◆ getAsObject()

CvObject net.fabricmc.loader.api.metadata.CustomValue.getAsObject ( )

Returns this value as an CvType#OBJECT.

Returns
this value
Exceptions
ClassCastExceptionif this value is not an object

Implemented in org.quiltmc.loader.impl.fabric.metadata.CustomValueImpl.

◆ getAsString()

String net.fabricmc.loader.api.metadata.CustomValue.getAsString ( )

Returns this value as a CvType#STRING.

Returns
this value
Exceptions
ClassCastExceptionif this value is not a string

Implemented in org.quiltmc.loader.impl.fabric.metadata.CustomValueImpl.


The documentation for this interface was generated from the following file:
  • src/fabric/api/java/net/fabricmc/loader/api/metadata/CustomValue.java