FAB Library

Mods
171,303 Downloads Last Updated: May 17, 2020 Game Version: 1.15.2

a1

The Find A Block Library assists in finding a specific block and keeping track of its location in a world efficiently. Especially useful when multiple mods depend on a specific blockstate in the world.


See the source code in the Github repository.
For more information on what the mod does and its public functions see the Wiki.


Configurable
blockCheckAroundEntitiesDelayMs (default = 30000, min 0, max 3600000): The delay of the is-there-a-block-around-check around entities in ms. Increasing this number can increase TPS if needed.


How to use the library in your project:
This is only for developing new mods. If you'd like to use a mod that depends on FAB Library, just download it from this page.
1. Add the following lines to your build.gradle file:




repositories {
    maven {
        url = "https://github.com/ricksouth/serilum-forge-maven/raw/maven/"
    }
}

dependencies {
    runtimeOnly fg.deobf("com.natamus.fablibrary:fablibrary:VERSION")
    compileOnly fg.deobf("com.natamus.fablibrary:fablibrary:VERSION")
}



2. Replace VERSION in the previous lines with mcversion-modversion, e.g. 1.14.4-1.1, or 1.15.2-1.1:
Partial Example: dependencies {
    runtimeOnly fg.deobf("com.natamus.fablibrary:fablibrary:1.15.2-1.0")


3. After that refresh your workspace by entering the following command in your project folder:
$ gradlew cleanEclipse eclipse --refresh-dependencies


4. Add the following lines to the bottom of mods.toml in your META-INF folder, replace YOURMODID with your mod's id:
[[dependencies.YOURMODID]]
    modId="fablibrary"
    mandatory=true
    versionRange="[1.1,)"
    ordering="NONE"
    side="BOTH"


5. When uploading the file to your mod project page on curseforge, make sure to select FAB Library as a dependent at the bottom:




b1
c1c2c3