-
Notifications
You must be signed in to change notification settings - Fork 56
Home
A library mod with the shared code and utilities I use across my mods. Formerly Selene.
Some of it is the usual multiloader plumbing so you can write one codebase for NeoForge, Forge and Fabric. The rest is stuff you won't find elsewhere: generating textures and models at runtime, detecting every wood type in the game and registering blocks for them, a whole config system with its own screen, virtual fluids, fake levels.
repositories {
maven { url = uri("https://registry.somethingcatchy.net/repository/maven-public/") }
}// common
modCompileOnly("net.mehvahdjukaar:moonlight-common:$moonlight_version")
// fabric
modImplementation("net.mehvahdjukaar:moonlight-fabric:$moonlight_version")
modRuntimeOnly("net.mehvahdjukaar:codecui-fabric:$codecui_version")
// neoforge
modImplementation("net.mehvahdjukaar:moonlight-neoforge:$moonlight_version")
modRuntimeOnly("net.mehvahdjukaar:codecui-neoforge:$codecui_version")Important
codecui is required now. It's bundled with JiJ so players never install it themselves, but it
isn't on the dev runtime classpath, so without those modRuntimeOnly lines your dev game crashes
with a NoClassDefFoundError.
Versions are the full <mc version>-<mod version> strings, like 1.21.1-3.1.4d. Full setup,
including the access transformer and what your mod init should look like, is on
Getting Started.
Tip
Every page links a matching example class from the repo, which is the fastest way to see a feature in use.
These are the ones that replace a whole other dependency, or that nothing else does:
| Platform Helpers | Write once for both loaders. The Architectury slot |
| Configs + Config Screen | Fully featured config system and a full in game screen |
| Runtime Resource Packs | Generate textures, models, recipes and lang while the game loads |
| Texture Manipulation | Palettes and respriting, in code |
| Block Set API | Find every wood or leaves type installed and register a block per type |
| Global Datapack Folder | One folder of datapacks that applies to every world |
| Fake Levels | A Level with no world behind it, for previews and simulation |
Basics Getting Started · Platform Helpers · Registration · Networking · Events · Configs · Config Screen
Resources Runtime Resource Packs · Texture Manipulation · Resource Helpers · Block Set API
Client Custom Models · Item Rendering · Rendered Textures · Post Shaders · GUI Toolkit · Colors
World and gameplay Block and Item Interfaces · Additional Item Placements · Improved Entities · Fake Levels · World Data · Dispenser Behaviors · Spawn Boxes
Utilities Codec Utilities · Misc Helpers · Commands
These need no code, just a datapack:
- Villager Trades - add and remove trades from any villager, vanilla or modded
- Soft Fluids - the bottle based virtual fluid system
- Map Markers - custom icons on maps
- Spawn Boxes - dedicated spawning areas inside a structure
- Global Datapack Folder - datapacks that apply to every world
CurseForge · Modrinth · GitHub
Basics Platform Helpers Registration Networking Events Configs Config Screen
Resources Runtime Resource Packs Texture Manipulation Resource Helpers Block Set API
Client Custom Models Item Rendering Rendered Textures Post Shaders GUI Toolkit Colors
World Block and Item Interfaces Additional Item Placements Improved Entities Fake Levels World Data Dispenser Behaviors
Utilities Codec Utilities Misc Helpers Commands
Datapacks Villagers Soft Fluids Map Markers Spawn Boxes Global Datapack Folder