-
Notifications
You must be signed in to change notification settings - Fork 4
Concepts
This page describes a few basic concepts.
Breaking a block means that a player uses the left mouse button until the looked at block disappears. Players can break most blocks in Minecraft. When the block is broken with a proper tool or if it doesn't need a specific tool, this can be called harvesting, usually the block will then drop something. If the block isn't harvested, this is called destroying the block.
This mod expands the vanilla harvestability system to determine if a player can harvest a block. Each tool has one or more tool classes and every block can require a tool class. For example, stone blocks need a pickaxe
.
Some blocks don't require the usage of a tool with the correct tool class, but using one allows faster breaking. For example, wood logs can be harvest without a tool, but a lot faster with axes. Such a tool is called effective on the block.
Blocks and tools have a number, representing their respective harvest level. This level is always bound to a specific tool class. A block can have zero or one tool classes. In the case it doesn't have a tool class, the harvest level is -1. That means players can break the block without a tool. A tool can have several different tool classes with independent harvest levels. For example, the well-known paxel is a pickaxe, an axe, and a shovel in one tool.
By default, ToolProgression allows that not harvestable blocks are breakable. However, the config option prevent_block_destruction
prevents that players can destroy blocks. I recommend using this setting in a heavily alternated setup, such that players may not accidentally break blocks which aren't harvestable and by doing so destroying the drops.
.Some blocks, such as clay and logs, can by default be harvested without tools, but they also define one tool class with which harvesting those blocks is faster. Let's call such a tool effective for harvesting the block. In the given case, these are shovels and axes, respectively. In order to achieve this behavior, the harvest tool and the harvest level of the blocks are set to the tool requirement for effective harvesting, in particular, the harvest level is not -1 to begin with. However, to represent that the block is still harvestable by hand, the block material is used. The material defines several attributes of the block. Amongst others, this class has a method called isToolNotRequired()
, which returns a boolean value denoting whether you can or cannot harvest the block by hand.
Unlike their block pendant, tool materials act as a fallback for the harvest level. Tools do not have to specify their harvest level themselves, instead, the check falls back to the level given by the material. In this case, the harvest level of the tool itself is specified in the tool as -1, but the materials level is returned. The material also defines the number of uses, the efficiency, the attack damage, and the enchantability.
In TinkersConstruct harvest levels are completely done with Materials. Also, harvest levels are stored in the specific item as NBT data. Therefore, the harvest levels of existing TiC tools cannot be changed.
The concepts above are used to determine, whether a block can be harvested or not. The tool effectiveness and the block hardness are two opposing settings applied to tools and blocks, respectively.
The tool effectiveness is defined in the tool material and gives a tool an intrinsic speed bonus breaking blocks, they are effective against. The efficiency and the list of blocks a tool is effective against are hardcoded for vanilla Minecraft items and can barely be changed. Therefore, ToolProgression doesn't expose a setting for those. This means, for instance, even if you change the effective tool of a block from pickaxe to axe, an axe will never be as fast as a pickaxe. Keep this limitation in mind.
The block hardness determines their endurance against being broken. Tools will take longer to break blocks the harder they are. Block hardness also has some minor influence on the blast resistance of a block. For comparison, the hardness of several blocks:
- sand = 0.5
- dirt = 0.5
- grass = 0.6
- stone = 1.5
- logs = 2.0
- coal and iron ore = 3.0
- obsidian = 50