CurseForge · Minecraft mod
ObserverLib
A Library mod that allows for generic area observation.
Quick answer
Which ObserverLib release should I use?
ObserverLib-1.18.2-1.7.1.jar targets 1.18.2 with Forge. The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server. No extra mods listed for this file.
Where it goes
Is ObserverLib required on the client, server, or both?
The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server.
The source does not explicitly classify this release as client-only or server-only.
What else does ObserverLib-1.18.2-1.7.1.jar need?
ObserverLib-1.18.2-1.7.1.jar. Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add ObserverLib without breaking your instance.
Built for ObserverLib-1.18.2-1.7.1.jar. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use ObserverLib-1.18.2-1.7.1.jar. It targets 1.18.2 with Forge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server.
- 04
Pick the file you checked
Use the “Get this file” button beside ObserverLib-1.18.2-1.7.1.jar. It opens that exact file at the source.
About this project
What does ObserverLib add?
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
Project description from CurseForge.
Pick your setup
ObserverLib by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.16.5
1 loader build1.16.4
1 loader build1.15.2
2 loader builds1.14.3
1 loader build1.13.2
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
ObserverLib versions and loaders
ObserverLib-1.18.2-1.7.1.jar
observerlib-1.18.2-1.7.1.jar
12 Aug 2023
ObserverLib-1.18.2-1.7.0.jar
observerlib-1.18.2-1.7.0.jar
9 Aug 2023
ObserverLib-1.18.2-1.6.0.jar
observerlib-1.18.2-1.6.0.jar
28 May 2022
ObserverLib-1.16.5-1.5.3.jar
observerlib-1.16.5-1.5.3.jar
1 Jun 2021
ObserverLib-1.16.5-1.5.2.jar
observerlib-1.16.5-1.5.2.jar
23 May 2021
ObserverLib-1.16.4-1.5.1.jar
observerlib-1.16.4-1.5.1.jar
8 Jan 2021
ObserverLib-1.16.4-1.5.0.jar
observerlib-1.16.4-1.5.0.jar
2 Jan 2021
ObserverLib-1.16.4-1.4.4.jar
observerlib-1.16.4-1.4.4.jar
25 Nov 2020
ObserverLib-1.16.4-1.4.3.jar
observerlib-1.16.4-1.4.3.jar
20 Nov 2020
ObserverLib-1.15.2-1.3.2.jar
observerlib-1.15.2-1.3.2.jar
20 Nov 2020
ObserverLib-1.15.2-1.3.1.jar
observerlib-1.15.2-1.3.1.jar
6 Nov 2020
ObserverLib-1.15.2-1.2.1.jar
observerlib-1.15.2-1.2.1.jar
22 Oct 2020
Looking for an older file? The official CurseForge project page is in Resources.