Skip to content

Commit

Permalink
don't load AWT on macOS and add 'isometric-renders.disableClipboard' …
Browse files Browse the repository at this point in the history
…for force-disabling it
  • Loading branch information
gliscowo committed Jul 5, 2022
1 parent 68f3dc4 commit 469ac7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ minecraft_version=1.19
yarn_mappings=1.19+build.2
loader_version=0.14.7
# Mod Properties
mod_version=0.3.1
mod_version=0.3.2
maven_group=com.glisco
archives_base_name=isometric-renders
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.55.3+1.19

# https://maven.wispforest.io/io/wispforest/worldmesher/
worldmesher_version=0.2.10+1.19
worldmesher_version=0.2.11+1.19

# https://maven.wispforest.io/io/wispforest/exo/
exo_version=0.1.5+1.19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@

import java.awt.*;
import java.util.List;
import java.util.Locale;
import java.util.Set;

public class IsometricMixinPlugin implements IMixinConfigPlugin {

static {
// We force-initialize AWT here so that we can copy images
// into the clipboard later. MC specifically enables AWT
// headless mode which would prevent that
if (!GraphicsEnvironment.isHeadless()) {
Toolkit.getDefaultToolkit().getSystemClipboard();
if (!System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("mac") && !Boolean.getBoolean("isometric-renders.disableClipboard")) {
// We force-initialize AWT here so that we can copy images
// into the clipboard later. MC specifically enables AWT
// headless mode which would prevent that
if (!GraphicsEnvironment.isHeadless()) {
Toolkit.getDefaultToolkit().getSystemClipboard();
}
}
}

Expand Down

0 comments on commit 469ac7c

Please sign in to comment.