question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Properly defining a mod metadata format

See original GitHub issue

As you might’ve noticed, in 0.1.x-0.3.x the fabric.mod.json format is effectively “defined” by the Java class - this doesn’t really make for good documentation or specification.

This is an issue opened to discuss things which should be covered by a fabric.mod.json standard (“schemaVersion”: 1) which I hope to add in 0.4.0 - with the prior JSON files being implied as “schemaVersion”: 0.

These are the existing fields in the mod.json format as of 0.3.6:

	// Required
	private String id;
	private String version;

	// Optional (environment)
	private DependencyMap requires = new DependencyMap();
	private DependencyMap conflicts = new DependencyMap();
	private String languageAdapter = "net.fabricmc.loader.language.JavaLanguageAdapter";
	private Mixins mixins = Mixins.EMPTY;
	private Side side = Side.UNIVERSAL;
	private boolean lazilyLoaded = false;
	private String initializer;
	private String[] initializers;

	// Optional (metadata)
	private String name;
	private String description = "";
	private Links links = Links.EMPTY;
	private DependencyMap recommends = new DependencyMap();
	private Person[] authors = new Person[0];
	private Person[] contributors = new Person[0];
	private String license = "";

Some prior art:

  • Forge/Sponge’s mcmod.info (duh)
  • craftson spec - this is what we based the initial mod.json format on back in 2016, but have since deviated
  • Spigot’s plugin.yml
  • MCubed’s craft.json - designed for project formats, but could be useful here

I’d also like to call in @peterix as he might have lots of prior art from his work on MultiMC.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:63 (53 by maintainers)

github_iconTop GitHub Comments

5reactions
Prospectorcommented, Feb 18, 2019

Get rid of the single initializer in favor of the array.

3reactions
asiekierkacommented, Apr 7, 2019

We still need the adapter info.

Here’s a new proposal:

"entrypoints": [
    {
        "type": "main",
        "adapter": "default",
        "values": [
            "my/package/MyClass",
            "my/package/MyOtherClass::myMethod"
        ]
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

MODS User Guidelines: Metadata Object Description Schema
Below is a detailed description of all of the valid MODS elements, attributes and values (revised to include version 3.3). Examples of most...
Read more >
Guidelines for Implementing MODS - Credo
Follow traditional cataloging rules (AACR2, DACS, etc): only the first word and proper names are capitalized. If the object has no obvious title,...
Read more >
New Metadata Standards for Digital Resources: MODS and ...
MODS is intended to complement other metadata formats and to provide an alternative between a simple metadata format with a minimum of fields...
Read more >
Introduction to Metadata: Setting the Stage
Data structure standards (metadata element sets, schemas). These are “categories” or “containers” of data that make up a record or other information object....
Read more >
An introduction to the Metadata Object Description Schema ...
... MODS elements are richer then DCMI, simpler then MARC21 bibliographic format and expressed in XML. 39 The MODS identified the widest facets ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found