
Piglib
A mod to help other modders and datapack creators mess with Piglins
About this Mod
Adds item tags for various Piglin related things that Mojang were too silly to add themselves! Useful for mods which add new items that should interact with Piglins, or for datapack makers.
Tags include:
piglib:piglin_bartering_items - Items in this tag, when picked up by a Piglin or right clicked with, will result in the Piglin bartering
piglib:piglin_safe_armor - Items in this tag, when worn in an armor slot, will prevent nearby Piglins from being angered
piglib:piglin_loved_nuggets - Items in this tag, when picked up by Piglins, will be picked up as a whole stack like gold nuggets rather than one at a time. Piglins will not actively seek out these items. Items in this tag should not also be in the vanilla minecraft:piglin_loved tag
Note that adding items to any of these tags doesn't automatically add them to minecraft:piglin_loved, so if you want Piglins to actively seek out the items when dropped on the ground, you will need to add to that as well.
This can be Jar-in-Jar'd to your Fabric mods! Use JitPack.
Available Versions
How to Install Piglib on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.20.4).
Install Mod
Open the mod browser in the dashboard and search for "Piglib". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.20.4, 1.20.1, 1.18.2 (+5 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Piglib server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.4). You can switch loaders with one click in the panel.
Is Piglib compatible with fabric?
Piglib officially supports fabric for Minecraft 1.20.4, 1.20.1, 1.18.2. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Piglib – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Piglib consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Piglib with just one click on your server.