Перейти к содержимому
Mineforgian

HammerLib

Utility mod that contains really useful code for quite a few mods.

766K загрузок56 подписчиковLicenseRef-All-Rights-Reservedforgeneoforge

Обновлён 27 июня 2026 г. · опубликован 14 мая 2023 г.

  • mcdoc.zeith.org

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  Patreon

Версии

ВерсияКаналИграЗагрузчикиДатаСкачать
12.2.65Релиз1.12.2forge27 июня 2026 г..jar (2.5 МБ)
12.2.63Релиз1.12.2forge13 июня 2026 г..jar (2.5 МБ)
12.2.62Релиз1.12.2forge7 июня 2026 г..jar (2.5 МБ)
12.2.61Релиз1.12.2forge3 июня 2026 г..jar (2.5 МБ)
12.2.60Релиз1.12.2forge1 июня 2026 г..jar (2.4 МБ)
12.2.59Релиз1.12.2forge31 мая 2026 г..jar (2.4 МБ)
12.2.58Релиз1.12.2forge26 марта 2025 г..jar (2.5 МБ)
20.1.50Релиз1.20.1forge, neoforge23 марта 2025 г..jar (2.3 МБ)
21.4.5Релиз1.21.4neoforge5 марта 2025 г..jar (2.4 МБ)
21.4.4Релиз1.21.4neoforge5 марта 2025 г..jar (2.4 МБ)
21.4.3Релиз1.21.4neoforge5 марта 2025 г..jar (2.4 МБ)
21.4.2Релиз1.21.4neoforge4 марта 2025 г..jar (2.4 МБ)
21.4.1Релиз1.21.4neoforge4 марта 2025 г..jar (2.2 МБ)
20.1.48Релиз1.20.1forge, neoforge18 января 2025 г..jar (2.3 МБ)
20.1.47Релиз1.20.1neoforge18 января 2025 г..jar (2.3 МБ)

Показаны последние 15 из 144 версий. Все версии — на Modrinth.

Ченджлог

12.2.65Релиз1.12.2 · 27 июня 2026 г.

To get developer builds, see HammerLib wiki.

Changes:

  • 12.2.65 - ResourceBasedShaderVar.postProcessCode.
  • 12.2.65 - ShaderResource and ResourceBasedShaderVar.
  • 12.2.64 - ShaderVar.onReload, implement manual 30s timeout for ModSourceAdapter.
  • 12.2.63 - Several missing methods in KeyMap + its refactor to match later game versions.
  • 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).
  • 12.2.61 - Several profiling and data features, as well as async HTTP handling for mod sources at early start.
  • 12.2.60 - Fix crashing with ThaumicAdditions. (Close #86)
  • 12.2.59 - Fix maven-publish to force upload deobf artifact as main, and remove all runtime dependencies.
12.2.63Релиз1.12.2 · 13 июня 2026 г.
  • Several missing methods in KeyMap + its refactor to match later game versions.
12.2.62Релиз1.12.2 · 7 июня 2026 г.

To get developer builds, see HammerLib wiki.

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).
12.2.61Релиз1.12.2 · 3 июня 2026 г.

To get developer builds, see HammerLib wiki.

Changes:

  • 12.2.61 - Several profiling and data features, as well as async HTTP handling for mod sources at early start.
12.2.60Релиз1.12.2 · 1 июня 2026 г.

To get developer builds, see HammerLib wiki.

Changes:

  • 12.2.60 - Fix crashing with ThaumicAdditions. (Close #86)
12.2.59Релиз1.12.2 · 31 мая 2026 г.

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Релиз1.12.2 · 26 марта 2025 г.

To get developer builds, see HammerLib wiki.

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Релиз1.20.1 · 23 марта 2025 г.
  • Backport secure jar display in mod list;
  • Proper synchronization with SimpleInventory change;

Полная история изменений — на Modrinth.

Комментарии

Загружаем…