forked from GTNewHorizons/GTNHLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FalseTweaks threaded rendering compat
Fixes GTNewHorizons#53
- Loading branch information
1 parent
487393a
commit a7c3168
Showing
6 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// Add any additional repositories for your dependencies here | ||
|
||
repositories { | ||
|
||
maven { | ||
name = "mavenpattern" | ||
url = "https://mvn.falsepattern.com/releases/" | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/com/gtnewhorizon/gtnhlib/compat/FalseTweaksCompat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.gtnewhorizon.gtnhlib.compat; | ||
|
||
import com.falsepattern.falsetweaks.api.Modules; | ||
|
||
public class FalseTweaksCompat { | ||
|
||
private static final boolean PRESENT; | ||
|
||
static { | ||
boolean present = false; | ||
try { | ||
Modules.class.getName(); | ||
present = true; | ||
} catch (Throwable ignored) {} | ||
PRESENT = present; | ||
} | ||
|
||
public static boolean threadingActive() { | ||
if (PRESENT) { | ||
return ThreadingCompat.threadingActive(); | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
private static class ThreadingCompat { | ||
|
||
public static boolean threadingActive() { | ||
return Modules.threadingActive(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters