-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up Nylon
Wesley1808 edited this page Nov 15, 2023
·
4 revisions
Merge these into your build.gradle
file to add a dependency on Nylon.
Nylon requires certain Polymer modules aswell, which are included here.
repositories {
maven { url "https://api.modrinth.com/maven" } // Nylon
maven { url 'https://maven.nucleoid.xyz' } // Polymer
}
dependencies {
modImplementation "maven.modrinth:nylon:[NYLON_VERSION]"
modImplementation "eu.pb4:polymer-core:[POLYMER_VERSION]"
modImplementation "eu.pb4:polymer-networking:[POLYMER_VERSION]"
modImplementation "eu.pb4:polymer-resource-pack:[POLYMER_VERSION]"
modImplementation "eu.pb4:polymer-virtual-entity:[POLYMER_VERSION]"
// Useful for automatically handling resourcepacks in dev environment, but not required.
modRuntimeOnly "eu.pb4:polymer-autohost:[POLYMER_VERSION]"
}
It is important to make sure these dependencies are available at runtime.
You can do this by either adding these modules to your dependencies in fabric.mod.json
, or by including them in your jar file as Jar-in-Jar.
"nylon": "*",
"polymer-core": "*",
"polymer-networking": "*",
"polymer-virtual-entity": "*",
"polymer-resource-pack": "*"
Finally, make sure to add this in your mod initializer to tell Polymer to add your mods resource assets to the resourcepack.
PolymerResourcePackUtils.addModAssets("YOUR_MOD_ID");
PolymerResourcePackUtils.markAsRequired();