Important: CS2 no longer uses this attribute. Instead, a combination of the onRightClick and onUsing attributes are set to cause an item to be able to block like a sword does. See Example Tools for an example.
CS1 Custom Stuff 1

Information presented below this line is outdated syntax or information used for Custom Stuff 1. It will not work with Custom Stuff 2.

This attribute, despite its name, has absolutely nothing to do with blocks.

Rather, this item attribute allows you to guard against (or 'block' if you prefer) attacks with an item in the same way that a sword does.

The attribute is fairly straightforward since it only has two states: true and false. Because most items are not melee weapons, it is set to false by default. To set it to true, add the following line to the .item file:


It's important to note that only normal-type items can use this attribute.

See also