All Mods Resource Packs Data Packs Shaders Modpacks Plugins
HammerLib

HammerLib

by Zeith • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

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 Hammer Core, 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 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!

Join the discord server and follow Zeitheron on Twitter!

If you would like to support my work, you can become a patron via . 

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.x
Neoforge
20h ago 1
1.21.x
Neoforge
20h ago 1
1.21.x
Neoforge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.21.4
Neoforge
20h ago 1
1.21.4
Neoforge
20h ago 1
1.21.4
Neoforge
20h ago 1
1.21.4
Neoforge
20h ago 1
1.21.4
Neoforge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.21.x
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.21.x
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.21
Neoforge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.5
Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.3
Neoforge
20h ago 1
1.20.2
Neoforge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.5
Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.3
Neoforge
20h ago 1
1.20.2
Neoforge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.5
Neoforge
20h ago 1
1.20.3
Neoforge
20h ago 1
1.20.2
Neoforge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.3
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.2
Neoforge
20h ago 1
1.16.5
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.19.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.20.1
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20
Forge
20h ago 1
1.20
Forge
20h ago 1
1.20.1
Forge
20h ago 1
1.20
Forge
20h ago 1
1.20
Forge
20h ago 1
1.19.3
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.11.2
Forge
20h ago 1
1.11
Forge
20h ago 1
1.10.2
Forge
20h ago 1
1.19.3
Forge
20h ago 1
1.19.2
Forge
20h ago 1
1.18.2
Forge
20h ago 1
1.18.1
Forge
20h ago 1
1.16.5
Forge
20h ago 1
1.16.3
Forge
20h ago 1
1.15.2
Forge
20h ago 1
1.13.2
Forge
20h ago 1
1.12.2
Forge
20h ago 1
[21.0.17] 21.0.17 by Zeith on Oct 14, 2026
Download

Changelog:


[21.0.16] 21.0.16 by Zeith on Oct 14, 2026
Download

Changelog:
  • Port missing features from FlowGui 1.20.1;
  • DistExecutor is back; (for very not safe things)
  • Many utilities ported from 1.20.1;
[21.0.15] 21.0.15 by Zeith on Oct 14, 2026
Download

Changelog:


### [To get developer builds, see HammerLib wiki.](https://mcdoc.zeith.org/docs/intro)

# Changes:

  • 12.2.66 - Fix ShaderLightingVariable producing absurd values on SteamOS.
  • 12.2.65 - ResourceBasedShaderVar.postProcessCode.

<h3><a href="https://mcdoc.zeith.org/docs/intro">To get developer builds, see HammerLib wiki.</a></h3>
<h1>Changes:</h1>
<ul>
<li> 12.2.65 - ResourceBasedShaderVar.postProcessCode.</li>
<li> 12.2.65 - ShaderResource and ResourceBasedShaderVar.</li>
<li> 12.2.64 - ShaderVar.onReload, implement manual 30s timeout for ModSourceAdapter.</li>
<li> 12.2.63 - Several missing methods in KeyMap + its refactor to match later game versions.</li>
<li> 12.2.62 - Fix UUID NBT serialization to use int[4] (as single property) instead of old 1.12.2 two property approach (Most/Least suffixes).</li>
<li> 12.2.61 - Several profiling and data features, as well as async HTTP handling for mod sources at early start.</li>
<li> 12.2.60 - Fix crashing with ThaumicAdditions. (Close #86)</li>
<li> 12.2.59 - Fix maven-publish to force upload deobf artifact as main, and remove all runtime dependencies.</li>
</ul>

[12.2.63] 12.2.63 by Zeith on Oct 14, 2026
Download
  • Several missing methods in KeyMap + its refactor to match later game versions.
### [To get developer builds, see HammerLib wiki.](https://mcdoc.zeith.org/docs/intro)

# Changes:

  • 12.2.62 - Fix UUID NBT serialization to use int\[4\] (as single property) instead of old 1.12.2 two property approach (Most/Least suffixes).
[To get developer builds, see HammerLib wiki.](https://mcdoc.zeith.org/docs/intro)
# Changes:
  • 12.2.61 - Several profiling and data features, as well as async HTTP handling for mod sources at early start.
[To get developer builds, see HammerLib wiki.](https://mcdoc.zeith.org/docs/intro)
# Changes:
  • 12.2.60 - Fix crashing with ThaumicAdditions. (Close #86)
### To get developer builds, see HammerLib wiki.
# Changes:
  • 12.2.59 - Fix VariableShaderProgram's uniform cache being populated incorrectly and make default float values in the cache NaN, so regardless of what the first setUniform call will have - it will always go through.
  • 12.2.59 - Cleanup a lot of unused things, optimize VariableShaderProgram by using hash maps instead of dumb array maps, as well as reuse previous shader states for int1/float1 uniforms, reducing amount of GL calls when the data is the same.
[12.2.58] 12.2.58 by Zeith on Oct 14, 2026
Download
### [To get developer builds, see HammerLib wiki.](https://mcdoc.zeith.org/docs/api/intro)
# Changes:
  • Prevent shaders from reloading during preInit (because some mods force a reload on preinit for... some reason);
  • Actually query ShaderVar state and recompile shader program whenever variables change;
  • Utility methods for ColoredLight;
  • Fix shader NPEs caused by null values;
  • Reset shader variable hasChanged state on upload.
[20.1.50] 20.1.50 by Zeith on Oct 14, 2026
Download
  • Backport secure jar display in mod list;
  • Proper synchronization with SimpleInventory change;
[21.4.5] 21.4.5 by Zeith on Oct 14, 2026
Download

Changelog:


[21.4.4] 21.4.4 by Zeith on Oct 14, 2026
Download

Changelog:


[21.4.3] 21.4.3 by Zeith on Oct 14, 2026
Download

Changelog:


[21.4.2] 21.4.2 by Zeith on Oct 14, 2026
Download

Changelog:


[21.4.1] 21.4.1 by Zeith on Oct 14, 2026
Download
1.21.4 port for latest NeoForge
[20.1.48] 20.1.48 by Zeith on Oct 14, 2026
Download
  • Expand server context inside RegisterRecipesEvent with registry access and recipe manager.
[20.1.47] 20.1.47 by Zeith on Oct 14, 2026
Download
  • RotationHelper.fromNormal
  • RecipeHelper.NEOFORGE_MOD_ID_FOR_TAGS
  • ObjectMirrorConverter.unwrap
  • Fix FluidFactory.is(Fluid)
[20.1.46] 20.1.46 by Zeith on Oct 14, 2026
Download
# BREAKING CHANGES
  • Copy of java.awt.Color without loading Toolkit library (which will be unavailable on headless servers);
  • Tweaks to spoofed recipes (using multimaps)
  • Remove experimental spoofed recipe access from RegisterRecipesEvent.
  • Rework recipe builders to use less generics and allow any identifiable output to be used, not just items;
  • Remove experimental spoofed recipe access from RegisterRecipesEvent;
[20.1.45] 20.1.45 by Zeith on Oct 14, 2026
Download

Changelog:
  • TableHelper.computeIfAbsent
  • ShapeUtils
  • RotatedShapeCache / RotatedShapeCacheSimple
  • AABBUtils fixes
[20.1.44] 20.1.44 by Zeith on Oct 14, 2026
Download

Changelog:
  • EmissiveGeometry ("loader": "hammerlib:emissive") + DelegateBakedModel
  • GuiObject.elementZPos
  • tr_tr.lang Turkish Localization
[20.1.43] 20.1.43 by Zeith on Oct 14, 2026
Download

Changelog:
  • Add render-width and render-height to allow for independent image size from its UV size.
  • Text component drivers parse java string literals as well now.
[20.1.41] 20.1.41 by Zeith on Oct 14, 2026
Download

Changelog:
  • Add item decorations to GuiItemObject;
  • Added GuiTooltipObject;
  • Added a few add/remove hooks to GuiObject;
  • Added GuiObject.drawTooltip for components to render tooltip if needed (like fluids and items);
  • Abstract Tooltip interface for rendering tooltips in flowguis;
  • GuiFluidObject for fluids;
  • IExtendedFluidType for fluid rarity and tooltip image;
  • Improvements to FluidHelper;
  • Add effective way of converting nashorn JSON to Gson and Json through ObjectMirrorConverter;
  • Added Suggestions for properties (API for HammerHelper)
[20.1.39] 20.1.39 by Zeith on Oct 14, 2026
Download

Changelog:
  • Add GuiItemObject (and <item/> flowgui xml tag);
  • Add JeiKeyRole [obtained via IJeiPluginHL.get().getRoleForKey()] shortcut to show recipes/usages;
  • Add GLStencil (and a config option to enable/disable stencils);
  • Added ComDrivers.readString & ComDrivers;.driveString for support of dynamically driven text;
  • Group few parameters into DriverContext;
  • Added FlowguiShaderRegistry to allow customization of shaders on images and sprite buttons;
  • Enable ES6 support in OpenJDKParser;
  • Suppliers2 for mapping suppliers;
  • GuiWidgetWrapperObject for embedding abstract widgets into GuiObject system;
[20.1.38] 20.1.38 by Zeith on Oct 14, 2026
Download

Changelog:
  • Add render-width and render-height to allow for independent image size from its UV size.
  • Text component drivers parse java string literals as well now.
[20.1.37] 20.1.37 by Zeith on Oct 14, 2026
Download

Changelog:
  • Flowgui XML improvements
[20.1.36] 20.1.36 by Zeith on Oct 14, 2026
Download

Changelog:


[20.1.35] 20.1.35 by Zeith on Oct 14, 2026
Download

Changelog:


[21.0.14] 21.0.14 by Zeith on Oct 14, 2026
Download

Changelog:


HammerLib Icon
Download HammerLib
Select game version
Select platform