-
Notifications
You must be signed in to change notification settings - Fork 4
Block overwrite
Blocks only have one possible tool class and a corresponding harvest level. These can be overwritten in the block_overwrites.cfg configuration file.
You can apply overwrites to all block states of one block using the wildcard * selector. The following will apply FOO to all different wool blocks.
S:"minecraft:wool:*"=FOO
You also can specify the metadata value to only apply an overwrite to a specific block state using the metadata selector. For instance, this will apply BAR only to the cyan wool block.
S:"minecraft:wool:9"=BAR
You can also mix wildcard and metadata selectors. This example will apply FOO to all different wool blocks, but BAR to cyan wool. Metadata selectors will take precedence over the wildcard selector.
S:"minecraft:wool:*"=FOO
S:"minecraft:wool:9"=BAR
There are three default tool classes in Minecraft, these are pickaxe, axe, and shovel. However, you're not limited only use these classes. You can invent new classes as you like.
For instance, you can add an overwrite for wool blocks to require at least a diamond shovel.
S:"minecraft:wool:*"=shovel=3
# ... or balance clay
S:"minecraft:clay:0"=shovel=3
You can also raise or lower the required harvest levels.
# Stone requires an iron pickaxe
S:"minecraft:stone:0"=pickaxe=2
# Diamond ore can be harvested with wood pickaxe
S:"minecraft:diamond_ore:0"=pickaxe=0
And you can also set that a tool is not required, but is an effective tool. This is done with prepending a question mark to the overwrite.
# Don't require any tool for harvesting dirt, but a shovel speeds it up
S:"minecraft:dirt:0"=?shovel=0
If a block should neither have a required tool nor an effective one, you can use the overwrite null=-1.
# For example, cauldrons are such a block
S:"minecraft:cauldron:0"=null=-1
You could also add a new tool class for hoes and make blocks only breakable by a hoe.
# Wheat can only be harvested with a diamond hoe. Finally, this thing has got a purpose in the game.
S:"minecraft:wheat:*"=hoe=3