Jump to content

Checking if a png file exists in a jar


tlr38usd

Recommended Posts

I have a weird system for texturing in my mod and I'd like to make it so that if texture packers include a png file with a certain name it will override my weird texturing system. I know in java there's a file.exists() function but that doesn't seem to work in a compiled jar.

Link to comment
Share on other sites

in a compiled jar.

<the more you know :D>jar files are only zipped file with a different extension btw</the more you know :D>

but, you can use JarEntry or ZipEntry class to check the content of your jar

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

Why would a texture maker put his png file in a jar ?

 

Good point. But hopefully you kinda know what I mean. I want my mod to check he current texture pack and if there is a png file with a certain name than overwrite my weird texturing system and use that png instead. How could I do this?

Link to comment
Share on other sites

Not really. What I'm doing currently is that each of my items has two different textures that are recolored depending on different variables. I have gotten requests from texture packers that I have an option for them to not use the default coloring system and instead use there own textures.

Link to comment
Share on other sites

I have a weird system for texturing in my mod and I'd like to make it so that if texture packers include a png file with a certain name it will override my weird texturing system. I know in java there's a file.exists() function but that doesn't seem to work in a compiled jar.

yeah ok, sooo .. whats the problem now xD ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

Not really. What I'm doing currently is that each of my items has two different textures that are recolored depending on different variables. I have gotten requests from texture packers that I have an option for them to not use the default coloring system and instead use there own textures.

I thought this issue was already handled by Minecraft due to 1.6 changes ?

All a texture maker would have to do is make a resource pack with the same folder system as your mod: assets/modid/textures...

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.