User Tools

Site Tools


← Go back to the homepage

Fabric Tutorials



These pages are essential must-reads when modding with Fabric, and modding Minecraft in general, if you are new to modding, it is recommended you read the following.


Blocks and Block Entities

Data Generation

World Generation


These pages will guide you through Mojang's Brigadier library which allows you to create commands with complex arguments and actions.


These pages will guide you through using the many events included in Fabric API, and how to create your own events for you or other mods to use.



Mixins & ASM

These pages will guide you through the usage of SpongePowered's Mixin library, which is a highly complex topic. We recommend you read these pages thoroughly.



Contribute to Fabric


Mining Levels


The way mining levels and preferred tools are assigned has changed significantly in 1.17. Making your tools and blocks interact properly now requires adding them to specific tags.

Setting the preferred tool for your block

To define what tool is used to harvest your block, you need to add the block's identifier to a tag inside of tags/blocks/mineable that corresponds to your tool (“pickaxe.json”,“axe.json”, etc.):

  "replace": false,
  "values": [

Fabric API also provides two additional tags fabric:mineable/sword and fabric:mineable/shears for blocks that can be harvested with a sword or shears. You put these tags in resources/data/fabric/tags/blocks/mineable/.

Setting the block's mining level

To add a mining level requirement to your block that is under netherite, you'll need to add it to one of these three tags inside tags/blocks:

Stone or higher -> needs_stone_tool.json
Iron or higher -> needs_iron_tool.json
Diamond or higher -> needs_diamond_tool.json

Here we make our late-game ore variants require a diamond tool to harvest:

  "replace": false,
  "values": [

Fabric API provides dynamic tags for mining levels above diamond, as well as for wood (mining level 0). Dynamic mining level tags are in the format fabric:needs_tool_level_N, where N is the wanted tool level as an integer. For example, a mining level tag for netherite (mining level 4) would be fabric:needs_tool_level_4. Dynamic tags are checked automatically. You put these tags in resources/fabric/tags/blocks/.

  "replace": false,
  "values": [

The default mining level of blocks not modified with mining level tags is -1 (the hand mining level).

Tool Tags

You will need to add your tool into the fabric tool tags to support modded blocks.

Example of adding a pickaxe to the pickaxes tag:

  "replace": false,
  "values": [
tutorial/mining_levels.txt · Last modified: 2022/09/29 05:07 by solidblock