-
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
You can apply overwrites to all blocks in a specific OreDict using the extra OreDict
section in the config file.
Configuration is done similar to the block
section.
S:"ore:wool"=FOO
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
If the prevent_block_destruction
config option is set to true
, a block you can't harvest can't be broken. But, you may still want to get rid of such a block without dropping anything. Prepending the overwrite with an exclamation mark, you can make a block destroyable.
# Make snow breakable by hand or any other tools than a shovel. However, when broken that way, it won't drop snowballs
S:"minecraft:snow_layer:*"=!shovel=0
Note: There is a config option to toggle the block destroyability for all blocks in the general.cfg config file
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
You can change the hardness of a block by appending the @
symbol followed by a number representing the new hardness value of the block.
# This makes obsidian harvestable as fast as iron ore
S:"minecraft:obsidian:*"=pickaxe=3@3
Look here for more details and some examples of block hardness values.
ATTENTION: See Notes!
- Bedrock is hardcoded to not be breakable at all.
- Even though you can add an overwrite for all blocks to be broken by hands in principle, there are blocks, which are practically not breakable because of the break speed. For example, Obsidian. You also need to change the hardness of those blocks.
- While reading the hardness of blocks could give a different value for each different meta value, Minecraft only allows changing the hardness for all meta values. Make sure to keep hardness values consistent! If you have different hardness overwrites for different meta values, the result is to complex for me to give you any predictions, which value would be set. You've been warned.