You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Go through the libraries, remove the ones overridden by the custom version
52
48
val inheritLibraryList:MutableList<Library> =ArrayList(inheritsManifest.libraries)
@@ -128,26 +124,14 @@ fun getGameManifest(
128
124
return gameManifest0
129
125
}
130
126
131
-
/**
132
-
* [Modified from PojavLauncher](https://github.com/PojavLauncherTeam/PojavLauncher/blob/a6f3fc0/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java#L982-L996)
133
-
*/
134
-
// Prevent NullPointerException
135
-
privatefuninsertSafety(
136
-
target:GameManifest,
137
-
from:GameManifest,
138
-
varargkeyArr:String
139
-
) {
140
-
keyArr.forEach { key ->
141
-
var value:Any?=null
142
-
runCatching {
143
-
val fieldA = from.javaClass.getDeclaredField(key).apply { isAccessible =true }
144
-
value = fieldA.get(from)
145
-
if (((value isString) && (value asString).isNotEmpty()) || value !=null) {
146
-
val fieldB = target.javaClass.getDeclaredField(key).apply { isAccessible =true }
147
-
fieldB.set(target, value)
148
-
}
149
-
}.onFailure {
150
-
Logger.warning(TAG, "Unable to insert $key = $value", it)
0 commit comments