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))
|
extendsFrom(getByName(mainSS.annotationProcessorConfigurationName))
|
||||||
}
|
}
|
||||||
(mainSS.runtimeOnlyConfigurationName) {
|
(mainSS.runtimeOnlyConfigurationName) {
|
||||||
extendsFrom(getByName(ss.runtimeClasspathConfigurationName))
|
// extendsFrom(getByName(ss.runtimeClasspathConfigurationName))
|
||||||
}
|
}
|
||||||
("ksp$upperName") {
|
("ksp$upperName") {
|
||||||
extendsFrom(ksp.get())
|
extendsFrom(ksp.get())
|
||||||
|
|||||||
@@ -82,13 +82,18 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun subscribeEvents() {
|
fun subscribeEvents() {
|
||||||
SubscriptionList.allLists.forEach {
|
SubscriptionList.allLists.forEach { list ->
|
||||||
it.provideSubscriptions {
|
runCatching {
|
||||||
|
list.provideSubscriptions {
|
||||||
it.owner.javaClass.classes.forEach {
|
it.owner.javaClass.classes.forEach {
|
||||||
runCatching { it.getDeclaredField("INSTANCE").get(null) }
|
runCatching { it.getDeclaredField("INSTANCE").get(null) }
|
||||||
}
|
}
|
||||||
subscribeSingleEvent(it)
|
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