Posted September 18, 20169 yr Hello Dear Forum, Im stucking at a small problem ... i cant solve it i codet an armor, armor class: public class BlockUpdateArmorClass extends ItemArmor{ public BlockUpdateArmorClass(String unlocalizedName,ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); this.setUnlocalizedName(unlocalizedName); switch(armorType) { case 0: setUnlocalizedName("Test_Armor_Helmet"); break; case 1: setUnlocalizedName("Test_Armor_Chestplate"); break; case 2: setUnlocalizedName("Test_Armor_Legs"); break; case 3: setUnlocalizedName("Test_Armor_Boots"); break; } } } then i created a test material: public static ArmorMaterial Test_Armor_Material = EnumHelper.addArmorMaterial("Test_Armor_Material", "blockupdate:item", 16, new int[] {3, 8, 6, 3}, 30); then i registered it: Test_Armor_Helmet = new BlockUpdateArmorClass("Test_Armor_Helmet", Test_Armor_Material, 1, 0); Test_Armor_Chestplate = new BlockUpdateArmorClass("Test_Armor_Chestplate", Test_Armor_Material, 1, 1); Test_Armor_Legs = new BlockUpdateArmorClass("Test_Armor_Legs", Test_Armor_Material, 2, 2); Test_Armor_Boots = new BlockUpdateArmorClass("Test_Armor_Boots", Test_Armor_Material, 1, 3); GameRegistry.registerItem(Test_Armor_Helmet, Test_Armor_Helmet.getUnlocalizedName().substring(5)); GameRegistry.registerItem(Test_Armor_Chestplate, Test_Armor_Chestplate.getUnlocalizedName().substring(5)); GameRegistry.registerItem(Test_Armor_Legs, Test_Armor_Legs.getUnlocalizedName().substring(5)); GameRegistry.registerItem(Test_Armor_Boots, Test_Armor_Boots.getUnlocalizedName().substring(5)); the Json files are alright, here just to proof, the helmet for example: { "parent": "builtin/generated", "textures": { "layer0": "blockupdate:item/Test_Armor_Helmet" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } and there we go, the problem is at the "Layer" path in the new "Material", this is the path to my layers : src\main\resources\assets\blockupdate\textures\models\armor names of the Layers: Test_Armor_Layer1 Test_Armor_Layer2
September 18, 20169 yr The second string is what determines the name and the modid. When dealing with ArmorMaterials VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
September 18, 20169 yr Author modid : blockupdate string: Test_Armor_Layer1 Test_Armor_Layer2 and it dont work
September 18, 20169 yr Author just edited my class: public class BlockUpdateArmorClass extends ItemArmor{ public BlockUpdateArmorClass(ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); switch(armorType) { case 0: setUnlocalizedName("Test_Armor_Helmet"); break; case 1: setUnlocalizedName("Test_Armor_Chestplate"); break; case 2: setUnlocalizedName("Test_Armor_Legs"); break; case 3: setUnlocalizedName("Test_Armor_Boots"); break; } } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ if (slot == 0 || slot == 1 || slot == 3){ return "blockupdate:textures/models/armor/Test_Armor_Layer1"; } else if (slot == 2) { return "blockupdate:textures/models/armor/Test_Armor_Layer2"; } else { return null; } } } in this case i could leave the "PATH" to the layer empty ... but it still doesnt work .. anyone any suggestions?
September 18, 20169 yr just edited my class: public class BlockUpdateArmorClass extends ItemArmor{ public BlockUpdateArmorClass(ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); switch(armorType) { case 0: setUnlocalizedName("Test_Armor_Helmet"); break; case 1: setUnlocalizedName("Test_Armor_Chestplate"); break; case 2: setUnlocalizedName("Test_Armor_Legs"); break; case 3: setUnlocalizedName("Test_Armor_Boots"); break; } } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ if (slot == 0 || slot == 1 || slot == 3){ return "blockupdate:textures/models/armor/Test_Armor_Layer1"; } else if (slot == 2) { return "blockupdate:textures/models/armor/Test_Armor_Layer2"; } else { return null; } } } in this case i could leave the "PATH" to the layer empty ... but it still doesnt work .. anyone any suggestions? The first string is just the name the second string is the path. It would be like this "modid:test_armor" and the actual files need to be lower case. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
September 18, 20169 yr Author OK I FOUND IT!! thats to "gabrielbl" and to you "Animefan8888" , the problem was that i didnt wrote ".png" behind the layer texture ... , i found this at the post from gabriel, so now it work as this: @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ if (slot == 0 || slot == 1 || slot == 3){ return "blockupdate:textures/models/armor/test_armor_layer1.png"; } else if (slot == 2) { return "blockupdate:textures/models/armor/test_armor_layer2.png"; } else { return null; } } } thanks guys !
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.