Important
Docs for >=0.8.0 version is currently here
To get started use the Modrinth Maven to add this mod as a dependency
repositories { /* ... */ exclusiveContent { forRepository { maven { name = "Modrinth" url = "https://api.modrinth.com/maven" } } filter { includeGroup "maven.modrinth" } } } dependencies { /* ... */ modImplementation "maven.modrinth:area_lib:${project.area_lib_version}" }
You can retrieve the AreaSavedData using:
AreaSavedData
AreaLib.getSavedData(Level)
Additionally, you can directly access an area using:
getServerArea(MinecraftServer, ResourceLocation)
and
getClientArea(ResourceLocation)
The AreaSavedData stores all areas and is automatically synchronized with all clients.
To get a specific area you can use the AreaSavedData#get(ResourceLocation) method
AreaSavedData#get(ResourceLocation)
To check if a position is inside an area use Area#contains(Level, Vec3)
Area#contains(Level, Vec3)
Additionally Area#contains(Entity) can be used as a shortcut
Area#contains(Entity)