HammerLib Mod pour Minecraft 1.21.1, 1.12.2
Mod utilitaire qui contient du code vraiment utile pour pas mal de mods.
À propos du mod HammerLib
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.
Comment installer HammerLib
With Millida Launcher
Install Millida Launcher
The launcher is free: download it at millida.net/launcher and sign in with any nickname.
Click “Install” on this page
The launcher opens and installs the mod for Minecraft 1.12.2–1.21.1 on Forge or NeoForge automatically.
Launch the game
A profile with it appears in the launcher: click “Play”.
On a server
A server on Forge or NeoForge
The mod only works on a server with the same loader and game version, for example 1.21.1.
File goes into the server’s mods folder
Stop the server, put the mod file into the mods folder and start the server again.
Use the “To server” button
On Millida Hosting, the button at the top of the page uploads the file to your server and restarts it for you.
Minecraft 1.21.1 runs on Java 21: with a different Java version the game may close right after launch.
Versions
Avec dépendances
| Minecraft | Loader | Fichier | Date | Actions |
|---|---|---|---|---|
| 1.21.1 | NeoForge | 1.21.12.3 Mo 12 | ||
| 1.21.1 | NeoForge | 1.21.12.3 Mo | ||
| 1.21.1 | NeoForge | 1.21.12.1 Mo | ||
| 1.12.2 | Forge | 1.12.22.5 Mo | — |
FAQ
Which Minecraft versions does HammerLib work on?
There are files for 1.21.1, 1.21, 1.12.2. The newest is 1.21.1.
Is HammerLib for Forge or Fabric?
There are files for Forge: 1.12.2 and for NeoForge: 1.21–1.21.1. There are no files for Fabric: a mod for another loader will not start.
Does HammerLib need other mods?
The author lists no required dependencies: the Forge or NeoForge loader is enough.
Does HammerLib work on a server?
Yes. HammerLib works both in singleplayer and on a server.
Which Java does HammerLib need?
Minecraft 1.21.1 runs on Java 21. If the game closes right after launch, the usual cause is the wrong Java version in the profile settings.
How do I download HammerLib?
With Millida Launcher: it installs HammerLib into a modpack by itself, for the right game version and loader. The launcher is free.
Avis
Soyez le premier à noter HammerLib


