Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

ImageIO uses a file for the parameters, but instead I want to use something like ResourceLocation, is this possible?

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

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/

  • Author

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

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/

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.