promotional bannermobile promotional banner
premium banner
Some fix and tweak on the hunting system of piglins

Description

Piglin Hunt Fix

Improves Piglin hunting behavior while enhancing compatibility with crossbows from other mods.


🐗 Hunting trigger logic fix

Fixes an issue in vanilla behavior (observed in 1.20.1 Forge) where the mere presence of other adult Piglins could unintentionally prevent hunting from starting.

Now:

  • Hunting is blocked only if nearby Piglins have recently hunted
  • The presence of other adult Piglins alone no longer disables hunting
  • Group behavior feels more natural
  • Vanilla cooldown and pacing are preserved

✨ Glowing Hoglins trigger group aggression

When a Hoglin is glowing, it periodically alerts nearby Piglins and broadcasts a hunt.

Result:

  • Piglins can join hunts mid-combat
  • Group aggression is no longer limited to the initial trigger moment
  • Glowing becomes a meaningful tactical state
  • Players can intentionally trigger hunts using spectral arrows or other glowing sources
  • Configurable through glowingHoglinBroadcastHunting

🏹 Piglins use Spectral Arrows against Hoglins

When a Piglin attacks a Hoglin:

  • Any normal arrow it fires is replaced with a Spectral Arrow
  • Synergizes with the glowing aggression system
  • Improves lore consistency, as Piglins provide spectral arrows through bartering
  • Configurable through piglinUseSpectralArrow

🔧 Extended crossbow compatibility

Vanilla Piglins are limited to the vanilla crossbow for ranged attacks.

This mod:

  • Extends Piglin weapon checks to support any item inheriting from CrossbowItem
  • Enables compatibility with crossbows from other mods
  • Crossbows tagged with piglinhuntfix:crossbow_piglin_do_not_use would not be used by piglin, which means Piglin will fall back to melee attack holding the items.

🌐 Server compatibility

  • Can run as a server-side mod
  • Client installation optional