Simple block data
This library allows attaching arbitrary data to block coordinates in Minecraft.
Important warning: The library is in beta testing stage. Errors and unstable operation are possible. If problems are detected, report them in the project repository.
Installation
To connect the library, add the following lines to the build.gradle file. The current version at the moment is v1.0.4
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
modApi include("com.github.ansquare-eu:simple-block-data:{version}")
}
Usage
To work with block data, use the .set and .get methods from BlockDataApi. These methods allow saving and retrieving information associated with a specific block position in the world.
Code example:
// Getting a boolean value
boolean bool = BlockDataApi.getBoolean(pos, world, "key");
// Setting a boolean value
BlockDataApi.setBoolean(pos, world, "key", false);