Type object
File match fabric.mod.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/fabric-mod-json/latest.json
Source https://www.schemastore.org/fabric.mod.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

id string required

The mod identifier

pattern=^(?:[a-z][a-z0-9-_]{1,63}|[$]\{[a-zA-Z0-9-_]+\})$
version string required

The mod version

schemaVersion integer required

The version of the fabric.mod.json schema

Constant: 1
environment string

The environment where this mod will be loaded

Values: "*" "client" "server"
entrypoints Record<string, entrypoint[]>

The entrypoints used by this mod

6 nested properties

The entrypoint for all environments (classes must implement ModInitializer)

client entrypoint[]

The entrypoint for the client environment (classes must implement ClientModInitializer)

server entrypoint[]

The entrypoint for the server environment (classes must implement DedicatedServerModInitializer)

preLaunch entrypoint[]

The entrypoint called just before the game instance is created (classes must implement PreLaunchEntrypoint)

fabric-datagen entrypoint[]

The entrypoint for the data generator environment (classes must implement DataGeneratorEntrypoint)

fabric-gametest entrypoint[]

The entrypoint for the Game Test environment (classes must implement FabricGameTest)

Contains an array of nestedJar objects

languageAdapters Record<string, string>

A string→string dictionary, connecting namespaces to LanguageAdapter implementations

mixins string | object[]
accessWidener string

Path to an access widener definition file

depends Record<string, versionRange | versionRange[]>

id→versionRange map for dependencies. Failure to meet these causes a hard failure

recommends Record<string, versionRange | versionRange[]>

id→versionRange map for dependencies. Failure to meet these causes a soft failure (warning)

suggests Record<string, versionRange | versionRange[]>

id→versionRange map for dependencies. Are not matched and are mainly used as metadata

conflicts Record<string, versionRange | versionRange[]>

id→versionRange map for dependencies. A successful match causes a soft failure (warning)

breaks Record<string, versionRange | versionRange[]>

id→versionRange map for dependencies. A successful match causes a hard failure

name string

Name of the mod

description string

Description of the mod

authors person[]

The direct authorship information

contributors person[]

Contributors to this mod

contact Record<string, string>
5 nested properties
email string

Contact e-mail pertaining to the mod

irc string

IRC channel pertaining to the mod. Must be of a valid URL format

homepage string

Project or user homepage. Must be a valid HTTP/HTTPS address

issues string

Project issue tracker. Must be a valid HTTP/HTTPS address

sources string

Project source code repository. Must be a valid URL

license string | string[]

The license the mod uses

icon string | object
custom object

A map of namespace:id→value for custom data fields.

Definitions

entrypoint object | string
contactInfo Record<string, string>
email string

Contact e-mail pertaining to the mod

irc string

IRC channel pertaining to the mod. Must be of a valid URL format

homepage string

Project or user homepage. Must be a valid HTTP/HTTPS address

issues string

Project issue tracker. Must be a valid HTTP/HTTPS address

sources string

Project source code repository. Must be a valid URL

environment string

The environment where this mod will be loaded

nestedJar object
file string required

A string value pointing to a path from the root of the JAR to a nested JAR which should be loaded alongside the outer mod JAR

person string | object
versionRanges versionRange | versionRange[]
versionRange string

A version range or an array of those that match versions. The following variants are supported:

  • * matches any version.
  • Ranges following NPM semver specification:
    • >=, >, =, < and <=
    • X-ranges to specify variable components, e.g. 1.x
    • tilde ranges that allow patch version changes, e.g. ~1.2.3
    • caret ranges that allow up to minor version changes, e.g. ^1.2.3
  • Exact string matches are always performed as well.

If an array of ranges is used, they're treated as in an "OR" relationship - only one of the ranges needs to match.