Ploceus

From Ornithe Wiki
Revision as of 13:03, 29 July 2025 by Space Walker (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ploceus is a Gradle plugin. It is an extension to Loom that configures projects for Orntihe mod development.

Features

Basic functionality

  • Expanding the Minecraft version support with a custom versions manifest.
  • Setting up Loom's intermediate mappings provider to use Ornithe's Calamus intermediary.
  • Upgrading Minecraft libraries.
  • Adding additional Minecraft libraries.

Additional features

Using Ploceus

The easiest option to make use of Ploceus is to start with Ornithe's Mod Template.

Should you need to add it to an already existing project these steps should cover your needs:

Adding Ornithe's maven repository for plugin resolution

settings.gradle

pluginManagement {
    repositories {
        /* ... (Other repositories) */
        maven { url = "https://maven.ornithemc.net/releases" }
        maven { url = "https://maven.orntithemc.net/snapshots"
    }
}

settings.gradle.kts

pluginManagement {
    repositories {
        /* ... (Other repositories) */
        maven("https://maven.ornithemc.net/releases")
        maven("https://maven.orntithemc.net/snapshots") 
    }
}

Apply the plugin

build.gradle

plugins {
    /* ... (Other plugins) */
    id "ploceus" version "<version>"
}

build.gradle.kts

plugins {
    /* ... (Other plugins) */
    id("ploceus") version "<version>"
}
Note

The major and minor Ploceus version must match the major and minor Loom version! For example, if the Loom version is 1.10-SNAPSHOT, the Ploceus version must be 1.10-SNAPSHOT.

Configuring Ploceus

The latest versions for the relevant dependencies can be found on the develop page on the website.

Split development environments

How you configure Ploceus depends on the Minecraft version you are developing for. Merged client-server development environments are not supported for Minecraft versions before 1.3. For these versions, you must configure Loom and Ploceus for a split development environment. You may use a sub-project structure (see the fabric/split branch on the Ornithe Mod Template) in order to develop both a client mod and a server mod in one project, or choose to develop a client-only or server-only mod.

In either case, you must configure Loom and Ploceus for a one-side-only development environment.

build.gradle

loom {
    ...
    clientOnlyMinecraftJar() // for a client-side-only (sub)project
//  serverOnlyMinecraftJar() // for a server-side-only (sub)project
}

ploceus {
    ...
    clientOnlyMappings() // for a client-side-only (sub)project
//  serverOnlyMappings() // for a server-side-only (sub)project
}

build.gradle.kts

loom {
    ...
    clientOnlyMinecraftJar() // for a client-side-only (sub)project
//  serverOnlyMinecraftJar() // for a server-side-only (sub)project
}

ploceus {
    ...
    clientOnlyMappings() // for a client-side-only (sub)project
//  serverOnlyMappings() // for a server-side-only (sub)project
}

Mappings

It is recommended to use Feather mappings for your mod development environment, though the use of MCP mappings is also supported for a handful of Minecraft versions.

To use Feather mappings, add the mappings dependency as follows.

build.gradle

dependencies {
    ...
    mappings ploceus.featherMappings(<Feather build>)
}

build.gradle.kts

dependencies {
    ...
    mappings(ploceus.featherMappings(<Feather build>))
}

To use MCP mappings, add the mappings dependency as follows.

build.gradle

dependencies {
    ...
    mappings ploceus.mcpMappings(<MCP channel>, <Minecraft version>, <MCP build>)
}

build.gradle.kts

dependencies {
    ...
    mappings(ploceus.mcpMappings(<MCP channel>, <Minecraft version>, <MCP build>))
}

OSL

OSL provides hooks and events for modding with Ornithe. To use OSL, add the dependency as follows.

build.gradle

dependencies {
    ...
    ploceus.dependOsl(<OSL version>)
//  ploceus.dependOsl(<configuration>, <OSL version>) // default configuration is modImplementation
}

build.gradle.kts

dependencies {
    ...
    ploceus.dependOsl(<OSL version>)
//  ploceus.dependOsl(<configuration>, <OSL version>) // default configuration is modImplementation
}

You may also depend on individual OSL modules.

build.gradle

dependencies {
    ...
    ploceus.dependOslModule(<OSL version>, <module name>)
//  ploceus.dependOslModule(<configuration>, <OSL version>) // default configuration is modImplementation
}

build.gradle.kts

dependencies {
    ...
    ploceus.dependOslModule(<OSL version>, <module name>)
//  ploceus.dependOslModule(<configuration>, <OSL version>, <module name>) // default configuration is modImplementation
}

Nests

Nests are Ornithe's inner classes patches. To apply these patches, add the nests dependency as follows.

build.gradle

dependencies {
    ...
    nests ploceus.nests(<Nests build>)
}

build.gradle.kts

dependencies {
    ...
    nests(ploceus.nests(<Nests build>))
}

Sparrow

Sparrow is Ornithe's generic type signatures patch. To apply these patches, add the signatures dependency as follows.

build.gradle

dependencies {
    ...
    signatures ploceus.sparrow(<Sparrow build>)
}

build.gradle.kts

dependencies {
    ...
    signatures(ploceus.sparrow(<Sparrow build>))
}

Raven

Raven is Ornithe's throws clauses patch. To apply these patches, add the exceptions dependency as follows.

build.gradle

dependencies {
    ...
    exceptions ploceus.raven(<Raven build>)
}

build.gradle.kts

dependencies {
    ...
    exceptions(ploceus.raven(<Raven build>))
}