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

Better Piglin Trades

Data-driven piglin bartering! Define custom trade items and loot tables via datapacks. Includes tiered trades for gold nuggets, ingots, and blocks with JEI support.

Загрузки
556
Подписчики
2
Обновлён
16 августа 2026 г.
Лицензия
MIT

Опубликован 8 января 2026 г.

Features

Better Piglin Trades transforms piglin bartering into a fully data-driven system that modpack makers can customize without writing any code.

Tiered Trading System

The mod includes three default trade tiers:

Trade Item Reward Quality
Gold Nugget Basic rewards - iron nuggets, soul sand, fire charges
Gold Ingot Standard rewards - ender pearls, potions, obsidian (vanilla-like)
Gold Block Premium rewards - netherite scrap, diamonds, enchanted books

Fully Customizable

Create your own trades by adding JSON files to your datapack:

Trade Definition (data/mypack/piglin_trades/emerald.json):

{
  "item": "minecraft:emerald",
  "loot_table": "mypack:gameplay/piglin_bartering/emerald",
  "priority": 0
}

Then create a matching loot table with your desired rewards!

JEI Integration

When JEI is installed, press "U" on any trade item to see all possible barter rewards. The display shows:

  • The input item required
  • All possible output items with average quantities

For Modpack Makers

  • Add new trades: Create trade definitions for any item
  • Override existing trades: Use the priority field (higher wins)
  • Remove trades: Point to an empty loot table
  • Balance rewards: Full control over loot table weights and quantities

Requirements

  • Minecraft 1.21.1
  • NeoForge 21.1+

Optional

  • JEI (Just Enough Items) - For viewing possible barter outputs

Ченджлог

1.20.1-1.2.0Релиз1.20.1 · 16 августа 2026 г.

Better Piglin Trades 1.2.0

First CurseForge and Modrinth release for Minecraft 1.20.1, on Forge.

Data-driven piglin bartering: define which items piglins accept and what they give back, using datapack JSON. Ships with tiered gold nugget, gold ingot and gold block trades.

Features

  • Add, override or disable barter items with datapack JSON, no code required
  • priority field to override trades from other packs
  • enabled field to take an item out of bartering entirely
  • JEI integration showing every possible reward sorted by chance, with the per-roll chance on each tooltip. Outputs are synced from server to client, so it works in singleplayer and on servers

Fixed since the 1.20.1 maven build

  • The mod's own default trades never loaded. The jar had no pack.mcmeta, so Forge rejected its built-in datapack and none of the gold nugget, ingot or block trades registered
  • A cached build could ship without the mixin refmap. The refmap is produced as a side effect of compilation and was not a declared task output, so a Gradle build-cache hit silently dropped it, leaving every mixin injection unable to resolve at runtime
  • Clients without JEI were disconnected on login
  • JEI showed no recipes when connected to a dedicated server
  • Trade data was not re-sent after /reload
  • Right-clicking a piglin with a custom trade item gave no arm swing and could trigger the item's own right-click action
  • Custom trade items were consumed in creative mode
  • Barter rewards dropped at the piglin's feet instead of being thrown toward the player
  • Piglin repellents could be picked up as trade items

Notes

  • Trade overrides should live in your own namespace and use a higher priority. Writing to data/betterpiglintrades/piglin_trades/<name>.json is unreliable, since only one pack can win a given file path
  • Loot tables go in data/<namespace>/loot_tables/ on 1.20.1
1.21.1-1.2.0Релиз1.21.1 · 16 августа 2026 г.

Better Piglin Trades 1.2.0

A correctness release for Minecraft 1.21.1. If you are on 1.0.0, this is a recommended update.

Fixed

  • Clients without JEI were disconnected on login. The trade sync handler reached into the JEI integration unconditionally, so any client without JEI installed hit a missing class while handling the join packet. This is the main reason to update
  • JEI showed no piglin bartering recipes when connected to a dedicated server. Recipes are now built from the synced output data instead of the server-side trade definitions
  • Trade data was not re-sent to connected players after /reload, leaving JEI showing stale rewards
  • Right-clicking a piglin with a custom trade item produced no arm swing, and could trigger the item's own right-click action, because the client was not told the piglin would accept it
  • Custom trade items were consumed in creative mode
  • Barter rewards dropped at the piglin's feet instead of being thrown toward the player
  • Piglin repellents could be picked up as trade items
  • Removed an injection into a piglin method that has no callers left in modern Minecraft

Added

  • enabled field on trade definitions. Set it to false to take an item out of bartering entirely, rather than only removing its rewards
  • JEI now shows the chance of each barter output on its tooltip, sorted most likely first

Notes

  • Trade overrides should live in your own namespace and use a higher priority. Writing to data/betterpiglintrades/piglin_trades/<name>.json is unreliable, since only one pack can win a given file path
26.1.2-1.2.0Релиз26.1.2 · 16 августа 2026 г.

Better Piglin Trades 1.2.0

Updated for Minecraft 26.1.2.

Changes

  • Updated to Minecraft 26.1.2 and NeoForge 26.1.2.x
  • JEI now resolves against maven artifacts rather than a pinned CurseForge file

Added

  • enabled field on trade definitions. Set it to false to take an item out of bartering entirely, rather than only removing its rewards

Fixed

  • JEI showed no piglin bartering recipes when connected to a dedicated server. Recipes are now built from the synced output data instead of the server-side trade definitions
  • Trade data was not re-sent to connected players after /reload, leaving JEI showing stale rewards
  • Right-clicking a piglin with a custom trade item produced no arm swing, and could trigger the item's own right-click action, because the client was not told the piglin would accept it
  • Custom trade items were consumed in creative mode
  • Barter rewards dropped at the piglin's feet instead of being thrown toward the player
  • Piglin repellents could be picked up as trade items
  • Drop chances double-counted an item appearing in more than one loot table entry, and normalised weights across all pools rather than per pool
  • The bundled example datapack used the pre-1.21.2 loot_tables folder name, so it never loaded
  • Removed an injection into a piglin method that has no callers left in modern Minecraft
26.1.1-1.1.0Релиз26.1.1 · 8 апреля 2026 г.

Better Piglin Trades 1.1.0

Changes

  • Ported to Minecraft 26.1.1 / NeoForge 26.1.1.11-beta
  • Migrated from Forge to NeoForge
  • Upgraded to Java 25
  • Replaced SimpleChannel networking with CustomPacketPayload system
  • JEI integration now shows drop chance percentages on item tooltips
  • Updated to latest JEI API (IRecipeType, IIngredientAcceptor.add)
2.0.0Релиз1.21.11 · 9 января 2026 г.

2.0.0

Port to Minecraft 1.21.11 and NeoForge 21.11.

Changes

  • Updated to Minecraft 1.21.11
  • Updated to NeoForge 21.11.13-beta
  • Updated to JEI 19.21.11.7
  • Refactored data loading to use Codec-based SimpleJsonResourceReloadListener
  • Updated all APIs for 1.21.11 compatibility (Identifier, registry access, etc.)

Notes

  • This version is NOT compatible with Minecraft 1.21.1 - use version 1.0.0 for 1.21.1
1.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 8 января 2026 г.

1.0.0

Initial release of Better Piglin Trades.

Features

  • Data-Driven Trades: Define custom bartering items and rewards via JSON datapacks
  • Priority System: Override or replace trades using the priority field
  • Tiered Default Trades:
    • Gold Nugget: Basic rewards (iron nuggets, soul sand, fire charges)
    • Gold Ingot: Standard rewards (ender pearls, potions, obsidian)
    • Gold Block: Premium rewards (netherite scrap, diamonds, enchanted books)
  • JEI Integration: View all possible barter outputs with automatic server-to-client sync
  • Full Datapack Support: Works with both mod JAR trades and external datapacks

Комментарии

Загружаем…