📖 About 📖

Formerly Selene Library, Moonlight Lib is a set of specialized utilities and shared code that I use for my mods.These include some highly specialized features such as dynamic asset generation, 2 new data registries, dynamic registration system as well as your usual multi loader helpers and wrappers to develop for both Fabric and Forge

🛠️ Features🛠️

Here are the most important features included. If you are a developer planning to use this library this is the section for you!

The main place for documentations are these:

  • This page
  • Example Package classes on github
  • Java Docs in classes from API package on github
To import this lbrary , simply go into the file section here and click "copy gradle line". Then paste that in your build.gradle file.

🎨Dynamic Assets

Moonlight allows you to generate any asset dynamically, for both datapacks and resource packs. In particulat the mod contains an extensive API to generate dynamic textures with tools like extracting palette, cropping, reshaping images, automatic recoloring and more.

  • Dynamic Resources example:
  • Texture Recoloring example:
  • Palette manipulation example:

🌍 Multiloader Utilities

These sets of utilities try to be as simple as possible, usually just relying on static helper functions instead of annotations or other OOP practices, and mainly emulate Forge behavior by simply wrapping it with helper functions. For fabric the equivalent behavior is called or implemented if its not available. Some highlight of this are Deferred registration, Common Setup and more.

Mod focus is on simplicity so most important calls are split among just 4 main API classes.

These are: PlatHelper, ClientHelper, RegHelper and ForgeHelper. 

For configs and networking the main classes are ConfigBuilder and ChannelHandler

Configs in particular have extra features like being able to use Codecs, be loaded early or be automatically synced to clients

  • PlatHelper example:
  • ClientHelper example
  • RegHelper example:
  • ConfigBuilder example:
  • ChannelHandler example:

📒 Dynamic Registration

This includes a new system (BlockSetAPI) which allows to dynamically detect “block sets” right after all blocks have been registered and dynamically register new entries which depend on it. An example is using the builtin WoodTypeRegistry or LeavesTypeRegistry, two block sets that will be populated dynamically with all installed woods and leaves from any mod, allowing you to register your wooden items in all existing wood types.

  • BlockSetAPI example : defining a block set
  • BlockSetAPI example: registering dynamic blocks

🧙‍♂️ Misc Utilities

  • DispenserHelper example
  • First and Third-person Item animations example:

Custom Baked Model Examples

  • Use the model and model loader system to create custom baked models with full code examples.
  • Apply the Quad Utils helper to manipulate quads directly for advanced rendering.

Custom Villager Trades via Datapacks

Place trade definitions inside the moonlight/villager_trades datapack folder to add new professions trades to any villager. The following example demonstrates a single trade entry (see Supplementaries’ Sawmill integration for more complete examples):

{
  "type": "moonlight:simple_trade",
  "input": { "item": "minecraft:emerald", "count": 8 },
  "output": { "item": "minecraft:diamond" },
  "max_trades": 3,
  "xp": 10
}

Moonlight Lib Modpack [1.20.1, 1.19.2, Forge, Fabric]

Developer APIs and Utilities

  • Block Color API – Dynamically detect the DyeColor of any modded block and retrieve the equivalent block in a different color, working for both blocks and items without pre‑registration.
  • Custom Map Markers – A full system for adding map decorations and map markers with full control over rendering, storage of arbitrary data inside map items, and a hook for item tooltips. Markers can also be registered via datapacks.
  • Global Datapacks & Model Loader Folder – Place global datapacks in moonlight-global-datapacks and special models in /assets/models/special_models.
  • Dynamic Villager AI – Easily add tasks and modify villager schedules without overriding the entire existing AI system. Also supports adding custom memory types.
  • Custom First & Third Person Animations – Implement a simple interface in your item class to define custom animations (similar to crossbows), with callbacks for rendering the item itself (like a spyglass).
  • Global Datapacks Folder – Reference above.
  • Debug Renderers Command – Built‑in command for toggling debug renderers during development.
Grindstone achievement triggers: The mod adds a custom trigger that gets called when an item is passed through a grindstone that you can call in your mods advancements jsons
Soft fluid system: An entirely Data Driven custom virtual fluid system that goes on top of forge one and is designed to fit better in vanilla minecraft and having as main feature the ability to have multiple fluid containers items like bottles, bowls and buckets, as well as providing support for stews and drinks that can be consumed directly from a fluid tank. As opposed to the forge fluid system it has a base unit of 1 minecraft bottle (250 forge mb). The system also automatically generates all the needed fluids for already registered forge fluids and allows the user to override them or add to them easily. Fluids are virtual so they can only exist in modded container specifically for them

Project Support Overview

Moonlight Library is a free, open‑source mod developed by MehVahdJukaar. Community support and additional resources are available through the mod’s official channels.

Moonlight Lib Modpack [1.20.1, 1.19.2, Forge, Fabric]
Moonlight Lib Modpack [1.20.1, 1.19.2, Forge, Fabric]

Accompanying Mods

Moonlight Library is part of a series of mods by MehVahdJukaar, including Supplementaries, Decor Blocks, and others.

Quick Answers

What is Moonlight Lib used for?

It’s a shared library for mods like Supplementaries, providing dynamic assets, multiloader support, and more.

Is Moonlight Lib a mod or a modpack?

It’s a library mod that many other mods depend on. This pack simply contains the library for easy installation.

CurseForge Creator

Project author

MehVahdJukaar

Original CurseForge creator profile for this project.

Available Files

  • moonlight-1.20-2.16.32-forge.jar 1.20.1 • 1.3 MB
    Choose File
  • moonlight-1.20-2.16.32-fabric.jar 1.20.1 • 1.3 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.7.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.7.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.6.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.6.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.6.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-1.20-2.16.31-forge.jar 1.20.1 • 1.3 MB
    Choose File
  • moonlight-1.20-2.16.31-fabric.jar 1.20.1 • 1.3 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.5.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.5.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.4.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.4.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.3.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.3.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.2.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.2.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-fabric-1.21.1-3.0.1.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.1.jar 1.21.1 • 1.5 MB
    Choose File
  • moonlight-neoforge-1.21.1-3.0.0-beta.jar 1.21.1 • 1.5 MB
    Choose File
Related Resources

Keep exploring the same resource family

Mods 1.21.11, 1.21.10

JourneyMap [26.1.2] [1.21.11] [1.21.10]

Description Lost underground or just need a quick look around? JourneyMap adds a fullscreen map and a handy minimap to your screen. You can see where you are, where you’ve been, and what’s ahead. Besides, it tracks mobs, villages, and your own waypoints so you never lose your base again. What’s cool about this mod? […]

24.05.2026 0 downloads
Mods 1.21.11, 1.21.8

OptiFine HD [1.21.11] [1.20.6] [1.19.4] [1.16.5]

Mod Description Imagine building a massive castle while the game stutters at 15 FPS. With OptiFine HD, you get smooth 60 frames and beautiful shader shadows. This graphics optimization mod completely transforms the Minecraft experience. After installation, the video settings menu gains numerous new sliders. You can enable anti‑aliasing, dynamic textures (animated water without lag), […]

23.05.2026 0 downloads
Mods 1.20.1, 1.19.2

MrCrayfish’s Furniture [1.20.1] [1.19.4] [1.16.5] [1.12.2]

Mod Description You walk into your wooden house — and it’s empty. Boring, right? MrCrayfish’s Furniture fixes that. This mod adds a ton of furniture like tables, chairs, sofas, a TV, a computer, and even kitchen stuff. Your base instantly feels alive. Place a comfy sofa next to a fireplace or set up a computer […]

23.05.2026 0 downloads
Mods 1.21.11, 1.21.8

Breaking Place [26.1.2] [1.21.11]

Description Imagine placing a block and watching it shatter into tiny particles. That’s exactly what Breaking Place does. This mod causes the same particle effect that normally appears when you break a block—now it triggers every time you place one. The mod is extremely lightweight and puts no strain on the game, making it suitable […]

19.05.2026 15 downloads
Community

No comments yet

Join the discussion

Your email address will not be published. Required fields are marked *