Giter Site home page Giter Site logo

Let's talk mod loading about fabric-loader HOT 13 CLOSED

fabricmc avatar fabricmc commented on August 16, 2024
Let's talk mod loading

from fabric-loader.

Comments (13)

Prospector avatar Prospector commented on August 16, 2024 7

fml.json (Fabric Mod Loader, of course)

Edit: also petition to rename ModInitializers to Fabricators... come on

from fabric-loader.

asiekierka avatar asiekierka commented on August 16, 2024 3

I'd say, for 0.2.0:

  • add ClientModInitializer/ServerModInitializer interfaces
  • Rename mod.json to fabric.mod.json (support the former until 0.3.0)
  • Remove semver getVersion(), keep String getVersionString() (figure this out for 0.3.0)
  • No ServiceLoaders

Who's with me?

from fabric-loader.

ChloeDawn avatar ChloeDawn commented on August 16, 2024 1

fabric_mod.json

_ > -

from fabric-loader.

liach avatar liach commented on August 16, 2024 1

we can even just define source sets including client main and test, then using clientApi gradle configuration to add the client code to client source set dependency

from fabric-loader.

modmuss50 avatar modmuss50 commented on August 16, 2024

I like the idea of the ClientModInitializer as well as the other 2. This keeps things clearly separated in code. As long as it doesnt try to load any of the client classes called from within then it should be fine.

Using the current system and not loading classes when things dont exist I think is a good idea. How ever what happens if something critical was removed (either in fabric or a mod that is depended on) the mod would just slienly fail.

Service loader, its great for what it does, but not so good for stuff it doesnt do. Having multiple instances of the same class imo is something we dont want. One idea that was mentioned was implementing a custom service loader that uses the same files/locations (so IDE support) but provides what we want.

from fabric-loader.

asiekierka avatar asiekierka commented on August 16, 2024

@modmuss50 "How ever what happens if something critical was removed (either in fabric or a mod that is depended on) the mod would just slienly fail."

We could use an annotation, or we could mark it in the JSON. Open to ideas here.

from fabric-loader.

asiekierka avatar asiekierka commented on August 16, 2024

Another question: Should we use "mod.json" or "META-INF/mod.json" or something else altogether?

from fabric-loader.

modmuss50 avatar modmuss50 commented on August 16, 2024

Not META-INF imo, doesnt really add anything. I dont see anything wrong with the current mod.json file name.

from fabric-loader.

kashike avatar kashike commented on August 16, 2024

I'd prefer fabric.json or fabric-mod.json to avoid any conflicts with other platforms.

from fabric-loader.

NikkyAI avatar NikkyAI commented on August 16, 2024

i would also not use META-INF unless there is some killer feature that requires it.. but it seems to be more restrictive than just the mod.json

i wonder if it would be possible to have split dependencies for Client/Server
so that modders cannot compile with references to the wrong one
i am imagining a structure using multi module builds common, client, server
gradle multi project builds

from fabric-loader.

LemmaEOF avatar LemmaEOF commented on August 16, 2024

I do think changing it to fabricmod.json or similar will help clear things up a lot, since if I recall forge is moving to a json-based system too.

from fabric-loader.

oliviathevampire avatar oliviathevampire commented on August 16, 2024

@Boundarybreaker not json but toml https://github.com/MinecraftForge/MinecraftForge/blob/1.13-pre/mdk/src/main/resources/META-INF/mods.toml

from fabric-loader.

asiekierka avatar asiekierka commented on August 16, 2024

Done as of 0.2.0. New breakage should go into new issues.

from fabric-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.