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
Project Arc Light - The Hanging Pavilion Project Arc Light - The Hanging Pavilion Industrial Age [1.12.2] Industrial Age [1.12.2] TeraCraft-3D Terraira TeraCraft-3D Terraira SwordCraft Origins SwordCraft Origins Draconic Infinity : Chapter 2 Draconic Infinity : Chapter 2 Medieval Dark Fantasy Craft [Rpg] Medieval Dark Fantasy Craft [Rpg] Reaching Darkness Reaching Darkness Sky Technology Sky Technology KRILLKRAFT KRILLKRAFT FCraft: Fantasy Craft FCraft: Fantasy Craft DirtBlock DirtBlock Randy's underground drug ring. Randy's underground drug ring. The Ember Project The Ember Project Create Echoes of the Great Derailment Create Echoes of the Great Derailment Crafted Madness: Modern Era Crafted Madness: Modern Era Aeon Automata Aeon Automata [FFS] Fantastic Furry Syndicate [FFS] Fantastic Furry Syndicate Hazbin Hotel Hazbin Hotel Leviathan Leviathan Op Heroes And Weapons Op Heroes And Weapons Lost in the Backrooms Lost in the Backrooms The Nuclear Option The Nuclear Option W.M.D (Weapons, Monsters, and Dungeons) W.M.D (Weapons, Monsters, and Dungeons) Origins & Bits Origins & Bits RPGoop - Industrial and Divinerpg modpack RPGoop - Industrial and Divinerpg modpack InsaneCraft S2 (Fan Made) InsaneCraft S2 (Fan Made) Endless cataclysm Endless cataclysm AtomBombOS AtomBombOS Berseria Sky Berseria Sky Herodotus Herodotus Apocalipse Light - A Zombie Apocalypse Survival Apocalipse Light - A Zombie Apocalypse Survival CobbleMaster CobbleMaster MC EXPEDITIONS MC EXPEDITIONS World War Z - Warden Edition World War Z - Warden Edition Overpowered Overpowered Dragons & Rats Dragons & Rats Project extended infinity forever Project extended infinity forever SAO - Sword Arts Offline SAO - Sword Arts Offline Tensura Pandemonium Official Tensura Pandemonium Official Dino World - Jurassic Adventures Dino World - Jurassic Adventures InsanelyCrazyCraft InsanelyCrazyCraft Savaru I - Survival Savaru I - Survival AphmauSmpServer AphmauSmpServer Torchpack Torchpack Equivalent Escape Equivalent Escape Xomembers Xomembers Adventure and RPG+IC2Classic Adventure and RPG+IC2Classic The Ancient Dawn LITE The Ancient Dawn LITE Tiger's AVP Tiger's AVP MC stranded MC stranded Carry On: Wayward Souls Carry On: Wayward Souls Pixelmon E2craft Pixelmon E2craft Ancient Xenomorph Warfare Ancient Xenomorph Warfare Paul2Craft's Mod-Bingo [2.0] Paul2Craft's Mod-Bingo [2.0] Solo Leveling: Extended Solo Leveling: Extended LitW II - Life in the Wilds 2 LitW II - Life in the Wilds 2 All The Loot! [REMASTERED] All The Loot! [REMASTERED] MC Jurassic MC Jurassic HBM's NTM + Galacticraft HBM's NTM + Galacticraft Skies of Progression Skies of Progression Dungeons and Shuttles Evolution Dungeons and Shuttles Evolution RageCraft Revived RageCraft Revived Ultimato Plus - Harder Receipts Ultimato Plus - Harder Receipts Projekt Engineering Projekt Engineering Modustrie Modustrie Sky Industrialization Sky Industrialization BearableParasites BearableParasites Mystic's Monstrosity - Avaricious Edition Mystic's Monstrosity - Avaricious Edition TechBlock - SkyTech 3 TechBlock - SkyTech 3 Technical Dragonrider Technical Dragonrider Road to the Heaven Road to the Heaven Isolated Crystal 3 Isolated Crystal 3 Mystic Sky Mystic Sky Whim Whim WWII Era Warfare WWII Era Warfare Cavers Delight Cavers Delight Better Than Adventure-Forge Better Than Adventure-Forge More mobs More mobs ReCraft S8 Project infinity 0.1 ReCraft S8 Project infinity 0.1 GR's RPG: medieval fantasy GR's RPG: medieval fantasy American-Craft (Bombs) American-Craft (Bombs) Jelly&Co Jelly&Co Create: Everything & The Kitchen Sink Create: Everything & The Kitchen Sink Integrated RPG Integrated RPG The French Baguette The French Baguette The Lost Server - The Broken Script The Lost Server - The Broken Script SubCraft Rebirth SubCraft Rebirth Farmtastic! Farmtastic! TTIGRAAV : That Time I Got Reincarnated As A Vampire TTIGRAAV : That Time I Got Reincarnated As A Vampire Artemis: Project Artemis: Project Applied Energestic 2 vs Refined Storage Neoforged Applied Energestic 2 vs Refined Storage Neoforged Sky Questing ++ Sky Questing ++ Guns, Dinosaurs and Stuff Guns, Dinosaurs and Stuff Max's Flashback Max's Flashback Infinite Progress Infinite Progress SkyFactory Reborn SkyFactory Reborn TerrariaWorld TerrariaWorld CozyCrafts & Doodads CozyCrafts & Doodads DiscoveryRPG DiscoveryRPG Dead Dawn - Realistic Zombie Apocalypse Dead Dawn - Realistic Zombie Apocalypse

External Resources