Repository navigation
Custom ToolType
Giselle edited this page Nov 27, 2024
·
16 revisions
This page is for 1.19.2 or under 1.20.1-2.35.
Please See Ver. 2 Page if version >= 1.20.1-2.35.
Custom ToolType can be declare at common config.
This will add a new tool for Citizen's work.
See the completed example => https://github.com/supernova0102/Colonial-Delight_compat
This is simplest example what add 'knives' tool type.
- Declare custom tool type.
minecolonies_tweaks-common.toml
[tools]
customTypes = ["{\"name\": \"knives\", \"hasVariableMaterials\": false}"]
- Create a new tag to register items to custom tool type.
Skipped explainLevel Tagsfor now.
data/minecolonies_tweaks/tags/items/custom_tools/knives.json
{
"values":[
"farmersdelight:flint_knife",
"farmersdelight:golden_knife",
"farmersdelight:iron_knife",
"farmersdelight:diamond_knife",
"farmersdelight:netherite_knife"
]
}- Add recipe used added custom tool type.
data/minecolonies/crafterrecipes/assistantcook/test.json
{
"type": "recipe",
"crafter": "cookassistant_crafting",
"inputs": [
{
"item":"minecraft:beef"
}
],
"intermediate": "minecraft:air",
"count":"2",
"result":"farmersdelight:minced_beef",
"tool": "knives"
}- Add translation
assets/minecolonies_tweaks/lang/en_us.json
{
"minecolonies_tweaks.custom_tooltype.knives": "Knives"
}- Check in game


Can declare multiple Custom ToolType.
Just add elements at Config.
Need RESTART client/server instance when config changed.
Also should client/server must have same data.
minecolonies_tweaks-common.toml
[tools]
customTypes = [
"{\"name\": \"knives\", \"hasVariableMaterials\": false}",
"{\"name\": \"guns\", \"defaultLevel\": 3}"
]| No. | Key | Skippable | Desc. |
|---|---|---|---|
| 1 | name | X | should be consist of only lowercase alphabet and number and _ ([a-z0-9_]) |
| 2 | defaultLevel | O | set default tool/mining level for items this value will be use to items are wasn't having level tag should be 0 ~ 5 if skipped, default level is defined by hasVariableMaterials
|
| 3 | hasVariableMaterials | O | if skipped, this value will be falseif true, default level be -1 else be 1 |
| 4 | translationKey | O | if skipped, will be minecolonies_tweaks.custom_tooltype.TOOL_NAME
|
| Name | Usage |
|---|---|
| none | None |
| pickaxe | Pickaxes |
| shovel | Shovels |
| axe | Axes |
| hoe | Hoes |
| sword | Swords |
| bow | Bows |
| rod | Fishing Rods |
| shears | Shears |
| shield | Shields |
| helmet | Helmets |
| leggings | Leggings |
| chestplate | Chestplates |
| boots | Boots |
| flintandsteel | Flint and steels |
See here