RadiusToolLib
Library specifically designed for developing mining and building tools with extended radius functionality in Minecraft.
Setting Up the Dependency
To include the library in your project, add the following lines to your build.gradle file:
repositories {
maven {
url = "https://api.modrinth.com/maven"
}
}
dependencies {
// Option 1: Include the library directly in your mod (additional ~20kb)
include(modImplementation("maven.modrinth:rt-lib:<mod-version>"))
// Option 2: Set it as a dependency requiring users to install the library manually
modImplementation("maven.modrinth:rt-lib:<mod-version>")
}
Alternatively, specify the dependency in fabric.mod.json file:
"depends": {
"fabricloader": "",
...
"rt-lib": ""
},
Practical Implementation
Example of creating a pickaxe with extended resource harvesting range:
public class ModName implements ModInitializer {
// Creating radial pickaxe //Material //Damage+Speed //Radius
public static final RadiusPickaxe RADIUS_PICKAXE = new RadiusPickaxe(ToolMaterials.NETHERITE, 4, 1.0f, new FabricItemSettings(), 1);
/
Radius parameter determines tool's working area:
- value 1 = 3x3 block mining area
- value 2 = 5x5 block mining area
- and so on accordingly...
/
@Override
public void onInitialize() {
Registry.register(Registries.ITEM, new Identifier("your_mod_identifier",
"radius_pickaxe"), RADIUS_PICKAXE);
}
}
This library opens possibilities for creating various enhanced radius tools using simple and intuitive API.