Tags
Creators
Details
0.2.0-preview.2
Compatibility
Required content
Changes
Time for another content preview for Itematic. In this preview version the tool item behaviour was expanded slightly.
Changes
Item Behaviour Components
minecraft:tool
- Made changes to the tool rules:
- Added an optional
itemfield, which is an item predicate that checks the item stack that is used as a tool. - Made the
blocksfield optional. - Allowed 0 for the tool speed instead of it being strictly positive.
- Added an optional
- These changes were made in favour of expanding the behaviour of the
preserve_itemfield inminecraft:damageableas this can be controlled more precisely than a simple boolean and keeps the mining behaviour in this behaviour component.- Note that this behaviour can still be combined with the
preserve_itemfield to prevent the item from breaking and from being used as a tool altogether, which is likely preferred as an item stack may not necessarily be damaged by exactly one point.
- Note that this behaviour can still be combined with the
An example based on the minecraft:iron_pickaxe item that sets the mining speed to 0 when the durability is 1:
{
"minecraft:tool": {
"rules": [
{
"item": {
"predicates": {
"minecraft:damage": {
"durability": 1
}
}
},
"speed": 0.0
},
{
"blocks": "#minecraft:incorrect_for_iron_tool",
"correct_for_drops": false
},
{
"blocks": "#minecraft:mineable/pickaxe",
"correct_for_drops": true,
"speed": 6.0
}
]
}
}
Data Components
minecraft:tool
- Has the same changes as the
minecraft:toolbehaviour component.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:ZclAAHfk:el8xQDHW"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:ZclAAHfk:el8xQDHW"
}

