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
Dimension Hopper: The Fall Dimension Hopper: The Fall Chroma Sky Chroma Sky Celestial Journey Celestial Journey Rubius cobblemon Rubius cobblemon Sky Revolutions Sky Revolutions Stone Technology Ultimate Stone Technology Ultimate Escape the Barren Fallout Escape the Barren Fallout Clockwerk Pixelmon Clockwerk Pixelmon Avalon Reborn Avalon Reborn Project Infinity Unlimited Project Infinity Unlimited Worldly Galaxies 4 | Multiplayer Questing Modpack (1200+ QUESTS) Worldly Galaxies 4 | Multiplayer Questing Modpack (1200+ QUESTS) The Best of Both Skyblocks 2 The Best of Both Skyblocks 2 DinoCraft Dino Edition DinoCraft Dino Edition Simple Ben 10 Simple Ben 10 Go Create Go Create Not The Bees Not The Bees Prison Escape - Beginnings Prison Escape - Beginnings Ronin Slash Ronin Slash Project SkyQ 2 Project SkyQ 2 Create Block - Everything in the sky Create Block - Everything in the sky Compitum Magia Compitum Magia Life in the Industrial Village Life in the Industrial Village Elden Block Elden Block Super Mario Mashup: PC Edition Super Mario Mashup: PC Edition Calamity RPG III : Wounds of the World Calamity RPG III : Wounds of the World Danknum Opus Danknum Opus EMC Maker EMC Maker Rise of the Titans Rise of the Titans Survival Unchained Survival Unchained SkyColonies Ultimate Pack SkyColonies Ultimate Pack GregTech: Beyond GregTech: Beyond Ragnamod VII In The Sky Ragnamod VII In The Sky Sky of Grind Sky of Grind SkyBlock Horror SkyBlock Horror Explorico Classic 1.16.5 Explorico Classic 1.16.5 Vorps Reborn Vorps Reborn Multiblock Madness 2 Multiblock Madness 2 Project Isothermal Expert Project Isothermal Expert TerrariaCraft Curseforge TerrariaCraft Curseforge World of Minecraft Normal World of Minecraft Normal Avaritia Adventures Avaritia Adventures Fallen Realms Fallen Realms Mystic's Monstrosity - Greedy Edition Mystic's Monstrosity - Greedy Edition Tensura All The Slime 1 Tensura All The Slime 1 TechRPG - RPG with Tech, Magic, Create, Space Exploration TechRPG - RPG with Tech, Magic, Create, Space Exploration SkyBix - A SkyBlock Modpack SkyBix - A SkyBlock Modpack SlashAoA3 SlashAoA3 Level Border Level Border Manufactio 2 - Nuclear Edition Manufactio 2 - Nuclear Edition RougeCraft - Dungeons, Quests And Combat RougeCraft - Dungeons, Quests And Combat Infinite Alchemy Infinite Alchemy Avaritia Project Avaritia Project World of Minecraft - Meidde World of Minecraft - Meidde Catalyst - Parasites Catalyst - Parasites Ascension of Ages Ascension of Ages Sky Arsenal Sky Arsenal Interactions Interactions Draconic Infinity Draconic Infinity horror the last world in ruins horror the last world in ruins MTW Skyblock Reborn MTW Skyblock Reborn way too op craft way too op craft SkyWorkshop SkyWorkshop Mythic: Novus - The Complete Magic Modpack - 1.12.2 Mythic: Novus - The Complete Magic Modpack - 1.12.2 SkyColonies SkyColonies Shreks Modern Warfare 1.16.5 Shreks Modern Warfare 1.16.5 Insane Ben 10 Insane Ben 10 Infinity Legacy Infinity Legacy High-Altitude Alchemy High-Altitude Alchemy Skyblock Automation Skyblock Automation Too Many Mobs Too Many Mobs Project Equivalence 2 Covalence Unified Project Equivalence 2 Covalence Unified BeanPack: Invincible BeanPack: Invincible Dragonworld Dragonworld The SuperHero Journey The SuperHero Journey AHZNB's Shinobi World AHZNB's Shinobi World MODPACK FRIGIEL ET FLUFFY SAISON 6 MODPACK FRIGIEL ET FLUFFY SAISON 6 Techno Magic - Trustworthy Techno Magic - Trustworthy lmobtrixsters zoocraft lmobtrixsters zoocraft Mystical Block Reloaded Mystical Block Reloaded The Crafting Dead (The Walking Dead Inspired) The Crafting Dead (The Walking Dead Inspired) Captive Survival Captive Survival Impostor Syndrome Impostor Syndrome Project Infinite Technology - Red Project Infinite Technology - Red Pokemon JG058 Pokemon JG058 Andromeda Automation Andromeda Automation Evolution of the Ages 2 Evolution of the Ages 2 Kinda Crazy Craft (updated) Kinda Crazy Craft (updated) Odyssey 3 Odyssey 3 Factory in the Sky 4 Factory in the Sky 4 knight epic fight knight epic fight Alchemical Skyblock Alchemical Skyblock Simply Skyblock Simply Skyblock HarvestBlock 2 HarvestBlock 2 Stacia Stacia MC Overpower MC Overpower Mechanical Infinity Mechanical Infinity The Clash of Epochs The Clash of Epochs Tensura: Reincarnated -  By Ren Tensura: Reincarnated - By Ren Stone in Sky Stone in Sky Beyond Crazycraft Beyond Crazycraft

External Resources