Ploceus: Difference between revisions
m (Update Categorization to differentiate between Mod & Toolchain development) |
Space Walker (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
Ploceus | = Ploceus = | ||
Ploceus is a [https://gradle.org/ Gradle] plugin. It is an extension to [https://wiki.fabricmc.net/documentation:fabric_loom Loom] that configures projects for Orntihe mod development. | |||
=== Using Ploceus | == Features == | ||
The easiest option to make use of Ploceus is to start with [https://github.com/OrnitheMC/ornithe-template | |||
==== 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|Calamus]] intermediary. | |||
* Upgrading Minecraft libraries. | |||
* Adding additional Minecraft libraries. | |||
==== Additional features ==== | |||
* Depending on [[Ornithe Standard Libraries|OSL]]. | |||
* Using [[Feather Mappings|Feather]] mappings. | |||
* Applying [[Nests|inner class patches]]. | |||
* Applying [[Sparrow|generic type signature patches]]. | |||
* Applying [[Raven|throws clause patches]]. | |||
* Applying [[Condor|LVT patches]]. | |||
* Applying [[Preen|miscellaneous de-obfuscation patches]]. | |||
== Using Ploceus == | |||
The easiest option to make use of Ploceus is to start with [https://github.com/OrnitheMC/ornithe-mod-template Ornithe's Mod Template]. | |||
Should you need to add it to an already existing project these steps should cover your needs: | Should you need to add it to an already existing project these steps should cover your needs: | ||
Line 13: | Line 27: | ||
==== Adding Ornithe's maven repository for plugin resolution ==== | ==== Adding Ornithe's maven repository for plugin resolution ==== | ||
<code>settings.gradle</code> | <code>settings.gradle</code> | ||
pluginManagement { | pluginManagement { | ||
Line 45: | Line 58: | ||
id("ploceus") version "<version>" | 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 <code>1.10-SNAPSHOT</code>, the Ploceus version must be <code>1.10-SNAPSHOT</code>. | |||
== Configuring Ploceus == | |||
The latest versions for the relevant dependencies can be found on the [https://ornithemc.net/develop 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 <code>fabric/split</code> 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. | |||
<code>build.gradle</code> | |||
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 | |||
} | |||
<code>build.gradle.kts</code> | |||
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|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 <code>mappings</code> dependency as follows. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
mappings ploceus.featherMappings(<Feather build>) | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
mappings(ploceus.featherMappings(<Feather build>)) | |||
} | |||
To use MCP mappings, add the <code>mappings</code> dependency as follows. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
mappings ploceus.mcpMappings(<MCP channel>, <Minecraft version>, <MCP build>) | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
mappings(ploceus.mcpMappings(<MCP channel>, <Minecraft version>, <MCP build>)) | |||
} | |||
==== OSL ==== | |||
[[Ornithe Standard Libraries|OSL]] provides hooks and events for modding with Ornithe. To use OSL, add the dependency as follows. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
ploceus.dependOsl(<OSL version>) | |||
// ploceus.dependOsl(<configuration>, <OSL version>) // default configuration is modImplementation | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
ploceus.dependOsl(<OSL version>) | |||
// ploceus.dependOsl(<configuration>, <OSL version>) // default configuration is modImplementation | |||
} | |||
You may also depend on individual OSL modules. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
ploceus.dependOslModule(<OSL version>, <module name>) | |||
// ploceus.dependOslModule(<configuration>, <OSL version>) // default configuration is modImplementation | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
ploceus.dependOslModule(<OSL version>, <module name>) | |||
// ploceus.dependOslModule(<configuration>, <OSL version>, <module name>) // default configuration is modImplementation | |||
} | |||
==== Nests ==== | |||
[[Nests|Nests]] are Ornithe's inner classes patches. To apply these patches, add the <code>nests</code> dependency as follows. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
nests ploceus.nests(<Nests build>) | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
nests(ploceus.nests(<Nests build>)) | |||
} | |||
==== Sparrow ==== | |||
[[Sparrow|Sparrow]] is Ornithe's generic type signatures patch. To apply these patches, add the <code>signatures</code> dependency as follows. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
signatures ploceus.sparrow(<Sparrow build>) | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
signatures(ploceus.sparrow(<Sparrow build>)) | |||
} | |||
==== Raven ==== | |||
[[Raven|Raven]] is Ornithe's throws clauses patch. To apply these patches, add the <code>exceptions</code> dependency as follows. | |||
<code>build.gradle</code> | |||
dependencies { | |||
... | |||
exceptions ploceus.raven(<Raven build>) | |||
} | |||
<code>build.gradle.kts</code> | |||
dependencies { | |||
... | |||
exceptions(ploceus.raven(<Raven build>)) | |||
} | |||
[[Category:Mod Development]] | [[Category:Mod Development]] |
Revision as of 12:34, 29 July 2025
Ploceus
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
- Depending on OSL.
- Using Feather mappings.
- Applying inner class patches.
- Applying generic type signature patches.
- Applying throws clause patches.
- Applying LVT patches.
- Applying miscellaneous de-obfuscation patches.
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>)) }