Skip to content

Commit

Permalink
Try not using an explicitly headless AWT environment
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Sep 17, 2021
1 parent 2a10154 commit f56c62a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions src/main/java/mcTextureGen/MCTextureGenerator.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package mcTextureGen;
import java.awt.GraphicsEnvironment;
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -39,17 +38,11 @@ public static AbstractTextureGenerator[] getTextureGenerators() {
};
}

public static void setupGraphics() {
System.setProperty("java.awt.headless", "true");
GraphicsEnvironment.getLocalGraphicsEnvironment();
}

public static void main(final String[] args) {
// TODO: Clean up
final Logger log = Logger.getLogger("MCTextureGenerator");
log.log(Level.INFO, "MCTextureGenerator: Generates and saves runtime-generated textures from various Minecraft versions.");
log.log(Level.FINE, "Setting up GraphicsEnvironment");
setupGraphics();

if (args.length > 0) {
if ((args.length % 2) == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
final class MCTextureGeneratorTest {

static {
MCTextureGenerator.setupGraphics();
AbstractTextureGenerator.setNonDeterministicFrames(1024);
}

Expand Down

2 comments on commit f56c62a

@muzikbike
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just found out that the missing texture probably existed before 13w02a. This report is from 1.4.6 (2012) and shows it:
https://bugs.mojang.com/browse/MC-5094

I'm not sure if you'd be able to dig and find an exact version?

@muzikbike
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I did the digging because the game actually responded much nicer than I expected to me cutting vital parts out o it. Opening new issue...

Please sign in to comment.