Jump to content

[1.19.3] Custom shield not working with custom texture material


TheDon57

Recommended Posts

Hello everyone,

I'm trying to create my own custom shield in 1.19.3 but I have a problem with the texture of the shield.
My custom texture isn't working with my shield item, while the vanilla texture works just fine. Even when I create the Material in my Renderer the same way as done in vanilla.

My texture is in the textures/entity folder of my mod. So I tried this:

public static final Material OBSIDIAN_SHIELD_BASE = new Material(Sheets.SHIELD_SHEET, new ResourceLocation(OresAndToolsMod.MOD_ID, "textures/entity/obsidian_shield_base.png"));

And I also tried:

public static final Material OBSIDIAN_SHIELD_BASE = new Material(Sheets.SHIELD_SHEET, new ResourceLocation(OresAndToolsMod.MOD_ID, "entity/obsidian_shield_base"));

But both ways doesn't seem to work. The shield is just black and pink in the game (the model is correct, only the texture is missing).
Of course I double checked, whether the texture is in the right directory, that can't be the problem.

Do I need to register the resource location of the item entity or something like that? Or do I have to create my own ModelLayer? I'm currently just using ModelLayers.SHIELD

Also it would be nice if I can apply pattern to my own shield. Can I use Sheets.SHIELD_SHEET for that or do I need to use a new ResourceLocation to "texures/atlas/obsidian_shield_patterns.png"?

If you want to have a look at the full code of my BEWLRenderer: GitHub - ModBEWLRenderer.java

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.



×
×
  • Create New...

Important Information

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