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
FTB Presents SkyFactory 3 FTB Presents SkyFactory 3 All the Mods 6 - ATM6 All the Mods 6 - ATM6 MC  Eternal MC Eternal Crazy Craft Updated Crazy Craft Updated FTB Presents Stoneblock 2 FTB Presents Stoneblock 2 Project Ozone 3 A New Way Forward Project Ozone 3 A New Way Forward Dungeons, Dragons and Space Shuttles Dungeons, Dragons and Space Shuttles SteamPunk [LPS] SteamPunk [LPS] FTB Beyond FTB Beyond InsaneCraft Modpack InsaneCraft Modpack Modern Skyblock 3: Departed Modern Skyblock 3: Departed Solo Leveling - Reawakening Solo Leveling - Reawakening All the Mods 6 - To the Sky - ATM6sky - Skyblock All the Mods 6 - To the Sky - ATM6sky - Skyblock Star Technology Star Technology Abyssal Ascent Abyssal Ascent Divine Journey 2 Divine Journey 2 DarkRPG - RPG with Vampires, Dragons, Magic, Quests, Adventure DarkRPG - RPG with Vampires, Dragons, Magic, Quests, Adventure FTB Infinity Lite 1.10 FTB Infinity Lite 1.10 Modern Skyblock 2 Modern Skyblock 2 MeatballCraft, Dimensional Ascension MeatballCraft, Dimensional Ascension OccultCraft OccultCraft Ragnamod VI Ragnamod VI Age of Engineering Age of Engineering FTB Presents HermitPack FTB Presents HermitPack Age of Fate Age of Fate Project Ozone Lite Project Ozone Lite Stacia 2 Expert Stacia 2 Expert Project Infinity 0.1 Project Infinity 0.1 Mystical Block Mystical Block Monifactory Monifactory Ragnamod V Ragnamod V Jurassic World Reborn II Jurassic World Reborn II Ocean Outlast Ocean Outlast GreedyCraft GreedyCraft Tensura Neo Otherworld Tensura Neo Otherworld MC Ultimato MC Ultimato The Ancient Dawn - Prehistoric Journey The Ancient Dawn - Prehistoric Journey TNP Limitless 8 - LL8 TNP Limitless 8 - LL8 Arcadia [RPG] Arcadia [RPG] Enigmatica 2: Expert - Extended Enigmatica 2: Expert - Extended            AMP - Sky of Diamonds! AMP - Sky of Diamonds! Farmopolis Farmopolis Crazy Craft Updated Lite Crazy Craft Updated Lite Ozone Skyblock Reborn Ozone Skyblock Reborn Stacia Expert Stacia Expert TNP Limitless 6 - LL6 TNP Limitless 6 - LL6 TNP Limitless 5 - LL5 TNP Limitless 5 - LL5 TNP Limitless 7 - LL7 TNP Limitless 7 - LL7 EggBlock EggBlock TNP Limitless 3 - LL3 TNP Limitless 3 - LL3 MYTHCRAFT 5 MYTHCRAFT 5 FTB Skyfactory Challenges FTB Skyfactory Challenges Encrypted_ Encrypted_ Infinity Evolved: Reloaded Infinity Evolved: Reloaded Not Too Complicated 2 Not Too Complicated 2 All the Mods: All the Magic - ATM All the Mods: All the Magic - ATM Avaritia Adventures Remake Avaritia Adventures Remake Astroblock 2 - Lost in Space Astroblock 2 - Lost in Space Ragnamod VII Ragnamod VII Concatenation Concatenation Ice and Fire Magic Ice and Fire Magic Chroma Sky 2 Chroma Sky 2 Project Equivalence Project Equivalence Cookiemon - Pokemon Cobblemon RPG & Cookies Cookiemon - Pokemon Cobblemon RPG & Cookies Sky Alchemy Sky Alchemy Opolis Inc Opolis Inc From Magic To Tech From Magic To Tech Forever Factory Forever Factory The Decursio Project - Expert The Decursio Project - Expert NanoMagic NanoMagic MC DripCraft MC DripCraft Harvest Moon "Halloween" Harvest Moon "Halloween" Infinity-Craft Infinity-Craft A Distant Journey A Distant Journey Multiblock Madness Multiblock Madness Expedition In The Sky Expedition In The Sky Chroma Technology 2 Chroma Technology 2 The Final Frontier 2 The Final Frontier 2 Survive 100 days in all horror Survive 100 days in all horror Ultimate Progression Ultimate Progression Azuria RockBlock 3 Azuria RockBlock 3 Stranded On Earth Stranded On Earth StonksCraft 2 StonksCraft 2 bombs, guns, and planes bombs, guns, and planes Mystic's Monstrosity Mystic's Monstrosity Frozenopolis Frozenopolis Ultimate Progression: Sky Ultimate Progression: Sky The Trial of God The Trial of God Hypothermia Hypothermia Dungeons, Dragons and Space Shuttles 2 Dungeons, Dragons and Space Shuttles 2 Mystical Skies Mystical Skies Ragnamod VI In the Sky Ragnamod VI In the Sky Chroma Technology Chroma Technology Odyssey: Space - A New Beginning Odyssey: Space - A New Beginning FTB Skies FTB Skies EMC Sky Maker EMC Sky Maker Haven: CaveBlock Haven: CaveBlock The Biggest Modpack The Biggest Modpack Creative Drawers Producer Creative Drawers Producer Rhinocraft Rhinocraft

External Resources