TargetEventBackport

Add cancelable MobChangeTargetEvent.

TargetEventBackport for Minecraft 1.16.5 (Forge)

Overview

TargetEventBackport solves a limitation in Minecraft 1.16.5 Forge where the LivingSetAttackTargetEvent is not cancelable. This prevents modders from controlling mob targeting behavior—a feature freely available in modern versions (1.18.2+). This mod bridges the gap by introducing a fully cancelable event, restoring functionality parity with newer Minecraft editions.

Key Features

  • �️ Adds MobChangeTargetEvent:
    A cancelable event fired whenever a mob changes its attack target (via Mob#setTarget).
  • ⚙️ Seamless Integration:
    Uses Mixin injections to post the event without altering vanilla behavior when unused.
  • ✨ High-Version Parity:
    Mimics the behavior of Forge's LivingSetAttackTargetEvent in 1.18.2+, enabling:
    • Canceling unwanted targeting (e.g., stop creepers targeting players).
    • Dynamically overriding targets (e.g., redirect mobs to custom entities).

Well, we are including MixinExtras for compatibility reason so the jar file is rather big

TargetEventBackport Team

profile avatar
  • 73
    Followers
  • 132
    Projects
  • 176.3M
    Downloads

唯假期与 Naruto 不可辜负。

More from _nArUTo_View all