ModsFinder

Brea Horiz

by AW-CRK14

Brea Horiz is a NeoForge library that forwards entity-related game events to handlers attached to individual entities.

NeoForgeClient and serverMIT LicenseOpen source1.21.1

What it does

Event forwarding lets a mod listen for events tied to a specific entity and run the handlers that entity holds, instead of registering and unregistering listeners by hand as entities appear and disappear. Handlers are stored on the entity through an AttachmentType, so each entity keeps its own list and the handlers are looked up when the event fires. The library is aimed at mods that need per-entity event behavior, such as equipment traits, accessory effects or skill systems.

Setup is handled through the GatherEntityDistributeEvent, which should be used to initialize entity event forwarding globally, since data attachments are saved with a Codec and must be reattached after an entity is reloaded, teleported or moved to another dimension. Handlers are added with the EntityEventDistribute method and tagged with a ResourceLocation path, which allows removeMarked to remove every listener under a given path at once. Damage and kill events are forwarded as well. Brea Horiz runs on client and server, and its files are released under the MIT License as open source code.

Public source code and an issue tracker are linked for the project. Brea Horiz has a single NeoForge build, 1.0.0, published on 2024-09-26 for Minecraft 1.21.1, and the project has not been updated since that date.

Key features

  1. Per-entity event forwarding

    Events tied to an entity are routed to the handlers that entity holds, so behavior is attached to the entity itself.

  2. Attachment-backed handler storage

    Handler lists are kept in an AttachmentType on each entity, which holds the registered listeners for each event type.

  3. Tag-based listener removal

    Listeners added with a ResourceLocation path can be removed together through removeMarked, without tracking each one.

  4. Consumer-based handlers

    A forwarded event is passed to an EventConsumer, and the handler only needs to call accept to run its logic.

Compatibility

Latest build for each game version and loader.

1.21.11.0.0
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Use cases

Who it’s for: Mod developers building NeoForge content that needs per-entity event behavior on a server and its clients.

Questions

Does Brea Horiz have to be installed on both sides?

Yes. Servers that run it need every player to install it too.

Which loader does Brea Horiz support?

Brea Horiz is published for NeoForge only, with a single build for 1.21.1.

What happens to forwarded handlers when an entity is teleported?

Attached data is saved with a Codec, so handlers are not kept across a reload, teleport or dimension change. Initialization through GatherEntityDistributeEvent must be run again for those entities.

In the catalog

Brea Horiz is one of 3,514 Library mods on ModsFinder, and one of 1,449 Library mods for NeoForge. 32,366 mods support Minecraft 1.21.1.

More from AW-CRK14

All projects

Similar mods

What the author says

Horiz Lib provides an easy-to-use event forwarding feature that allows events related to entities in the game to be forwarded to the event handlers held by the entities, avoiding cumbersome event registration and dynamic addition and removal. This process makes the variable event handling behavior for a single entity…
AW-CRK14, on the Modrinth page

Official listing

Owner
AW-CRK14
Published
2024-09-26
Updated on Modrinth
2024-09-26
Facts verified
2026-10-15

Tags