tutorial:tags
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:tags [2021/08/16 19:13] – [Sources] added Arcanus cammie | tutorial:tags [2021/10/01 15:43] – mention biomes and other registry objects in the beginning juuz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Tags ====== | ====== Tags ====== | ||
- | Tags are groups of blocks, items or fluids which share similar properties. They can be used in recipes to allow for multiple items to be used in the same recipe interchangeably. Read more on what tags are on the [[https:// | + | Tags are groups of blocks, items, fluids, biomes or other registry objects |
===== Tag Example ===== | ===== Tag Example ===== | ||
Line 16: | Line 16: | ||
To register this tag and use it in your code, you will need to do the following (using the Fabric API): | To register this tag and use it in your code, you will need to do the following (using the Fabric API): | ||
<code java> | <code java> | ||
- | import net.fabricmc.fabric.api.tag.TagRegistry; | + | import net.fabricmc.fabric.api.tag.TagFactory; |
import net.minecraft.block.Block; | import net.minecraft.block.Block; | ||
import net.minecraft.tag.Tag; | import net.minecraft.tag.Tag; | ||
Line 22: | Line 22: | ||
public class BlockTags { | public class BlockTags { | ||
- | public static final Tag< | + | public static final Tag< |
} | } | ||
</ | </ |
tutorial/tags.txt · Last modified: 2024/06/17 13:05 by solidblock