Jump to content

[1.7.2] Link File() To Assets


Bugzoo

Recommended Posts

Just a question, why are you using ImageIO? Also, try looking at the methods available for ResourceLocation, like this:

ImageIO.write(combined, "PNG", new ResourceLocation("tvmod", "textures/blocks/combined.png").toFile());

Or something like that.

I am the self-nominated Lord of the Mastodons and don't you dare deny it. ;) Also, check out my YouTube channel: https://www.youtube.com/user/DerpDerp44/

Link to comment
Share on other sites

Just a question, why are you using ImageIO? Also, try looking at the methods available for ResourceLocation, like this:

ImageIO.write(combined, "PNG", new ResourceLocation("tvmod", "textures/blocks/combined.png").toFile());

Or something like that.

 

There is no toFile() method, and i'm using it to combine two images together from within java

Link to comment
Share on other sites

So modding is just using Java, so you should just do file operations like you would normally.  Perhaps you can use the user home directory. 

 

In your pre-init method (the method that handles the FMLPreInitializationEvent event), the event that is passed has a field called: getSuggestedConfigurationFile()

 

You could take the path to that file and use same path for your file.  The point is that this is a place that the user already expects some Minecraft mod specific files, so it shouldn't be annoying to them if you do some other file activity there.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.