Skip to main content

The introduction to adding HammerLib to your workspace.

Getting Started

Warning!

This documentation describes HammerLib 1.19.2 and newer.

With that being said...

Prerequisites!

mods.toml

Add this piece of code to your mods.toml:

[[dependencies.mod_id]]
modId="hammerlib"
mandatory=true
versionRange="[19.3.76,)"
ordering="NONE"
side="BOTH"

Be sure to replace the 19.3.76 with the actual minimal version you require to run your mod.

public Mod() (your mod constructor)

Classic language files

If you want to continue using .lang files instead of .json files, you should register your mod to be treated with HammerLib's language adapter.

LanguageAdapter.registerMod("modid");