Jump to content

{Solved}[1.10.2] Block texture unable to be located


Recommended Posts

Posted

Hi,

i have a very strange Issue trying to get my fresh new mod running from eclipse.

Its not a crash or any particular Error, its rather something very confusing.

 

Launching minecraft from eclipse, it says its unable to locate the Blocks texture ive set in its blockstate.json for sides:all.

[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:   DOMAIN lptwo
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:   domain lptwo is missing 1 texture
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:     domain lptwo has 1 location:
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:       mod lptwo resources at C:\Users\s.wienecke\workspace\Modding\LP2\bin
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:     The missing resources for domain lptwo are:
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:       textures/blocks/solid/ore_rutile.png
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]:     No other errors exist for domain lptwo
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[14:40:56] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

 

Full error log: http://pastebin.com/xzJmziHQ

 

 

The file in question though, IS IN THE RIGHT PLACE.

C:\Users\s.wienecke\workspace\Modding\LP2\bin\assets\lptwo\textures\blocks\solid\ore_rutile.png

also located in

C:\Users\s.wienecke\workspace\Modding\LP2\src\main\resources\assets\lptwo\textures\blocks\solid\ore_rutile.png

 

Ive tried countless things, moving arround the workspace, resrtucturing it to match the forge guideline...nothing helped.

even completely setting up everything from scratch does NOT work.

 

Code was approved by McJty, we both were unable to locate the issue.

ModelRessourceLocation is set and initialised propperly, domain is right....

 

Im running MC forge v12.18.3.2185, in Eclipse neon.1, windows 10

 

Issue has been Resolved.

Its not advisable to use 24-bit PNG files as they return an IOException in the Ressource Loader, caused by "Bad PNG signature"

Posted

Here is a picture of my project Setup.

http://imgur.com/a/eK0nI

 

Blockstate:

{
"forge_marker": 1,
"defaults": {
	"transform": "forge:default-block",
	"textures": {"all": "lptwo:blocks/solid/ore_rutile"},
	"model": "cube_all"
},
"variants": {
	"inventory": [{"textures": {"all": "lptwo:blocks/solid/ore_rutile"}}],
	"normal": [{"textures": {"all": "lptwo:blocks/solid/ore_rutile"}}]

}
}

 

models.block:

{
"parent": "block/cube_all",
  	"textures": {
    	"all": "lptwo:blocks/solid/ore_rutile"
  	}
}

 

models.item:

{
"parent":"lptwo:block/ore_rutile",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170 ],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375 ]
        }
    }
}

 

the block itself

public class BlockOreRutile extends Block{
public BlockOreRutile(){
	super(Material.ROCK);
	setUnlocalizedName(References.NAME_ORE_RUTILE);
	setRegistryName(References.RN_ORE_RUTILE);
	setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
	GameRegistry.register(this);
	GameRegistry.register(new ItemBlock(this), getRegistryName());
}

@SideOnly(Side.CLIENT)
public void initModel(){
	ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
}
}

Posted

Umm... Well, I'm no legend with code, but I'm pretty sure if it says it cannot find a texture, there must be some either

1) Name error/spelling error

2) The texture trying to be acquired is not in the right/specified place

 

Don't hate on me please, but these are my thoughts :D

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Posted

Umm... Well, I'm no legend with code, but I'm pretty sure if it says it cannot find a texture, there must be some either

1) Name error/spelling error

2) The texture trying to be acquired is not in the right/specified place

 

Don't hate on me please, but these are my thoughts :D

I thought this too at first, but everything is written correctly, no spelling mistakes(even used copy pasta to prevent it from being an issue.

As i said in the First post, the Textures are indeed in the right place. Its literally right where the domain searches for it.

 

The only problem i see, and that would be pretty dumb, is that its searching for the worng URL, using / instead of \ as windows requires. allthough, it is able to find all the JSON files in the same domain.

Posted

Did you check if the file is in the specific directory in the run directory (or whatever directory you specified as the run directory in your build.gradle)?

Posted

Did you check if the file is in the specific directory in the run directory (or whatever directory you specified as the run directory in your build.gradle)?

This is completely unaffected of what is in the run Directory. there is nothing in there after all

 

I want to launch MC from eclipse, and then be able to see my block texturised.

 

If you where to give the error i posted a closer read, it states:

"mod lptwo resources at C:\Users\s.wienecke\workspace\Modding\LP2\bin"

Texture "textures/blocks/solid/ore_rutile.png" is missing

 

Afaik, thats exactly the path where EXACTLY that file sits.

 

And YES i tried it, i put my resources in there, even though even the error states its not looking there, and oh wonder it didnt do anything about it

Posted

If the directory your workspace gets started from when you start MC from the IDE is "bin" than that is exactly the directory I meant. If you read what I wrote in brackets at the end, you would have known that. If you look into this folder you should find all your classes and resources in their original file structure in there. If that is not the case, then something is going really wrong in your workspace.

Posted

Did you check if the file is in the specific directory in the run directory (or whatever directory you specified as the run directory in your build.gradle)?

This is completely unaffected of what is in the run Directory. there is nothing in there after all

 

The run directory is just runtime stuff: world saves, screenshots, config files, etc.

The only directory you should have to worry about is src\main\resources, as that is copied to bin\main\resources when you click "run."

 

Can you show a screenshot of the directory structure as seen by Windows?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Yeah, sorry my thought process was a little off there, but there is a directory where the compiled classes and all resources are put in the structure they would have in a compiled jar and from there the game is started by GradleStart. If the texture isn't in there, something is weird.

Posted

First question is, why do you have this block model which you never use?

That was just me trying to fix things. Its not needed? fine. What about the Item Model? what do i parent it to then?

 

Have been grasping all straws i got looking through other mods

Posted

Your block model will not be used, because the blockstate does not refer to it.

Your item model is also redundant, it will never be used, because you already provided the "inventory" variant in the blockstate, without referring to the item model (which you couldn't, you cannot reference item models from a blockstate).

 

Could you give an example of where and how i reference the block model correctly?

Would highly apprechiate it

Posted

You see this bit in your blockstate file?

 

"model": "cube_all"

 

What do you suppose that does and what you might do to change it such that your model is used instead?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Huh...Json Files are fiyed up. Still unable to locate the damn texture...im going nutz

same issue, even tho the file IS THERE.

 

tried to set the default output folder from "bin" to "run". Same issue. it says there is no file, but im seeing it right there on my screen.

 

UNLESS the path it looks towards is NOT actually "bin\assets\lptwo\textures\blocks\solid\ore_rutile.png", but "bin\resources\assets\lptwo\textures\blocks\solid\ore_rutile.png".

But that wouldnt be pretty stupid

 

Posted

Can you show a screenshot of the directory structure as seen by Windows?

 

Here is the issue message again for comparison:

[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:   DOMAIN lptwo
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:   domain lptwo is missing 1 texture
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:     domain lptwo has 1 location:
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:       mod lptwo resources at D:\Modding\Minecraft\LP2\bin
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:     The missing resources for domain lptwo are:
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:       textures/blocks/solid/ore_rutile.png
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]:     No other errors exist for domain lptwo
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[01:09:05] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

 

and the folder structures towards the asset in bin: https://i.imgur.com/mrOjO5n.png

 

and towards the asset in src/main/resources: https://i.imgur.com/x7KsdPe.png

Posted

Huh...ill have to conduct the test again, but somehow it loses the texture during the loop. Resource location gets resolved fine but it just gets lost somewhere.

 

Ill locate the exact point later today

Posted

This is very strange.

Put a breakpoint in

TextureMap::loadTextureAtlas

(inside the for loop) and wait for your texture to show up there, then check why it does not load.

 

Managed to track the Error down to the Ressource Handler throwing an IOException, caused by "Bad PNG Signature".

 

I dont have any clue how to fix this...

Should I attempt to re-create my Texture?

Posted

Well, seeing it now has to do with your image having a bad signature, you can try saving it again or try to remake the image.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

This is very strange.

Put a breakpoint in

TextureMap::loadTextureAtlas

(inside the for loop) and wait for your texture to show up there, then check why it does not load.

 

Managed to track the Error down to the Ressource Handler throwing an IOException, caused by "Bad PNG Signature".

 

I dont have any clue how to fix this...

Should I attempt to re-create my Texture?

If you have an idea, just do it, then report back with that data.

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.

Posted

If you have an idea, just do it, then report back with that data.

I managed to fix the Problem by re-creating my Texture as a 32-bit PNG file instead of the Paint.net default of 24-bit.

 

Its now working as intended.

 

Maybe you guys should state somewhere that 24-bit PNG files will not be accepted.

Posted

If you have an idea, just do it, then report back with that data.

I managed to fix the Problem by re-creating my Texture as a 32-bit PNG file instead of the Paint.net default of 24-bit.

 

Its now working as intended.

 

Maybe you guys should state somewhere that 24-bit PNG files will not be accepted.

Minecraft only accepts multiples of 16.

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.

Posted

Minecraft only accepts multiples of 16.

Its strange tho, back in 1.8, the texture was 24-bit as well but got accepted fine.

 

Guess that doesnt matter now tho.

 

Thanks for the assistance everyone!

Posted

Minecraft only accepts multiples of 16.

Minecraft only accepts textures with a size of a multiple of 16x16 pixels. This has nothing to do with the color depth of the image, which indicates how many bits it uses for each color.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Minecraft only accepts multiples of 16.

Minecraft only accepts textures with a size of a multiple of 16x16 pixels. This has nothing to do with the color depth of the image, which indicates how many bits it uses for each color.

That is indeed what I meant. I believe that the op is using the word "bit" wrong.

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.

Posted

I managed to fix the Problem by re-creating my Texture as a 32-bit PNG file instead of the Paint.net default of 24-bit.

 

Its now working as intended.

 

Maybe you guys should state somewhere that 24-bit PNG files will not be accepted.

Minecraft only accepts multiples of 16.

 

He's talking color depth, not pixel dimensions.

http://stackoverflow.com/questions/22707130/what-is-difference-between-png8-and-png24

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.