Fandom

Minecraft Mod Custom Stuff Wiki

EffectiveBlocks

175pages on
this wiki
Add New Page
Comments6 Share
This Article is up to date with Custom Stuff 2 CS2
CobblestoneBreak

Break cobblestone quickly an easily with your new shovel.

EffectiveBlocks defines which sorts of blocks will be able to be dug through quickly with a tool. This is in addition to the list that is part of it's toolClass. For example, setting a tool's toolClass to "axe" will make adding wood planks to this attribute redundant.

For example, if you wanted to create a shovel that could chop down trees you could add the following line to the item's .js file:

effectiveBlocks = "17";

Where "17" is the block ID of logs.

If you want to add multiple blocks to this attribute, separate them with a comma as so:

effectiveBlocks = "17,5,53,58,63,64,65,125,126,134,135,136";

If a block has metadata values, and you only want your tool to be able to quickly cut through one of them, you can specify metadata values like so:

effectiveBlocks = "17:2"

This tool will only cut quickly through Birch Logs, but not through any other type. Again, toolClass not withstanding.

CS1
Older Examples and Information for Custom Stuff 1.

When creating custom Tools, it's important to designate which sort of blocks the tool can break efficiently. The efficinencyblocks attribute does this. You can add this attribute to your item, designating as many blocks, block types, or other variables as you so desire.

For example:

efficiencyblocks="all";

This will make your tool quickly break any sort of block, with respect to that block's hardness of course.

There are several words that can be added to this attribute that have pre-determined effects and behave pretty much as one would expect them to. They are:

  • "all" - Tool cuts through every block quickly
  • "none" - Tool doesn't break any blocks quickly
  • "pickaxe" - As a vanilla pickaxe
  • "shovel" - As a vanilla shovel
  • "axe" - As a vanilla axe

In addition to this, you can specify individual block numbers by putting their IDs into this line, separated by commas. You can mix and match individual blocks and the above keywords as you see fit to create something unique.

For example, say we want to create an all-purpose axe that breaks stone as easily as it chops wood, and can break obsidian (blockID #49) quickly. We would add the following line to the .item file:

efficiencyblocks="pickaxe, axe, 49";

Important - Presently, values set in the efficiencyblocks attribute will only work correctly if they are also set as values for the harvestblocks attribute.

See also:

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.