fix writing to nonexistant dir in test debug
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-04-04 18:55:47 -04:00
parent 3511d8f81d
commit 29e7e3db00
2 changed files with 3 additions and 0 deletions

View File

@ -1440,6 +1440,7 @@ Client hitbox body destruction based on distance from player (for performance)
ServerEntityUtils move entity function properly transfers entity tags now
Fix ServerAttackTree freezing bug
Fix visually attaching item on server creating item at 0,0,0 on init (thereby creating a new datacell if its not nearby)
Fix test failure debug render writing to file

View File

@ -3,6 +3,7 @@ package electrosphere.test.testutils;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import javax.imageio.ImageIO;
@ -20,6 +21,7 @@ public class TestRenderingUtils {
public static void saveTestRender(String existingRenderPath){
BufferedImage screenshot = Globals.renderingEngine.defaultFramebuffer.getPixels(Globals.renderingEngine.getOpenGLState());
try {
Files.createDirectories(new File(existingRenderPath).toPath());
ImageIO.write(screenshot, "png", new File(existingRenderPath));
} catch (IOException e) {
// TODO Auto-generated catch block