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:tag_convention [2020/08/20 12:13] – mounderfod | tutorial:tags [2023/09/13 15:38] – Change header organization haykam | ||
---|---|---|---|
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:// | ||
- | ===== Tag Example | + | Tags are groups of blocks, items, fluids, 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:// |
- | File Location: '' | + | |
+ | ===== Creating tags ===== | ||
+ | |||
+ | ==== Defining through JSON ==== | ||
+ | |||
+ | File Location: '' | ||
<code javascript> | <code javascript> | ||
{ | { | ||
" | " | ||
" | " | ||
- | "examplemod: | + | "tutorial: |
] | ] | ||
} | } | ||
</ | </ | ||
+ | |||
The ''" | The ''" | ||
- | ===== Common Tags vs Mod Tags ===== | + | ==== Accessing tags in code ===== |
- | If your tag applies ONLY to items in your mod, and no other mod is likely to have similar items, or you specifically | + | |
+ | For some cases, you might want to have tags as registered objects on code. For example, methods like '' | ||
+ | |||
+ | Vanilla tag objects can be found in class ''< | ||
+ | |||
+ | === Minecraft 1.19.3 and above === | ||
+ | |||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final TagKey< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === Minecraft 1.18.2 through 1.19.2 === | ||
+ | |||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final TagKey< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === Minecraft 1.17.1 through 1.18.1 === | ||
+ | |||
+ | In Minecraft 1.17.1 through 1.18.1, Fabric API provides a helper method for creating a tag: | ||
+ | |||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final Tag< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === Minecraft 1.17 and below === | ||
+ | |||
+ | In Minecraft 1.17 (not including Minecraft 1.17.1) and earlier versions, Fabric API provides a different API for creating a tag: | ||
+ | |||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final Tag< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Note that '' | ||
+ | |||
+ | ===== Conventional tags ===== | ||
+ | |||
+ | Conventional tags are a standardized tag naming scheme that aims to reduce guesswork and inconsistency for mod developers, data pack authors, and mod pack authors. These tags share the '' | ||
- | ======= Creating New Common Tags ======= | + | Conventional |
- | Common | + | |
- | ======= Existing Common Tags ======= | + | On the other hand, pieces of content that are unique enough to not be interchangable should not use conventional |
- | This section was [[https:// | + | |
- | ===== Item Tags ===== | + | ==== Creating new conventional tags ===== |
- | ^ Tag ID ^ Contained IDs ^ Defined | + | Conventional tags are simply tags in the '' |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:basalt| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c:chest| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| expandedstorage: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:diamonds| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:dye_any| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | :::| #c:dye_red| flonters | | + | |
- | | :::| # | + | |
- | | :::| # | + | |
- | | c: | + | |
- | | c:dye_blue| minecraft: | + | |
- | | c: | + | |
- | | c:dye_cyan| minecraft: | + | |
- | | c:dye_gray| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:dye_lime| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:dye_pink| minecraft: | + | |
- | | c: | + | |
- | | c:dye_red| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:emeralds| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | c: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:marble| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:quartz| minecraft: | + | |
- | | :::| cinderscapes: | + | |
- | | :::| cinderscapes: | + | |
- | | :::| cinderscapes: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:rubies| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| astromine: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:sulfurs| cinderscapes: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c:tin_ores| astromine: | + | |
- | | :::| astromine: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | ===== Block Tags ===== | + | - '' |
+ | - '' | ||
+ | - '' | ||
- | ^ Tag ID ^ Contained IDs ^ Defined by ^ | + | A flat structure is used rather than a hierarchal structure. For example, '' |
- | | c:aluminum_blocks| techreborn: | + | |
- | | c:basalt| minecraft: | + | |
- | | :::| minecraft: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | c:marble| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | :::| blockus: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c:tin_ores| indrev: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | :::| techreborn: | + | |
- | | c: | + | |
- | | c: | + | |
- | | c: | + | |
- | ===== Fluid Tags ===== | + | ==== Existing conventional tags ===== |
- | ^ Tag ID ^ Contained IDs ^ Defined by ^ | + | Fabric API ships definitions for conventional tags in its '' |
- | ===== Sources ===== | + | A (possibly outdated) directory of general known conventional tags is available on [[known_tags|a separate page]]. |
- | ^ Mod ID ^ Name ^ Version ^ URL ^ | ||
- | | flonters | Flonters | 1.1.0+1.16.1 | | | ||
- | | indrev | Industrial Revolution | 1.4.9-BETA | https:// | ||
- | | expandedstorage | ExpandedStorage | 5.3.15 | https:// | ||
- | | blockus | Blockus | 1.6.2 | https:// | ||
- | | endreborn | End: Rebellion | 1.6 | https:// | ||
- | | adorn | Adorn | 1.10.0+1.16.1 | https:// | ||
- | | techreborn | Tech Reborn | 3.4.5+build.88 | https:// | ||
- | | cinderscapes | Cinderscapes | 1.0.7+build.43-1.16.1 | None | | ||
- | | artofalchemy | Art of Alchemy | 1.0.0-rc2+1.16.1 | https:// | ||
- | | packages | Packages | 1.0 | https:// | ||
- | | astromine | Astromine | 1.5.2 | None | |
tutorial/tags.txt · Last modified: 2024/06/17 13:05 by solidblock