All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Moonlight Core

Moonlight Core

by RealLeoxian • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

MoonlightCore its a library mod for mod developers to simplify the development of multi-loader mods, providing a set of abstractions of loader-specific APIs and self-provided APIs

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.1.x
Neoforge
12d ago 1
26.1.x
Fabric
12d ago 1
26.1.x
Fabric
12d ago 1
26.1.x
Neoforge
12d ago 1
26.1.x
Fabric
16d ago 1
26.1.x
Neoforge
16d ago 1
26.1.x
Fabric
16d ago 1
26.1.x
Neoforge
16d ago 1
26.1.x
Fabric
21d ago 1
26.1.x
Neoforge
21d ago 1
26.1.x
Fabric
1mo ago 1
26.1.x
Neoforge
1mo ago 1
26.1.x
Neoforge
1mo ago 1
26.1.x
Fabric
1mo ago 1
26.1.x
Fabric
2mo ago 1
26.1.x
Neoforge
2mo ago 1
26.1.x
Fabric
2mo ago 1
26.1.x
Neoforge
2mo ago 1
26.1.x
Fabric
2mo ago 1
26.1.x
Neoforge
2mo ago 1
26.1.x
Neoforge
2mo ago 1
26.1.x
Fabric
2mo ago 1
26.1.x
Fabric
2mo ago 1
26.1.x
Neoforge
2mo ago 1
1.20.1
Fabric
11mo ago 1
1.20.1
Forge
11mo ago 1
1.20.1
Fabric
11mo ago 1
1.20.1
Forge
11mo ago 1
1.20.1
Fabric
11mo ago 1
1.20.1
Forge
11mo ago 1
1.20.1
Fabric
11mo ago 1
1.20.1
Fabric
11mo ago 1
1.20.1
Forge
11mo ago 1
1.20.1
Forge
11mo ago 1
1.20.1
Fabric
11mo ago 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Forge
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Neoforge
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Neoforge
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Neoforge
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Neoforge
last yr. 1
1.21.1
Neoforge
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Neoforge
last yr. 1
1.21.1
Fabric
last yr. 1
# MoonlightCore 26.1.2.12-beta

  • GlobalStorage was renamed to GlobalDataStorage
  • To get a GlobalDataStorage it's factory must be registered using GlobalDataStorageRegistrar
  • GlobalDataStorage#getOrCreate now only gets an id
  • Now GlobalDataStorages cannot be registered once the server is starting
# MoonlightCore 26.1.2.12-beta

  • GlobalStorage was renamed to GlobalDataStorage
  • To get a GlobalDataStorage it's factory must be registered using GlobalDataStorageRegistrar
  • GlobalDataStorage#getOrCreate now only gets an id
  • Now GlobalDataStorages cannot be registered once the server is starting
# MoonlightCore 26.1.2.11-beta

  • Added syncData method on DataAttachmentHolder
  • Added GlobalStorage interface to have global data across the server
# MoonlightCore 26.1.2.11-beta

  • Added syncData method on DataAttachmentHolder
  • Added GlobalStorage interface to have global data across the server
# MoonlightCore 26.1.2.10-beta

  • Fixed codec on Neoforge's data attachment implementation
# MoonlightCore 26.1.2.10-beta

  • Fixed codec on Neoforge's data attachment implementation
# MoonlightCore 26.1.2.9-beta

  • Fixed DataComponents stream codec generics
# MoonlightCore 26.1.2.9-beta

  • Fixed DataComponents stream codec generics
# MoonlightCore 26.1.2.8-beta

  • Removed addTask method from ServerConfigurationNetworking, now having to use BEFORE_CONFIGURE and CONFIGURE events to register custom configuration tasks
  • Added completeTask method on ServerConfigrationNetowking$Context
  • Packet payload type registration got split from the handler registration, now to register a packet payload you have to use PayloadTypeRegister static methods and use registerHandler method from networking classes ([Client/Server][Configuration/Play]Networking)
  • Fixed an error on NeoForge with FluidModel$Unbaked model trying to be loaded from dedicated server
  • Internal changes to config synchronization now being fully at PLAY phase, avoiding problems with race conditions between CONFIGURATION and PLAY
  • Now mods don't have to register their mod's EventBus neither DeferredRegistrar
  • Added Attachments layer abstraction, you can build your own using DataAttachmentType and get them using DataAttachmentHolder#of
# MoonlightCore 26.1.2.8-beta

  • Removed addTask method from ServerConfigurationNetworking, now having to use BEFORE_CONFIGURE and CONFIGURE events to register custom configuration tasks
  • Added completeTask method on ServerConfigrationNetowking$Context
  • Packet payload type registration got split from the handler registration, now to register a packet payload you have to use PayloadTypeRegister static methods and use registerHandler method from networking classes ([Client/Server][Configuration/Play]Networking)
  • Fixed an error on NeoForge with FluidModel$Unbaked model trying to be loaded from dedicated server
  • Internal changes to config synchronization now being fully at PLAY phase, avoiding problems with race conditions between CONFIGURATION and PLAY
  • Now mods don't have to register their mod's EventBus neither DeferredRegistrar
  • Added Attachments layer abstraction, you can build your own using DataAttachmentType and get them using DataAttachmentHolder#of
# MoonlightCore 26.1.2.7-beta

  • Fix weird error at configuration-phase sync config task when joining a world
  • Removed XPlat ModEntrypoint and ClientModEntrypoint, now fabric platform must implement MoonlightCoreInitializer
  • Added BEFORE_CONFIGURE and CONFIGURE connection events, removing RegisterConfigurationTasksEvent
  • Removed old way of registering things, now using NewRegistryEvent and RegisterEvent
  • Registrar was replaced with RegistryHelper
  • Removed initializeMod methods from client and common
  • RegistryBuilder now returns a supplier with the registry
# MoonlightCore 26.1.2.7-beta

  • Fix weird error at configuration-phase sync config task when joining a world
  • Removed XPlat ModEntrypoint and ClientModEntrypoint, now fabric platform must implement MoonlightCoreInitializer
  • Added BEFORE_CONFIGURE and CONFIGURE connection events, removing RegisterConfigurationTasksEvent
  • Removed old way of registering things, now using NewRegistryEvent and RegisterEvent
  • Registrar was replaced with RegistryHelper
  • Removed initializeMod methods from client and common
  • RegistryBuilder now returns a supplier with the registry
# MoonlightCore 26.1.2.6-beta

  • Fabric platform implementation was improved
  • Added ClientTooltipComponentRegistrar
  • Added ResourceStacksStorage to use built-in ResourceStack
  • Added convention tags (c: tags)
  • ArgumentTypeRegistrar no longer needs a namespace
  • init methods from registrars were renamed to configure
  • Fluids API is no longer marked as experimental
  • removed canRiddenMobsFloat from FluidBehavior
  • Added Javadoc

# MoonlightCore 26.1.2.6-beta

  • Fabric platform implementation was improved
  • Added ClientTooltipComponentRegistrar
  • Added ResourceStacksStorage to use built-in ResourceStack
  • Added convention tags (c: tags)
  • ArgumentTypeRegistrar no longer needs a namespace
  • init methods from registrars were renamed to configure
  • Fluids API is no longer marked as experimental
  • removed canRiddenMobsFloat from FluidBehavior
  • Added Javadoc

# MoonlightCore 26.1.2.5-beta

## Fixes
1. Fixed events not being all invoked on fabric
2. Fixed valid configurations requests task not being completed (only caused problems on fabric apparently???), preventing world load

## Fluid Registration API
The previous version Fluid Registration API was BAD, I had already noticed that when I made the first
version but IDK why I even released it. HOWEVER, here is the new (still experimental) fluid registration api.

### Common

#### FluidRegistrar
A registrar for fluids, moving from the Platform#registerFluid methods to
its own interface. Fluids need their properties, attribute handler, tag and behavior. Example:

``java
TagKey<Fluid> TAG = TagKey.create(Registries.FLUID, Identifier.parse("moonlightcore:slime"));

FluidRegistrar.init("examplemod",registrar -> {
registrar.register(
"slime",
TAG,
FluidProperties.DEFAULT,
FluidAttributesHandler.DEFAULT,
FluidBehavior.WATER_LIKE
);
});
`

#### FluidBehavior
FluidBehavior handles how the entity interacts with the fluid, how the entity will move, if
it can swim, drown, supports boats, sprinting, etc. Anyways, not everyone will have some
hyper mega advanced fluid physics applied to the entities so there is a builder for
simple fluids :p

#### FluidAttributesHandler
Handle some properties that are used on Neoforge and on Fabric:
  • Display name and it's color
  • Bucket fill/empty sound
  • Fall distance modifier
  • Light emission level
  • Temperature
  • Viscosity

### Client

#### FluidRendererRegistrar
A registrar for fluids rendering, used to register fluid models and
FluidRenderHandler`s

#### FluidRenderHandler
Handles the tooltip used with the tooltip and the color of the fluid
# MoonlightCore 26.1.2.5-beta

## Fixes
1. Fixed events not being all invoked on fabric
2. Fixed valid configurations requests task not being completed (only caused problems on fabric apparently???), preventing world load

## Fluid Registration API
The previous version Fluid Registration API was BAD, I had already noticed that when I made the first
version but IDK why I even released it. HOWEVER, here is the new (still experimental) fluid registration api.

### Common

#### FluidRegistrar
A registrar for fluids, moving from the Platform#registerFluid methods to
its own interface. Fluids need their properties, attribute handler, tag and behavior. Example:

``java
TagKey<Fluid> TAG = TagKey.create(Registries.FLUID, Identifier.parse("moonlightcore:slime"));

FluidRegistrar.init("examplemod",registrar -> {
registrar.register(
"slime",
TAG,
FluidProperties.DEFAULT,
FluidAttributesHandler.DEFAULT,
FluidBehavior.WATER_LIKE
);
});
`

#### FluidBehavior
FluidBehavior handles how the entity interacts with the fluid, how the entity will move, if
it can swim, drown, supports boats, sprinting, etc. Anyways, not everyone will have some
hyper mega advanced fluid physics applied to the entities so there is a builder for
simple fluids :p

#### FluidAttributesHandler
Handle some properties that are used on Neoforge and on Fabric:
  • Display name and it's color
  • Bucket fill/empty sound
  • Fall distance modifier
  • Light emission level
  • Temperature
  • Viscosity

### Client

#### FluidRendererRegistrar
A registrar for fluids rendering, used to register fluid models and
FluidRenderHandler`s

#### FluidRenderHandler
Handles the tooltip used with the tooltip and the color of the fluid
# MoonlightCore 26.1.2.4-beta

### Fluid registration API
An small very experimental API that allows the registration and configuration of some properties
of modded fluids. Works with a workaround of the vanilla Fluid methods, using MoonlightFluid as
an intermediary.

This API its very experimental and I managed to implement it on Neoforge but Fabric still needs
some work.

### Misc
  • Added DatapackRegistryRegistrar#init, I forgot it on the previous release, sorry.
# MoonlightCore 26.1.2.4-beta

### Fluid registration API
An small very experimental API that allows the registration and configuration of some properties
of modded fluids. Works with a workaround of the vanilla Fluid methods, using MoonlightFluid as
an intermediary.

This API its very experimental and I managed to implement it on Neoforge but Fabric still needs
some work.

### Misc
  • Added DatapackRegistryRegistrar#init, I forgot it on the previous release, sorry.
# MoonlightCore 26.1.2.3-beta
  • Added support to add dynamic/datapack registries via DataPackRegistryRegistrar
  • Added HolderLookup$Provider access to server reload listeners
# MoonlightCore 26.1.2.3-beta
  • Added support to add dynamic/datapack registries via DataPackRegistryRegistrar
  • Added HolderLookup$Provider access to server reload listeners
# MoonlightCore | 5.2.13

Hotfix to the fabric version: An error on a mixin, mb.
# MoonlightCore | 5.2.12

1. Classes like NonnullSupplier, NonnullConsumer, NonnullFunction, etc, and registry entry builders
were removed
2. DeferredRegistrar was simplified, now there is no callback system since there is no longer
builders that use them
# MoonlightCore | 5.2.12

1. Classes like NonnullSupplier, NonnullConsumer, NonnullFunction, etc, and registry entry builders
were removed
2. DeferredRegistrar was simplified, now there is no callback system since there is no longer
builders that use them
# MoonlightCore | 5.2.11

Fixed a (very dumb (VERY DUMB)) error on SnapshotJournal, srry
# MoonlightCore | 5.2.11

Fixed a (very dumb (VERY DUMB)) error on SnapshotJournal, srry
# MoonlightCore | 5.2.10

1. Small change to the Fabric's registry order (still vanilla goes the same order first) so the RegistryCreationEvent
adds the new registries to that order and are invoked.

2. Added the RegisterClientCommandEvent to allow mods add their own commands to only the client side.
# MoonlightCore | 5.2.10

1. Small change to the Fabric's registry order (still vanilla goes the same order first) so the RegistryCreationEvent
adds the new registries to that order and are invoked.

2. Added the RegisterClientCommandEvent to allow mods add their own commands to only the client side.
# MoonlightCore | 5.1.9

This version is a hotfix to the Fabric's version registry order, now being based on the vanilla
one instead of thar kind of "port" (?) of the Forge's registry order
# MoonlightCore | 5.1.9

This version is a hotfix to the Fabric's version registry order, now being based on the vanilla
one instead of thar kind of "port" (?) of the Forge's registry order
# MoonlightCore | 5.1.8

## 1. Transfer API:
The transfer API had some additions, changes and cleanup to its code:

### Additions:
  • Added methods to simulate insert/extract methods from StorageIO classes that won't perform any action than calculate the result value

  • Added some new storages and wrappers:
  • RangedStorage
  • SingleItemResourceStorage
  • SingleItemStorage
  • CursorSlotWrapper
  • SingleFluidStorage

### Changes:
  • Now the transactional methods like insert/extract don't need strictly a Transaction and can take a
TransactionContext instead
  • Now the Storage interface (and subclasses/sub-interfaces) don't strictly need a TransferResource and can take instead any kind
of value specified without needing to implement TransferResource (this with most of the subclasses, there are some that still need it)

## 2. Registry

## Additions:
  • Added some Registrate (Tterrag1098's Registrate) builders for the entries, this may be util for its methods (basic things that
may not need a special-case builder still need to use the DeferredRegistrar#register method)

### Changes:
  • Replaced RegistryHelper with DeferredRegistrar which manages better the registry entries
  • RegistryEntry now only takes the key of the entry instead of key and value candidate
  • RegistryEntry now only implements NonnullSupplier that works with an inner holder now instead of a Supplier and cached value

## Miscellaneous

1. Added EntityEvent#ATTRIBUTE_CREATION that is invoked just before the CommonLifecycleEvent#SETUP event so you (modder) can create your entity's attributes
2. Returned the old AttachmentType$Builder class
3. Added ByteBufCodecs#fromCodec method to de/serialize data from an existing 'normal' Codec

Moonlight Core Icon
Download Moonlight Core
Select game version
Select platform