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 [2022/05/24 11:41] – use <yarn(code)> expect for TagKey, for which is doesn't work, and Tag, which will be removed in 1.19 juuztutorial:tags [2022/06/22 07:40] – [1.17 and below, not including 1.17.1 (Requires Fabric API)] solidblock
Line 35: Line 35:
 </yarncode> </yarncode>
  
-==== 1.16.5 and below (Requires Fabric API) ====+==== 1.17 and below, not including 1.17.1 (Requires Fabric API) ====
 <yarncode java> <yarncode java>
 public class ModBlockTags { public class ModBlockTags {
Line 42: Line 42:
 </yarncode> </yarncode>
  
 +Note that `TagRegistry` is deprecated since Fabric API 0.46.0 where `TagFactory` is added, and which does not support 1.17.
 ===== Common Tags vs Mod Tags ===== ===== Common Tags vs Mod Tags =====
 If your tag applies ONLY to items in your mod, and no other mod is likely to have similar items, or you specifically want to only include your mod's items in that tag, then use ''yourmodid:yourtaghere'', with the example above. However, if your mod adds items which other mods also add, you can: If your tag applies ONLY to items in your mod, and no other mod is likely to have similar items, or you specifically want to only include your mod's items in that tag, then use ''yourmodid:yourtaghere'', with the example above. However, if your mod adds items which other mods also add, you can:
tutorial/tags.txt · Last modified: 2024/01/05 13:53 by cph101