Skip to content

Adds support for specifying Minecraft entity models using json files!

License

Notifications You must be signed in to change notification settings

MineLittlePony/Mson

Repository files navigation

M-SON

Current Version Build Status Downloads Discord Server License

/ˈmeɪs(ə)n/

noun
noun: mason; plural noun: masons; noun: Mason; plural noun: Masons

  1. a person skilled in cutting, dressing, laying stone in buildings.
    "the chief mason at Westminster Abby"
  2. a Freemason
    "a Mason's handshake"
  3. a pormantau of Model and JSON
    "check out these awesome msons, yo"
  4. a modelling Minecraft library that combines entity models and behaviours with the ability to load json files
    "dude, you gotta use M-Son"

verb

  • build from or stengthen with stone
    "the other building was masoned up out of hewn limestone"
  • cut or dress (stone).
    "one course of massive stones, roughly masoned"

What is Mson?

Wiki | Model Language Definition

Mson is a fabric library/mod for defining and loading entity models through configurable json files.

It makes modders' lives easier by taking the model geometry out of the code and putting it in a place where it's separated from game logic, and it makes player's lives better by making it possible for your models to be customised and replaced using nothing more than a resourcepack.

Getting Started [ResourcePack & Mod Creators]

When MSON is installed, every entity model in the game can be loaded from an equivalent json file in the assets/<namespace>/models/entity/mson folder. Check this folder for a short list of example models made to closely (and in some cases not very closely) match the equivalent model for a limited few vanilla entities.

For a more complete list, and instructions on how to convert models already loaded into the game, check the Sample 1.20.1 Models wiki page.

Getting Started [Mod Creators]

Want to register your own models to load with mson? Doing so is as simple as:

  1. assets/<modid>/models/entity/my_model.json

  2. static ModelKey<MyEntityModel<MyEntity> MY_ENTITY_MODEL = Mson.getInstance().registerModel(new Identifier("mymod", "my_model"), MyEntityModel::new);

  3. MyEntityModel<MyEntity> model = MyModels.MY_ENTITY_MODEL.createModel();

Want to create a humanoid model? Mson already bundles models for steve, alex, and a simplistic quadruped, so just specify { "parent": "mson:steve" } as your starting model and add override for each body part as you go. Check here for examples!