User Tools

Site Tools


tutorial:armor

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:armor [2022/06/24 07:17] – Remove [Adding Knockback Protection] as FAPI 0.55.1 obsoletes it daomephstatutorial:armor [2022/12/11 21:27] – Remove item group haykam
Line 92: Line 92:
 ==== Creating Armor Items ==== ==== Creating Armor Items ====
  
-We're gonna make a new class called RegisterItems to implement your new armor pieces. This will also be the place to, for example, register tools, if you're making a new item like an ingot (We'll refer to this as a "Custom_Material"). This setup will also put the items on a new Creative tab, but you're free to delete that part.  +We're gonna make a new class called RegisterItems to implement your new armor pieces. This will also be the place to, for example, register tools, if you're making a new item like an ingot (We'll refer to this as a "Custom_Material").
- +
-The syntax of groups is //.<yarn method_7892>(YourModName.YOUR_MOD_NAME_BUT_IN_CAPS_GROUP)//. I'll be referring to it as ExampleMod:+
  
 <yarncode java [enable_line_numbers="true"]> <yarncode java [enable_line_numbers="true"]>
Line 100: Line 98:
  
     public static final class_1741 CUSTOM_ARMOR_MATERIAL = new CustomArmorMaterial();     public static final class_1741 CUSTOM_ARMOR_MATERIAL = new CustomArmorMaterial();
-    public static final class_1792 CUSTOM_MATERIAL = new CustomMaterialItem(new class_1792.class_1793().method_7892(ExampleMod.EXAMPLE_MOD_GROUP));+    public static final class_1792 CUSTOM_MATERIAL = new CustomMaterialItem(new class_1792.class_1793());
     // If you made a new material, this is where you would note it.     // If you made a new material, this is where you would note it.
-    public static final class_1792 CUSTOM_MATERIAL_HELMET = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6169, new class_1792.class_1793().method_7892(ExampleMod.EXAMPLE_MOD_GROUP)); +    public static final class_1792 CUSTOM_MATERIAL_HELMET = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6169, new class_1792.class_1793()); 
-    public static final class_1792 CUSTOM_MATERIAL_CHESTPLATE = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6174, new class_1792.class_1793().method_7892(ExampleMod.EXAMPLE_MOD_GROUP)); +    public static final class_1792 CUSTOM_MATERIAL_CHESTPLATE = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6174, new class_1792.class_1793()); 
-    public static final class_1792 CUSTOM_MATERIAL_LEGGINGS = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6172, new class_1792.class_1793().method_7892(ExampleMod.EXAMPLE_MOD_GROUP)); +    public static final class_1792 CUSTOM_MATERIAL_LEGGINGS = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6172, new class_1792.class_1793()); 
-    public static final class_1792 CUSTOM_MATERIAL_BOOTS = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6166, new class_1792.class_1793().method_7892(ExampleMod.EXAMPLE_MOD_GROUP));+    public static final class_1792 CUSTOM_MATERIAL_BOOTS = new class_1738(CUSTOM_ARMOR_MATERIAL, class_1304.field_6166, new class_1792.class_1793());
  
 } }
Line 116: Line 114:
 <yarncode java [enable_line_numbers="true"]> <yarncode java [enable_line_numbers="true"]>
 public static void register() { public static void register() {
-    class_2378.method_10230(class_2378.field_11142, new class_2960("examplemod", "custom_material"), CUSTOM_MATERIAL); +    class_2378.method_10230(class_7923.field_41178, new class_2960("examplemod", "custom_material"), CUSTOM_MATERIAL); 
-    class_2378.method_10230(class_2378.field_11142, new class_2960("examplemod", "custom_material_helmet"), CUSTOM_MATERIAL_HELMET); +    class_2378.method_10230(class_7923.field_41178, new class_2960("examplemod", "custom_material_helmet"), CUSTOM_MATERIAL_HELMET); 
-    class_2378.method_10230(class_2378.field_11142, new class_2960("examplemod", "custom_material_chestplate"), CUSTOM_MATERIAL_CHESTPLATE); +    class_2378.method_10230(class_7923.field_41178, new class_2960("examplemod", "custom_material_chestplate"), CUSTOM_MATERIAL_CHESTPLATE); 
-    class_2378.method_10230(class_2378.field_11142, new class_2960("examplemod", "custom_material_leggings"), CUSTOM_MATERIAL_LEGGINGS); +    class_2378.method_10230(class_7923.field_41178, new class_2960("examplemod", "custom_material_leggings"), CUSTOM_MATERIAL_LEGGINGS); 
-    class_2378.method_10230(class_2378.field_11142, new class_2960("examplemod", "custom_material_boots"), CUSTOM_MATERIAL_BOOTS);+    class_2378.method_10230(class_7923.field_41178, new class_2960("examplemod", "custom_material_boots"), CUSTOM_MATERIAL_BOOTS);
 } }
 </yarncode> </yarncode>
tutorial/armor.txt · Last modified: 2023/08/20 10:19 by wjz_p