Jump to content

My Armour Layer Textures Won't Load (1.12.2) [SOLVED]


fluenzia

Recommended Posts

This is my first time programming anything and first time modding in Minecraft (as a warning). I've been following a beginners tutorial in order to learn the basics (adding blocks, tools, armour, etc.) and everything has worked perfectly. Except for my armour layer models. I took them out of the base game files and only changed the colour, and even just renamed the base ones without any other changes to test it, but still just a black and purple man when the armour goes on. Since I'm a noob I don't really know what files to upload, so if I'm missing anything please let me know and I'll get it up as soon as possible.

ArmorBase.java ModItems.java

Edited by fluenzia
solved
Link to comment
Share on other sites

Are there any errors? Are you sure you've put your texture in the correct folder? 

 

I'm not quite sure on this, but do you need to implement IHasModel? If you're simply making a 'basic' armourpiece then all you need to do is extend ItemArmor.

 

If the item appears, 'works' (Has the right armour values etc.) and has names/stats except for the black and purple texture than all that's wrong is that it's either missing a texture or a model. 

 

 

Edit: An armour I have made in 1.12 follows the following structure: 

package com.cheese.brpg.item;
 
import com.cheese.brpg.main;
 
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
 
public class ItemTestarmor extends ItemArmor {
 
	public ItemTutorialArmor(ArmorMaterial material, EntityEquipmentSlot equipmentSlot) {
		super(material, 0, equipmentSlot);
		setCreativeTab(brpg.RANDOM_SHIT);
	}
 
}

 

 

Edited by oldcheese
Link to comment
Share on other sites

17 minutes ago, fluenzia said:

This is my first time programming anything and first time modding in Minecraft (as a warning). I've been following a beginners tutorial in order to learn the basics (adding blocks, tools, armour, etc.) and everything has worked perfectly. Except for my armour layer models. I took them out of the base game files and only changed the colour, and even just renamed the base ones without any other changes to test it, but still just a black and purple man when the armour goes on. Since I'm a noob I don't really know what files to upload, so if I'm missing anything please let me know and I'll get it up as soon as possible. 

I assume you mean the armor when it's on the player. You need to override getArmorTexture and return a path to your textures.

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.

Link to comment
Share on other sites

5 minutes ago, fluenzia said:

Where would I put this? In my ArmorBase,java? Sorry completely new to this

Yes that is where it would go.

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.

Link to comment
Share on other sites

6 minutes ago, Animefan8888 said:

Yes that is where it would go.

When I try to override it I get "The method getArmorTexture() of type ArmorBase must override or implement a supertype method" and my options are to remove the override annotation or create getArmourTexture in super type IHasModel, when I do this is gives me a bunch of errors

Link to comment
Share on other sites

45 minutes ago, oldcheese said:

Are there any errors? Are you sure you've put your texture in the correct folder? 

 

I'm not quite sure on this, but do you need to implement IHasModel? If you're simply making a 'basic' armourpiece then all you need to do is extend ItemArmor.

 

If the item appears, 'works' (Has the right armour values etc.) and has names/stats except for the black and purple texture than all that's wrong is that it's either missing a texture or a model. 

 

 

Edit: An armour I have made in 1.12 follows the following structure: 


package com.cheese.brpg.item;
 
import com.cheese.brpg.main;
 
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
 
public class ItemTestarmor extends ItemArmor {
 
	public ItemTutorialArmor(ArmorMaterial material, EntityEquipmentSlot equipmentSlot) {
		super(material, 0, equipmentSlot);
		setCreativeTab(brpg.RANDOM_SHIT);
	}
 
}

 

 

Everything works fine in game (the armour item textures work fine as well) it's just the textures for when you're wearing the armour

Link to comment
Share on other sites

27 minutes ago, fluenzia said:

getArmourTexture

Does not equal.

54 minutes ago, Animefan8888 said:

getArmorTexture

 

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.

Link to comment
Share on other sites

8 minutes ago, fluenzia said:

Sorry, I did type it as getArmorTexture, and I went back and double checked. I guess I'm just doing it wrong

 

Not sure what you mean here is the method working now or not? If not post your code.

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.

Link to comment
Share on other sites

4 minutes ago, Animefan8888 said:

Not sure what you mean here is the method working now or not? If not post your code.

it is not working when I put the method into IHasModels (which it tells me to do when I try to put it into ArmorBase.java) it tells me that everything that implements IHasModels now "must implement the inherited abstract method IHasModel.getArmorTexture()" 

IHasModel.java ArmorBase.java

Link to comment
Share on other sites

2 minutes ago, fluenzia said:

it is not working when I put the method into IHasModels

Well yeah because you need to override the one in the Item class. Check the method signature. The one in the Item class has parameters.

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.

Link to comment
Share on other sites

5 minutes ago, Animefan8888 said:

Well yeah because you need to override the one in the Item class. Check the method signature. The one in the Item class has parameters.

So each of my tools implements IHasModels (as that's what the tutorial I was watching, showed me to do) and to fix the errors I have to add the @Override to each class that implements IHasModel. would I just put the file path in the ArmorBase.java? 

Link to comment
Share on other sites

1 minute ago, fluenzia said:

So each of my tools implements IHasModels (as that's what the tutorial I was watching, showed me to do) and to fix the errors I have to add the @Override to each class that implements IHasModel. would I just put the file path in the ArmorBase.java? 

I am not talking about IHasModel. In the Item class there is a method called getArmorTexture if you dont know how to override it look it up on google.

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.

Link to comment
Share on other sites

I think it's not working because when creating your ArmorMaterial in your ModItems class you pass

Reference.MOD_ID + ":steel_ingot"

as the texture name.

So minecraft searches in your assets/MOD_ID/textures/models/armor folder for

steel_ingot_layer_1.png

and

steel_ingot_layer_2.png

But i don't think that are your texture file names.

Link to comment
Share on other sites

2 hours ago, Meldexun said:

I think it's not working because when creating your ArmorMaterial in your ModItems class you pass


Reference.MOD_ID + ":steel_ingot"

as the texture name.

So minecraft searches in your assets/MOD_ID/textures/models/armor folder for


steel_ingot_layer_1.png

and


steel_ingot_layer_2.png

But i don't think that are your texture file names.

You are jesus. THANK YOU SO MUCH!!!!

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.