Simplify Tool Config Lib
This mod library significantly simplifies tool configuration in Minecraft by changing their basic parameters. If your mod contains various tools, swords, or other weapons, you now only need to specify one value for each tool property, while other Minecraft parameters are automatically reset to "0".
The main problem this library solves is fixing some values (int/float) that prevented setting precise parameters, especially for the "attack damage" indicator. Now you can directly set the desired values for selected tools without additional code settings.
For example: standard attack damage is "1", and attack speed is "4".
Integration into Your Mod
There are two ways to implement this library:
Direct Integration
Go to GitHub, download Java files and add them to the project, then perform import remapping.
Local Integration
Download the mod and add to the "build.gradle" file in the dependencies section:
dependencies {
modImplementation(fileTree("Local file path"))
}
Code Examples
Custom Tool Materials (Minecraft 1.20.1)
public enum CustomToolMaterials implements FixToolMaterial {
CUSTOM(mining level, item durability, mining speed, enchantability, ingredient)
...
Custom Tools
... CUSTOM_TOOL = register("custom_tool",
new SimplifySwordItem(materials, float Damage, float Speed, new FabricItemSettings()));
Method for Minecraft 1.20.6
public static CustomToolMaterials implement Tier {
CUSTOM(BlocksTags..., durability, enchantment value, repair ingredient);
...
Item CUSTOM_TOOL = register("custom_tool", new Fix...Item(material, new Item.properties().attribute(Fix...Item.createAttributes(damage, speed))));