Skip to content

Getting Started

Initial Setup

It’s pretty easy to get The Broken Script set up for development. Here’s a template to get you going:

build.gradle.kts
repositories {
// All your repositories are here, then add:
maven("https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/")
maven("https://maven.fzzyhmstrs.me/")
maven("https://thedarkcolour.github.io/KotlinForForge/")
maven("https://api.modrinth.com/maven")
maven("https://maven.blamejared.com")
maven("https://maven.stardustmodding.org/public-snapshots/")
}
dependencies {
implementation("dev.wendigodrip:thebrokenscript:1.9.9-beta.1+mc1.21.1-build.1")
}

Adding the Dependency

Make sure to add the mod as a dependency to your neoforge.mods.toml!

neoforge.mods.toml
[[dependencies.${mod_id}]] # If you don't use variable replacements, replace '${mod_id}' with your mod ID.
modId = "thebrokenscript"
type = "REQUIRED"
versionRange = "[1.9.7,)"
ordering = "AFTER"
side = "BOTH"

Registries

The mod provides a convenient wrapper over many registries that makes the process of many things easier. Check out the RegistryWrapper class in the docs! To set this up, add this to your mod’s main class:

MyMod.kt
package com.example.mymod
import net.neoforged.fml.common.Mod
import thedarkcolour.kotlinforforge.neoforge.forge.MOD_BUS
import dev.wendigodrip.thebrokenscript.api.registry.RegistryWrapper
@Mod(MyMod.MOD_ID)
object MyMod {
const val MOD_ID: String = "my_mod"
val REGISTRAR = RegistryWrapper(MOD_ID)
init {
// Your code here...
// Maybe register some stuff! :)
REGISTRAR.setup(MOD_BUS)
}
}

Important Notes