Skip to content

Commit 08e8911

Browse files
committed
Load lwjgl 3 blacklist as resource
1 parent 56d6ca0 commit 08e8911

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/lbq/jsongen/Generator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public Generator(Path dir, boolean update, boolean packToFolders, boolean genMan
5050
}
5151

5252
public void generate() throws IOException {
53-
JSONArray blacklistObj = parseJSONArray(Paths.get("src/main/resources/lwjgl3_blacklist.json"));
53+
JSONArray blacklistObj = parseJSONArray(ClassLoader.getSystemResourceAsStream("lwjgl3_blacklist.json"));
5454
lwjgl3Blacklist.clear();
5555
for (int i = 0; i < blacklistObj.length(); i++) {
5656
lwjgl3Blacklist.add(blacklistObj.getString(i));

src/main/java/lbq/jsongen/JSONUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public static boolean removeLibrary(JSONArray libraries, String org, String name
155155
boolean removed = false;
156156
for (int i = libraries.length() - 1; i >= 0; i--) {
157157
String[] libraryName2 = libraries.getJSONObject(i).getString("name").split(":");
158-
if (org.equals(libraryName2[0]) && name.equals(libraryName2[1])) {
158+
if (org.equals(libraryName2[0]) && libraryName2[1].startsWith(name)) {
159159
libraries.remove(i);
160160
removed = true;
161161
}

0 commit comments

Comments
 (0)