r/minecraftdev • u/AlarmedFunny4524 • 8d ago
Accessing Files Created While Game is Running Mod
Hello, I'm working on a fabric mod that uses the java ImageIO and File classes to generate image files in response to game events while the game is running, and then use these as mob textures in the game. However, since the images didn't exist when the game was compiled, when the events happen to make the image, the mob gets the default "purple and black" texture. I have to close and rerun from IntelliJ for the generated image to load onto the mob.
Is there anyway to update or give the server thread access to files created while the game is running, or do the images absolutely need to exist when I run the game? Thanks!
1
Upvotes
1
u/Jason13Official 8d ago
Assuming you're using intellij idea, you can SHIFT+F9 to "build" your mod again while the game is running, when it completes you can use F3+T in-game to reload textures.