User Tools

Site Tools


tutorial:armor_trim

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
tutorial:armor_trim [2024/05/12 11:51] – changed the title herr_chaostutorial:armor_trim [2024/05/12 15:13] (current) – used yarn code correctly, fr this time herr_chaos
Line 5: Line 5:
 === Registering the Item === === Registering the Item ===
 In theory we don't need to add a new item since this is more data packed than it is modded, but if you would do this using only a data pack we would be missing the nice tooltip in the description of the Armor Trim item.\\  In theory we don't need to add a new item since this is more data packed than it is modded, but if you would do this using only a data pack we would be missing the nice tooltip in the description of the Armor Trim item.\\ 
-To register this item we need to register it as a new <file>SmithingTemplateItem.of(new Identifier(MOD_IDTRIM_ID))</file> The TrimId can be separate from the actual item name, but for ease of making we will use the same for both.\\ +To register this item we need to register it as a new  
 +''<yarn class_8052.method_48418(new class_2960(MODIDTRIMID)>'' 
 +The TrimId can be separate from the actual item name, but for ease of making we will use the same for both.\\ 
 For the rest we will just need the basic thingamajig of item registration: For the rest we will just need the basic thingamajig of item registration:
 <yarncode java [enable_line_numbers="true"]> <yarncode java [enable_line_numbers="true"]>
 // adding a new SmithingTemplateItem named "TUTORIAL_ARMOR_TRIM" with the MODID as "tutorial" and trimid as "tutorial_trim"  // adding a new SmithingTemplateItem named "TUTORIAL_ARMOR_TRIM" with the MODID as "tutorial" and trimid as "tutorial_trim" 
-public static final Item TUTORIAL_ARMOR_TRIM = SmithingTemplateItem.of(new Identifier("tutorial", "tutorial_armor_trim"));  +public static final class_1792 TUTORIAL_ARMOR_TRIM = class_8052.method_48418(new class_2960("tutorial", "tutorial_armor_trim")); 
 // registering said Item with MODID "tutorial" and name "tutorial_armor_trim"  // registering said Item with MODID "tutorial" and name "tutorial_armor_trim" 
 public static void registerModItems() { public static void registerModItems() {
-    Registry.register(Registries.ITEM, new Identifier("tutorial", "tutorial_armor_trim"), TUTORIAL_ARMOR_TRIM);  +    class_2378.method_10230(class_7923.field_41178, new class_2960("tutorial", "tutorial_armor_trim"), TUTORIAL_ARMOR_TRIM);
 } }
 </yarncode> </yarncode>
Line 197: Line 200:
 </file> </file>
 But now the question is: But now the question is:
-= How do I create these textures =+== How do I create these textures ==
 There are a lot of ways you could do this. For example you could: \\  There are a lot of ways you could do this. For example you could: \\ 
 Use skindex or any other skineditor to have a 3d view of what you're doing, but that would give you one texture and you need two or you could edit existing trims and go free style, but the best way I've found so far is to take one of the armor textures and put it into a pixel editing tool of your choice and then also get the color palette and paint over the armor texture. Then, when you're finished drawing, you just erase the original armor texture. By doing it this way you know where the armor can be modified, or better said where it should. \\  Use skindex or any other skineditor to have a 3d view of what you're doing, but that would give you one texture and you need two or you could edit existing trims and go free style, but the best way I've found so far is to take one of the armor textures and put it into a pixel editing tool of your choice and then also get the color palette and paint over the armor texture. Then, when you're finished drawing, you just erase the original armor texture. By doing it this way you know where the armor can be modified, or better said where it should. \\ 
tutorial/armor_trim.1715514717.txt.gz · Last modified: 2024/05/12 11:51 by herr_chaos