HammerLib

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

695,17k

HammerLib

<p style="text-align: center;"><img src="https://assets.zeith.org/logos/hammer-lib.png?v=2" alt="" width="640" height="130" /></p>
<p style="text-align: center;"><img src="https://cf.way2muchnoise.eu/full_247401_downloads.svg" width="165" height="10" /><img src="https://cf.way2muchnoise.eu/versions/247401_all.svg" width="373" height="18" /></p>
<p>Utility mod that contains really useful code for quite a few mods.</p>
<p> </p>
<h4>This library provides:</h4>
<ul>
<li>Simple, <a href="https://github.com/dragon-forge/ImprovableSkills/blob/1.19.2/src/main/java/org/zeith/improvableskills/init/SkillsIS.java">annotation-based</a> content registration.
<ul>
<li>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.</li>
<li>For BlockEntity rendering, custom BlockEntityType constants may have additional @TileRenderer, pointing to an IBESR<Tile> class.</li>
</ul>
</li>
<li>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.</li>
<li>Mod Source checks, that allow you to check if the mod was downloaded from adware/malware sites, AND warn users about it.</li>
<li>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.</li>
<li>Java-based tag population, with BuildTagsEvent, that runs on HammerLib.EVENT_BUS.</li>
<li>Vastly simplified networking, using Network class, and IPacket + INBTPacket to allow for flawless and intuitive packet code development.</li>
<li>Wrappers for block harvesting, that has been moved over to tags - BlockHarvestAdapter</li>
<li>Field-based NBT serialization, so that you don't make a typo/forget to write serialization/deserialization code.</li>
<li>Good old TileEntity wrappers, with TileSyncable and TileSyncableTickable, that allow synchronization of initial state, as well as registering properties that will be synchronized independently.</li>
<li>ContainerAPI for BlockEntities, allowing to avoid MenuType<?> altogether (no need to register screen providers, menu types etc)</li>
<li>ItemStack -> Color[] API, with TexturePixelGetter.getAllColors</li>
<li>Annotation-based custom model loaders (@LoadUnbakedGeometry on IUnbakedGeometry<SELF>), avoids using the geometry loader class by making a common wrapper.</li>
<li>...And a whole lot more!</li>
</ul>
<p> </p>
<p>And a lot of rich features for mod devs.</p>
<p><strong>Not enough? You can just view sources on <a class="js-qwynlraxz" href="https://github.com/dragon-forge/HammerLib"><img src="https://mods.zeith.org/static/github.svg" alt="" width="40" height="40" /> GitHub</a>, it's free!</strong></p>
<p><strong><img style="display: block; margin-left: auto; margin-right: auto;" src="https://i.imgur.com/LuJJMv1.png" alt="" width="698" height="1" /></strong></p>
<p style="text-align: left;"><strong>Permissions:</strong></p>
<ul style="text-align: center;">
<li style="text-align: left;"><strong>You can use this mod in your modpack.</strong></li>
<li style="text-align: left;"><strong><span style="color: #008000;">Yes, you are allowed to build a mod that requires Hammer Core</span>, <span style="color: #993300;">but <span style="text-decoration: underline;">not</span> embeds it!</span></strong></li>
<li style="text-align: left;"><span style="color: #993300;"><strong>You are not allowed to repost this mod to other sites without providing a <a href="https://www.curseforge.com/minecraft/mc-mods/hammer-lib">CurseForge</a>/<a href="https://modrinth.com/mod/PlkSuVtM">Modrinth</a> download link and my permission (<span style="color: #00ffff;"><a class="js-qwynlraxz" style="color: #00ffff;" href="https://dccg.herokuapp.com/discord/card/376091478142746625"><img src="https://assets.zeith.org/icons/zeitheron.png" width="40" height="40" /> Zeitheron</a></span> on Discord)</strong></span></li>
<li style="text-align: left;"><strong>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.</strong></li>
</ul>
<p><strong>Note:</strong></p>
<ul>
<li><strong>The only supported version of minecraft is the latest one that this mod exists for. DO NOT ASK TO DOWNGRADE!</strong></li>
</ul>
<p style="text-align: center;"><a class="js-qwynlraxz" href="https://ds.zeith.org/dev"><img src="https://ds.zeith.org/cards/dev.png" width="510" height="170" /></a></p>
<p style="text-align: center;"><strong>Join the discord server and follow Zeitheron on <a class="js-qwynlraxz" href="http://bit.ly/ZeithTwitter"><img src="https://abs.twimg.com/favicons/twitter.ico" width="32" height="32" />Twitter</a>!</strong></p>
<p style="text-align: center;"><strong>If you would like to support my work, you can become a patron via <a class="js-qwynlraxz" href="https://www.patreon.com/zeitheron"><img src="https://c5.patreon.com/external/favicon/favicon-32x32.png" alt="" width="32" height="32" /> Patreon</a>. <img src="https://s3.amazonaws.com/pix.iemoji.com/twit33/0744.png" alt="" width="33" height="33" /></strong></p>

ADS