Modscraper Modscraper Minecraft
HammerLib logo

HammerLib

Mod

by Zeith

Library used by all of DragonForge team's mods.

Type

Mod

CurseForge Downloads

58,324,431

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
DoomsDay Jurassic DoomsDay Jurassic Final Judgment : Save the world Final Judgment : Save the world Cherry Shrooms Cherry Shrooms Forge of the Ages Forge of the Ages ProjectS ProjectS Path to Exile - Next Generation Path to Exile - Next Generation Scape and Tech Operation Meteorite Scape and Tech Operation Meteorite Quartiere WGF Quartiere WGF Consume The World! Consume The World! Atelier Mythos Era Atelier Mythos Era TurtleCraftSMP TurtleCraftSMP Chime Time IX Chime Time IX Frisky Business: Powercraft Edition 2 Frisky Business: Powercraft Edition 2 Soulcraft‎‎‏‏‎ ‎ Soulcraft‎‎‏‏‎ ‎ FemboyFarm FemboyFarm Farmageddon Farmageddon Impostor Syndrome - Reimagined Impostor Syndrome - Reimagined Colony Equivalence Colony Equivalence All You Need - AYN All You Need - AYN GameGarden Ultimate GameGarden Ultimate EldenVoid EldenVoid Voloron 3 Voloron 3 Myths & Machinery Myths & Machinery Pixverse Pixverse Dungeons n' Bosses 2! Dungeons n' Bosses 2! Fun n' Guns Fun n' Guns Artemis Continuum Artemis Continuum Lite Sky Exchange (LSE) Lite Sky Exchange (LSE) STcraft STcraft Aeon Automata 2 Aeon Automata 2 Entropy Zero  Evolution Entropy Zero Evolution Actual Mobs (smarter and stronger mobs) Actual Mobs (smarter and stronger mobs) Tech & Survival Tech & Survival The Orange Block The Orange Block RepYS - Engine of Creation RepYS - Engine of Creation RPG - HORROR MODPACK RPG - HORROR MODPACK Wither Storm Optimization Wither Storm Optimization WAR AND NUKES WAR AND NUKES DaD-Dinosaurios y Dragones DaD-Dinosaurios y Dragones Liminal Paranoia Liminal Paranoia Farlands - Rising Farlands - Rising Superhero SMP Cross Addition Superhero SMP Cross Addition Valheim Explore Valheim Explore John Hall CEu Pack John Hall CEu Pack Changed World Changed World carcraft carcraft Dungeons & Dungeoneers! Dungeons & Dungeoneers! The Ultimate Limitless - TUL 2 The Ultimate Limitless - TUL 2 Neo's Scape Server Pack Neo's Scape Server Pack Endless Sky 2 Endless Sky 2 Project Eternity  A New Vision Project Eternity A New Vision Horror from the Zombie Horde Horror from the Zombie Horde CrazyMC - A Special Apocalypse | Apocalypse with Quests! CrazyMC - A Special Apocalypse | Apocalypse with Quests! Eterium Sky Infinity Eterium Sky Infinity Crazy Adventure Crazy Adventure NVPack NVPack GregTech: Supra - Transcendent GregTech: Supra - Transcendent Zomboid Craft Zomboid Craft SamuraiAdventure SamuraiAdventure OneBlock Evolution OneBlock Evolution The Ultimate Limitless - TUL The Ultimate Limitless - TUL EPiCCRAFT 2 (Remake) EPiCCRAFT 2 (Remake) Farlands - Origins Of The Olimpus Farlands - Origins Of The Olimpus Arkobia 2 Arkobia 2 Gregtech: Quantum Gregtech: Quantum MayemCraft MayemCraft Jujutsu Kaisen  A Sorcerer's Path Jujutsu Kaisen A Sorcerer's Path New Fantasy New Fantasy Ninjacat Skies Ninjacat Skies AVP Tech AVP Tech AntCraft | Avatar The Last Airbender AntCraft | Avatar The Last Airbender Sky Foodie Sky Foodie Virtu's Hack and Slash Virtu's Hack and Slash Winter Apokalypse Winter Apokalypse Crazy Scramble Craft Crazy Scramble Craft The Mainding - SaluoMT - Rutboy12 The Mainding - SaluoMT - Rutboy12 Tensura - Rebirth Tensura - Rebirth Vix Vix NonsenseCraft - Naruto NonsenseCraft - Naruto Winter Leveling Winter Leveling Attack of the new B-Team Attack of the new B-Team Pixelmon: Extra Adventures 2 Pixelmon: Extra Adventures 2 Stone to Tech Stone to Tech Tensura Super Reincarnated Tensura Super Reincarnated Warspire Warspire jcraft jcraft Xomaps RPG Xomaps RPG Era of Thaumaturgy Era of Thaumaturgy Dark Chocolate Edition Dark Chocolate Edition The Last Province zombie apocalypse The Last Province zombie apocalypse Mystic's Monstrosity - Immersive Edition Mystic's Monstrosity - Immersive Edition Cobblemon, Side by Side! (EARLY ACCESS) Cobblemon, Side by Side! (EARLY ACCESS) theajpack! theajpack! DracoNeo - Council of Wyrms DracoNeo - Council of Wyrms PureMash Tech PureMash Tech Enchantments Enchantments Dwarfz 6 Dwarfz 6 Superhero and Ben10 SMP Superhero and Ben10 SMP The RawffleVerse Reforged The RawffleVerse Reforged Leeum's Yogscast MoonQuest-REDUX Leeum's Yogscast MoonQuest-REDUX

External Resources