fix: Crashing when launching without jade
This commit is contained in:
@@ -163,7 +163,7 @@ fun createIsolatedSourceSet(name: String, path: String = "compat/$name", isEnabl
|
||||
extendsFrom(getByName(mainSS.annotationProcessorConfigurationName))
|
||||
}
|
||||
(mainSS.runtimeOnlyConfigurationName) {
|
||||
extendsFrom(getByName(ss.runtimeClasspathConfigurationName))
|
||||
// extendsFrom(getByName(ss.runtimeClasspathConfigurationName))
|
||||
}
|
||||
("ksp$upperName") {
|
||||
extendsFrom(ksp.get())
|
||||
|
||||
@@ -82,13 +82,18 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
|
||||
}
|
||||
|
||||
fun subscribeEvents() {
|
||||
SubscriptionList.allLists.forEach {
|
||||
it.provideSubscriptions {
|
||||
SubscriptionList.allLists.forEach { list ->
|
||||
runCatching {
|
||||
list.provideSubscriptions {
|
||||
it.owner.javaClass.classes.forEach {
|
||||
runCatching { it.getDeclaredField("INSTANCE").get(null) }
|
||||
}
|
||||
subscribeSingleEvent(it)
|
||||
}
|
||||
}.getOrElse {
|
||||
// TODO: allow annotating source sets to specifically opt out of loading for mods, maybe automatically
|
||||
Firmament.logger.info("Ignoring events from $list, likely due to a missing compat mod.", it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user