Minecraftmodcustomstuff Wiki
Register
Advertisement
This Article is up to date with Custom Stuff 2 "Denotes content compatible with Custom Stuff 2"

This attribute defines the harvest level of the item. It works together with toolClass. For example, if toolClass is set to pickaxe and harvestLevel set to 2, the item can harvest all blocks registered with toolClass pickaxe and harvestLevel less than, or equal to, 2. Blocks that can be harvest this way are automatically affected by the efficiency of the item.

0 Wood
1 Stone / Gold
2 Iron
3 Diamond
4 Netherite

On the item side of things, this attribute is used on tools to signify which material the item is made of, or similar to in function. For example, if you were to create a pickaxe made of emerald, which is effectively the same as diamond in terms of mining power, you would set this attribute to "3", which would allow it to harvest obsidian.

By default, both blocks and items have a harvestLevel of 0, which is the being punched by hand. To change this, add the following line to the appropriate .js file.

Item:

harvestLevel = 1; // Harvesting power similar to wood.

Block:

harvestLevel[0] = 2; // Requires iron or better to be harvested.

CS1
Older Examples and Information for Custom Stuff 1.


Harvestlevel is a new attribute for both blocks and items introduced in Custom Stuff 2.3.0. It serves basically the same purpose on both blocks and items, albeit from opposite sides of the equation.

As a block attribute, harvest level determines which materials can properly harvest the block. Attempting to break a block with a tool below its harvestlevel will make it break slowly, as though not using a tool at all, and won't yield any drops. Important Note: Harvestlevel is only respected when the block's material is set to either 'rock' or 'iron'. For all other materials, the block will be able to be harvested by hand and broken efficiently with any tool referenced in its toolclass.

The line that you must add to your .block or .item file is as follows:

harvestlevel=0;

Replace "0" with one of the values of the table at right, based on the material you want your custom creation to be harvested by or to mimic.

==See Also==

Advertisement