Mineuniverse
Mods
ObserverLib

ObserverLib

MOD
A Library mod that allows for generic area observation.
by HellFirePvP
Download Claim this project
18,245,588 downloads
0 likes
Updated Oct 14, 2026
0 hypes
API and Library
Advertisement Remove ads with Premium →

ObserverLib is a library mod, usable to reliably observe block changes in a potentially large area with very little performance implications.

 

The library is publicly usable and is primarily focused to be used in Astral Sorcery from 1.13+.

 

In essence this mod allows you to register an Observer - whatever it observes in the end is up to the implementation - for a specific area. Changes that happen in the world in its observed area are passed onto the Observer. The observer can then decide on its own what these changes mean; if they invalidate or validate the observer's state. So for example if the structure is now complete or not.

 

The actual call to check if things are valid or not is to query the ChangeSubscriber at the relevant position and then ask if its current state is valid or not.

 

What makes this better than generally just repeatedly checking a large area? What happens if the area you want to observe is larger than a chunk? What happens if the other chunk you have to check becomes unloaded? In order to be sure nothing has changed and the structure is intact, a mod would have to load said chunk and check the block. Potentially an issue if this causes a lot of chunk loading and unloading. The Implementation of ObserverLib makes sure you can relax and the changes passed onto your implementation of notifyChange contain all necessary information to make sure whatever you're observing is still valid or not.

 

One exemplary implementation for checking if a structure is built correctly or not can be seen here. Instead of always checking everything of the structure's components, the check makes sure to track the positions that are incorrect/mismatching and only works based off of mismatches to what the matcher expects.

 

If you're interested in using it for your own projects, you can grab it from maven here: https://maven.hellfiredev.net/hellfirepvp/observerlib/observerlib/ 

 

For further explanations and details, feel free to ask on the AstralSorcery discord: https://discord.gg/q37VRcT

ObserverLib-1.21.1-1.10.3.jar
MC Client, 1.21.1, NeoForge, Server
Alpha 2026-08-24 Get
ObserverLib-1.18.2-1.7.1.jar
MC Forge, 1.18.2
Release 2023-08-12 Get
ObserverLib-1.18.2-1.7.0.jar
MC 1.18.2, Forge
Release 2023-08-09 Get
ObserverLib-1.18.2-1.6.0.jar
MC 1.18.2, Forge
Beta 2022-05-28 Get
ObserverLib-1.16.5-1.5.3.jar
MC 1.16.5, Forge
Release 2021-06-01 Get
ObserverLib-1.16.5-1.5.2.jar
MC 1.16.5, Forge
Release 2021-05-23 Get
ObserverLib-1.16.4-1.5.1.jar
MC Forge, 1.16.4
Release 2021-01-08 Get
ObserverLib-1.16.4-1.5.0.jar
MC Forge, 1.16.4
Release 2021-01-02 Get
ObserverLib-1.16.4-1.4.4.jar
MC Forge, 1.16.4
Beta 2020-11-25 Get
ObserverLib-1.15.2-1.3.2.jar
MC 1.15.2, Forge
Release 2020-11-20 Get
ObserverLib-1.16.4-1.4.3.jar
MC Forge, 1.16.4
Beta 2020-11-20 Get
ObserverLib-1.15.2-1.3.1.jar
MC 1.15.2, Forge
Release 2020-11-06 Get
ObserverLib-1.15.2-1.2.1.jar
MC 1.15.2, Forge
Release 2020-10-22 Get
ObserverLib-1.15.2-1.2.0.jar
MC 1.15.2
Release 2020-07-18 Get
ObserverLib-1.14.3-1.1.0.jar
MC 1.14.3
Release 2019-07-05 Get
ObserverLib-1.13.2-1.0.0.jar
MC 1.13.2
Release 2019-05-30 Get

More from HellFirePvP

Advertisement Remove ads with Premium →

You Might Also Like