Links
Tags
Creators
Details
26.1.2.5-beta
Compatibility
Changes
MoonlightCore 26.1.2.5-beta
Fixes
- Fixed events not being all invoked on fabric
- 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:
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 FluidRenderHandlers
FluidRenderHandler
Handles the tooltip used with the tooltip and the color of the fluid
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:6MSffsOL:85DcvFfQ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:6MSffsOL:85DcvFfQ"
}

