Download TargetEventBackport — Minecraft Mods — MetaMods

TargetEventBackport

Active

Downloads

0

Last update

3 months ago
Client
Libraries

TargetEventBackport for Minecraft 1.16.5 (Forge)

Mod Overview

The TargetEventBackport mod addresses a significant limitation in Minecraft 1.16.5 Forge where the LivingSetAttackTargetEvent cannot be canceled. This prevents mod developers from controlling mob targeting behavior—functionality that's freely available in modern game versions (1.18.2+). This modification bridges this gap by introducing a fully cancelable event, restoring functional parity with newer Minecraft editions.

Key Features

  • Addition of MobChangeTargetEvent: A cancelable event that triggers whenever a mob changes its attack target (via the Mob#setTarget method).

  • Seamless Integration: Uses Mixin injections to trigger the event without altering vanilla game behavior when unused.

  • High-Version Compatibility: Mimics the behavior of Forge's LivingSetAttackTargetEvent from versions 1.18.2+, enabling:

    • Canceling unwanted targeting (e.g., preventing creepers from targeting players)
    • Dynamically overriding targets (e.g., redirecting mobs to custom entities)
Project members
pOtAto__bOy

pOtAto__bOy

Created: 25 Jul 2025

ID: 259217