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/02/27 17:56] – shnupbups | 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 13: | Line 13: | ||
</ | </ | ||
The ''" | The ''" | ||
+ | |||
+ | To register this tag and use it in your code, you will need to do the following (using the Fabric API): | ||
+ | <code java> | ||
+ | import net.fabricmc.fabric.api.tag.TagFactory; | ||
+ | import net.minecraft.block.Block; | ||
+ | import net.minecraft.tag.Tag; | ||
+ | import net.minecraft.util.Identifier; | ||
+ | |||
+ | public class BlockTags { | ||
+ | public static final Tag< | ||
+ | } | ||
+ | </ | ||
===== Common Tags vs Mod Tags ===== | ===== Common Tags vs Mod Tags ===== | ||
Line 165: | Line 177: | ||
| c: | | c: | ||
| c:bones| minecraft: | | c:bones| minecraft: | ||
- | | c: | + | | c:books| minecraft: |
+ | | :::| minecraft: | ||
+ | | :::| minecraft: | ||
+ | | :::| minecraft: | ||
+ | | :::| minecraft: | ||
+ | | :::| patchouli: | ||
+ | | c: | ||
+ | | :::| byg: | ||
| :::| byg: | | :::| byg: | ||
| :::| byg: | | :::| byg: | ||
Line 2120: | Line 2139: | ||
| c: | | c: | ||
| c: | | c: | ||
- | | c: | + | | c: |
+ | | :::| minecraft: | ||
| :::| atbyw: | | :::| atbyw: | ||
| :::| atbyw: | | :::| atbyw: | ||
Line 3007: | Line 3027: | ||
| exnihilofabrico | Ex Nihilo Fabrico | 0.3+1.14.4 | None | | | exnihilofabrico | Ex Nihilo Fabrico | 0.3+1.14.4 | None | | ||
| appliedenergistics2 | Applied Energistics 2 | 8.2.0-alpha.2 | https:// | | appliedenergistics2 | Applied Energistics 2 | 8.2.0-alpha.2 | https:// | ||
+ | | arcanus | Arcanus | 1.0 | https:// | ||
tutorial/tags.txt · Last modified: 2024/06/17 13:05 by solidblock