Modscraper Modscraper Minecraft
HammerLib logo

HammerLib

Mod

by Zeith

Library used by all of DragonForge team's mods.

Type

Mod

CurseForge Downloads

58,323,699

CurseForge ID

247401

Modrinth Downloads

884,982

Modrinth ID

PlkSuVtM

Last Updated

Nov 7, 2026

Description

full_247401_downloads.svg247401_all.svg

Utility mod that contains really useful code for quite a few mods.

This library provides:

  • Simple, annotation-based content registration.
    • For Blocks, HammerLib automagically registers BlockItem(s). If you want to disable BlockItem(s), let your block implement INoItemBlock, ICustomBlockItem, or ICreativeTabBlock, depending on what you want to achieve.
    • For BlockEntity rendering, custom BlockEntityType constants may have additional @TileRenderer, pointing to an IBESR<Tile> class.
  • Old-styled language parsers in format of "key=value", instead of JSONs (the file names and format is like in older game versions, but you need to call LanguageAdapter.registerMod(MOD_ID); inside your mod's constructor for it to register.
  • Mod Source checks, that allow you to check if the mod was downloaded from adware/malware sites, AND warn users about it.
  • Java-based recipe registration with a simple RegisterRecipesEvent, that runs on HammerLib.EVENT_BUS, allowing you, as a developer, to register crafting recipes like before, with code.
  • Java-based tag population, with BuildTagsEvent, that runs on HammerLib.EVENT_BUS.
  • Vastly simplified networking, using Network class, and IPacket + INBTPacket to allow for flawless and intuitive packet code development.
  • Wrappers for block harvesting, that has been moved over to tags - BlockHarvestAdapter
  • Field-based NBT serialization, so that you don't make a typo/forget to write serialization/deserialization code.
  • Good old TileEntity wrappers, with TileSyncable and TileSyncableTickable, that allow synchronization of initial state, as well as registering properties that will be synchronized independently.
  • ContainerAPI for BlockEntities, allowing to avoid MenuType<?> altogether (no need to register screen providers, menu types etc)
  • ItemStack -> Color[] API, with TexturePixelGetter.getAllColors
  • Annotation-based custom model loaders (@LoadUnbakedGeometry on IUnbakedGeometry<SELF>), avoids using the geometry loader class by making a common wrapper.
  • ...And a whole lot more!

And a lot of rich features for mod devs.

Not enough? You can just view sources on  GitHub, it's free!

Permissions:

  • You can use this mod in your modpack.
  • Yes, you are allowed to build a mod that requires and depends on HammerLib, but not embeds it!
  • You are not allowed to repost this mod to other sites without providing a CurseForge/Modrinth download link and my permission (zeitheron.png Zeitheron on Discord)
  • You are not allowed to include this (or any other mods of DragonForge team) in your own mod. Building addons, however, is allowed, but a friendly PM would be good.

Note:

  • The only supported version of minecraft is the latest one that this mod exists for. DO NOT ASK TO DOWNGRADE!

dev.png

Join the discord server and follow Zeitheron on twitter.icoTwitter!

If you would like to support my work, you can become a patron via  Patreon. 

Compatibility

Mod Loaders

Client Neoforge Server

Game Versions

1.21 1.21.1

Recommended Gear

Affiliate

Hardware and extras that pair well with this mod.

As an Amazon Associate I earn from qualifying purchases.

Screenshots

Similar Mods

Included in Modpacks (578)

Show fewer
Svět Draků (Svet Draku) Svět Draků (Svet Draku) Technocratica Technocratica Zombie Apocalypse Of DOOM! Zombie Apocalypse Of DOOM! A New Technological Era A New Technological Era Arcania Origins Arcania Origins Fresh & Cozy Fresh & Cozy Unique-Social Build Your City 2 Unique-Social Build Your City 2 Galacticraft ULTRA Galacticraft ULTRA Chaos OneBlock Chaos OneBlock Kabbalah Block Kabbalah Block Halo Quest Halo Quest Enchanted Oasis! Enchanted Oasis! Survive in the Sky Survive in the Sky BeanPack: Regurgitated BeanPack: Regurgitated Knights, Mages, and Pirates Oh! My Knights, Mages, and Pirates Oh! My Progressionistic Progressionistic Egged Up Egged Up Factory in the Sky 3 Factory in the Sky 3 MasterTech: Hollow Beginning MasterTech: Hollow Beginning Nuclear Earth: Reirradiated Nuclear Earth: Reirradiated OPSkies 2 OPSkies 2 Arcreux - Enhanced Pixelmon Arcreux - Enhanced Pixelmon The Immersive Revolution The Immersive Revolution Songs of War Modpack Songs of War Modpack Multi Mites Multi Mites Cozy Meadows Cozy Meadows Crazycraft Alternate Universe Crazycraft Alternate Universe MultiSkyBlock 2 MultiSkyBlock 2 [DD&D] Dungeons Dragons & Dimensions [DD&D] Dungeons Dragons & Dimensions Mystical Block 2 Mystical Block 2 Compact World Expert Compact World Expert Omega Adventure Pack 1.12.2 Omega Adventure Pack 1.12.2 REVRB: Ruthless Enemies, Violent Redemption and Bosses REVRB: Ruthless Enemies, Violent Redemption and Bosses The Flash SMP The Flash SMP Community Community Realm of the Titans Realm of the Titans Wayne's Blood N Bones Wayne's Blood N Bones TokuNexoCraft - Rider Edition TokuNexoCraft - Rider Edition Inclusive Inclusive Infinity Reloaded: Skyblock Infinity Reloaded: Skyblock Maul The Odds - MTO Maul The Odds - MTO Dimensional Cultivation Dimensional Cultivation TFC Evolved TFC Evolved Tech & Trains Tech & Trains Summoner Delight Summoner Delight Miraculous SMP Miraculous SMP DivineRPG Server pack DivineRPG Server pack PixelGO - To the Sky 2 PixelGO - To the Sky 2 Narutocraft - By Gato Narutocraft - By Gato MCA And More MCA And More Crazycrafting For The Crazycrafting Server Crazycrafting For The Crazycrafting Server Sandbox in a Vacuum I SiaV Sandbox in a Vacuum I SiaV TerraFirmaQuest 3 TerraFirmaQuest 3 CrewModed CrewModed Concatenation Lite Concatenation Lite Ooga Booga: Caveman Evolution Ooga Booga: Caveman Evolution WayPoint WayPoint MineColony Enhanced MineColony Enhanced Zsombor's Zombie Apocalypse Zsombor's Zombie Apocalypse All The Neoforge All The Neoforge SimplePack 4 SimplePack 4 TekTopia Extended TekTopia Extended Stargate: ReLeveled Stargate: ReLeveled Shrek's Zombie Apocalypse FORGE 1.16.5/1.19.2 Shrek's Zombie Apocalypse FORGE 1.16.5/1.19.2 Parasites RPG Parasites RPG Level Border 2.0 Level Border 2.0 The Modded Rizoma MC The Modded Rizoma MC Super Stupidity Super Stupidity AdvoTech JJThunder AdvoTech JJThunder BeckBroPack BeckBroPack Manufactio - Casual Mode Manufactio - Casual Mode Wuxiacraft the Immortal Era Wuxiacraft the Immortal Era Minenufactory Minenufactory Waifu H [MCW] Waifu H [MCW] Aliens Vs Predator: The Reckoning Aliens Vs Predator: The Reckoning Dungeon Warfare - FUN RPG | Firearms and RPG! Dungeon Warfare - FUN RPG | Firearms and RPG! Picky Picky AtariKafa FabrikaCraft S1 AtariKafa FabrikaCraft S1 Prison Escape - Beginnings (reborn) Prison Escape - Beginnings (reborn) Apotheosis: Path of Ascension Apotheosis: Path of Ascension Mods, ores, and magic Mods, ores, and magic MythicCraft 1.12.2 [FORGE] - RPG Modpack MythicCraft 1.12.2 [FORGE] - RPG Modpack Moni&ProjectE Moni&ProjectE Technology empty Island Technology empty Island Parasites made by forgelabs but with modern warfare scps and more Parasites made by forgelabs but with modern warfare scps and more Hommage Hommage Farmy Skyblock Farmy Skyblock solo leveling reawakening evolved Anime solo leveling reawakening evolved Anime Singularity Create Singularity Create Community in the Skies Community in the Skies Greg-E Greg-E FreakCraft - CrazyCraft Inspired FreakCraft - CrazyCraft Inspired Pixelmon+ Pixelmon+ Aphmau's World Aphmau's World Refined Pack 2 Refined Pack 2 Lost Cities: Too Many Mods Lost Cities: Too Many Mods RockTown Tech World Sky Block RockTown Tech World Sky Block The Cyborg Runner The Cyborg Runner Sniper-assassin Sniper-assassin Tekkit Classic + Tekkit Classic +

External Resources