Custom ToolType - gisellevonbingen-Minecraft/MineColonies_Tweaks GitHub Wiki
Notice
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.
Summary
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
Simplest Example
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 explain
Level Tags
for 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
ToolType Specification
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}"
]
Element Specification
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 itemsthis value will be use to items are wasn't having level tagshould be 0 ~ 5if skipped, default level is defined by hasVariableMaterials |
3 | hasVariableMaterials | O | if skipped, this value will be false if true , default level be -1 else be 1 |
4 | translationKey | O | if skipped, will be minecolonies_tweaks.custom_tooltype.TOOL_NAME |
MineColonies' built-in ToolTypes
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 |
Tag
See here