User Tools

Site Tools


tutorial:tags

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:tags [2021/07/27 06:42] justinhuprimetutorial: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://minecraft.gamepedia.com/Tag|Minecraft Wiki]]. Tags can also be used to group similar items from different mods, to allow them to be compatible with each other. These are called common tags.+Tags are groups of blocks, itemsfluids, biomes or other registry objects 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://minecraft.gamepedia.com/Tag|Minecraft Wiki]]. Tags can also be used to group similar items from different mods, to allow them to be compatible with each other. These are called common tags.
  
 ===== 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<Block> EXAMPLE_ORES = TagRegistry.block(new Identifier("examplemod", "example_ores"));+  public static final Tag<Block> EXAMPLE_ORES = TagFactory.BLOCK.create(new Identifier("examplemod", "example_ores"));
 } }
 </code> </code>
Line 177: Line 177:
 | c:bone_blocks| minecraft:bone_block| astromine-discoveries, astromine-foundations | | c:bone_blocks| minecraft:bone_block| astromine-discoveries, astromine-foundations |
 | c:bones| minecraft:bone| spatialharvesters | | c:bones| minecraft:bone| spatialharvesters |
-| c:bookshelves| byg:aspen_bookshelf| byg |+| c:books| minecraft:book| arcanus | 
 +| :::| minecraft:enchanted_book| arcanus | 
 +| :::| minecraft:knowledge_book| arcanus | 
 +| :::| minecraft:writable_book| arcanus | 
 +| :::| minecraft:written_book| arcanus | 
 +| :::| patchouli:guide_book| arcanus | 
 +| c:bookshelves| arcanus:fillable_bookshelf| arcanus | 
 +| :::| byg:aspen_bookshelf| byg |
 | :::| byg:baobab_bookshelf| byg | | :::| byg:baobab_bookshelf| byg |
 | :::| byg:blue_enchanted_bookshelf| byg | | :::| byg:blue_enchanted_bookshelf| byg |
Line 2132: Line 2139:
 | c:blue_sand| byg:blue_sand| byg | | c:blue_sand| byg:blue_sand| byg |
 | c:bone_blocks| minecraft:bone_block| astromine-discoveries, astromine-foundations | | c:bone_blocks| minecraft:bone_block| astromine-discoveries, astromine-foundations |
-| c:bookshelves| minecraft:bookshelf| betterend, atbyw |+| c:bookshelves| arcanus:fillable_bookshelf| arcanus | 
 +| :::| minecraft:bookshelf| betterend, atbyw |
 | :::| atbyw:spruce_bookshelf| atbyw | | :::| atbyw:spruce_bookshelf| atbyw |
 | :::| atbyw:birch_bookshelf| atbyw | | :::| atbyw:birch_bookshelf| atbyw |
Line 3019: 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://ae-mod.info/ | | appliedenergistics2 | Applied Energistics 2 | 8.2.0-alpha.2 | https://ae-mod.info/ |
 +| arcanus | Arcanus | 1.0 | https://github.com/CammiePone/Arcanus |
  
tutorial/tags.txt · Last modified: 2024/06/17 13:05 by solidblock