#Texture missing error...

23 messages · Page 1 of 1 (latest)

normal jolt
#

Hi !
It has been already a few hours that I'm trying to use my texture.
My current texture is stored on src\main\resources\assets\launcherplayericon\textures\gui\player_icon.png
And my mod id (defined in the fabric.mod.json) is "id": "launcherplayericon".

Any ideas on why it is not working ?

#

Current error/code :

Missing resource launcherplayericon:textures/gui/player_icon.png referenced from launcherplayericon:textures/gui/player_icon.png
var icon = ResourceLocation.fromNamespaceAndPath("launcherplayericon", "textures/gui/player_icon.png");
fleet pebble
#

where are you using that resource location? like what method are you passing it to

normal jolt
#

mixin of EntityRenderer#renderNameTag

fleet pebble
#

so not using anything in GuiGraphics?

normal jolt
#

I don't know what's that so I guess not

fleet pebble
#

i ask cuz different places require different locations, some expect the .png some don’t, etc

normal jolt
#

oh okay, but no I don't think I'm using something like that

fleet pebble
#

show the line where you actually use the icon location

normal jolt
#

var renderType = RenderType.entityCutoutNoCull(icon);

fleet pebble
#

hm i believe what you have should work in this context, just to check do you have fabric api loaded (specifically the resource loader module)?

normal jolt
#

uhm, how do I check that ?

fleet pebble
#

it would show up in the output log when you first start the game

normal jolt
#

lemme chec

#

k

#

I don't see anything...

#

I need to add the mod FabricAPI to my minecraft ?

fleet pebble
#

yes if you don’t already you need to depend on it, otherwise none of the resources will be loaded from your mods jar

normal jolt
#

ohh

fleet pebble
#

you can look at the fabric template to see how to add it to build.gradle if needed

normal jolt
#

Okay thank you, I'll try that

#

I didn't know I needed that API

normal jolt
#

Thanks you, it's working !