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
tutorial:tags [2024/06/12 18:34] – [Existing conventional tags] cph101tutorial:tags [2024/06/17 13:05] (current) solidblock
Line 7: Line 7:
 ==== Defining through JSON ==== ==== Defining through JSON ====
  
-File Location: ''src/main/resources/data/tutorial/tags/blocks/example_ores.json''+File Location:  
 +  * ''src/main/resources/data/tutorial/tags/**blocks**/example_ores.json'' (before 1.21) 
 +  * ''src/main/resources/data/tutorial/tags/**block**/example_ores.json'' (since 1.21)
  
 <code javascript> <code javascript>
Line 26: Line 28:
 Vanilla tag objects can be found in class ''<yarn class_3481>'' and ''<yarn class_3489>''. To register tag objects in your mod, see the following. Vanilla tag objects can be found in class ''<yarn class_3481>'' and ''<yarn class_3489>''. To register tag objects in your mod, see the following.
  
-=== Minecraft 1.19.3 and above ===+=== Minecraft 1.21 and above === 
 + 
 +<yarncode java> 
 +public class ModBlockTags { 
 +  public static final TagKey<class_2248> EXAMPLE_ORES = class_6862.method_40092(class_7924.field_41254, class_2960.of("tutorial", "example_ores")); 
 +
 +</yarncode> 
 + 
 +=== Minecraft 1.19.3 through 1.20.6 ===
  
 <yarncode java> <yarncode java>
tutorial/tags.1718217260.txt.gz · Last modified: 2024/06/12 18:34 by cph101