Modscraper Modscraper Minecraft
HammerLib logo

HammerLib

Mod

by Zeith

Library used by all of DragonForge team's mods.

Type

Mod

CurseForge Downloads

58,325,152

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
Wendigos winter Wendigos winter DoomsDay Jurassic Survival DoomsDay Jurassic Survival Arkobia 3 Arkobia 3 Myths of Frost and Flame Myths of Frost and Flame Karmunism-Refugee Karmunism-Refugee Lumin Origins Lumin Origins Cobblemon Tokai Construction Pack Cobblemon Tokai Construction Pack Create Continents Create Continents Concatenation Lumineth Concatenation Lumineth Honkerton Honkerton Projet N-Tech Projet N-Tech ROLO Edition ROLO Edition Nightmare-Pack Sky Unlockt Nightmare-Pack Sky Unlockt Scape and Run PerplexApple Scape and Run PerplexApple AstroGregExsilium AstroGregExsilium Build Secure Protect Build Secure Protect TCC - Skyzone TCC - Skyzone Modled Modled Fryed's Adventure Pack Fryed's Adventure Pack Deanverse Heroes Deanverse Heroes CanarioLand 2 CanarioLand 2 Chaotic Modpack Chaotic Modpack Magecraft: A Gods Tale Magecraft: A Gods Tale Goonercraft: Industrial Goonercraft: Industrial Vertuo Hosting Modpack Vertuo Hosting Modpack TechJourney Expert TechJourney Expert PandaLand Pack PandaLand Pack AdvoTech Aeronautic AdvoTech Aeronautic Hero To Zero Hero To Zero Kat's Craft 2 Kat's Craft 2 SPELLCRAFT-SMP SPELLCRAFT-SMP Data Center in the Sky Data Center in the Sky NightWard - A multi-class RPG modpack NightWard - A multi-class RPG modpack Starfall Skies Starfall Skies Chaos Parasites Chaos Parasites Resurgence of the Damned: Further West Resurgence of the Damned: Further West Nic YOLO's Pixelmon 2 Nic YOLO's Pixelmon 2 Industrial Skies pack Industrial Skies pack SPORE - The Silent Decay SPORE - The Silent Decay Pixel Valley Pixel Valley Delusions Craft Delusions Craft Chronos Archives Chronos Archives Barely Modded But Still Fancy Barely Modded But Still Fancy Coasters, Airships and Magic, Oh My! Coasters, Airships and Magic, Oh My! The Sigmas Pack The Sigmas Pack Old Reliables 3.5 Old Reliables 3.5 Project Infinite Exchange Project Infinite Exchange WarCraft Reborn WarCraft Reborn FlatWorlds FlatWorlds Dungeon Arises Dungeon Arises solo leveling the ragnarok solo leveling the ragnarok Arkane 2 Arkane 2 Community in the Skies (with Origins) Community in the Skies (with Origins) Rosecraft Reforged Rosecraft Reforged Rural Factory Rural Factory SV_Adventures V3 SV_Adventures V3 AstralisProject! AstralisProject! Qilby Industries Qilby Industries Sarcasticraft Resurrection Sarcasticraft Resurrection bliblu bliblu Godzillawarz's Kitchen Sink Godzillawarz's Kitchen Sink LostCraft (2025) LostCraft (2025) Create VillaSMP Create VillaSMP The Last Sanctuary Official Modpack The Last Sanctuary Official Modpack Biggess Pack Cat Edition V2 Biggess Pack Cat Edition V2 Thus the Strange Realm Thus the Strange Realm DBA'S ModPack DBA'S ModPack Colosal [TunazMC] Colosal [TunazMC] Unknown Spiral Unknown Spiral CATACLYSMIC CHRONICLES CATACLYSMIC CHRONICLES Argyll's solo leveling Argyll's solo leveling The Last: Between Realms The Last: Between Realms WhatTheCluckery WhatTheCluckery DivineIronGamer’s Medieval Journey DivineIronGamer’s Medieval Journey Quickraft Quickraft BetterTech 1 BetterTech 1 ECLIPTIUM powered by EzMINE TEAM ECLIPTIUM powered by EzMINE TEAM Limitless Realms Limitless Realms

External Resources