Merge branch 'kotlin-1.9.4' into kotlin-1.10

This commit is contained in:
octarine-noise
2016-09-17 08:33:33 +02:00
4 changed files with 8 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ apply plugin: 'kotlin'
group = 'com.github.octarine-noise' group = 'com.github.octarine-noise'
version = "2.1.1" version = "2.1.1"
archivesBaseName = rootProject.name + '-MC1.10.2' archivesBaseName = rootProject.name + '-MC1.10'
buildscript { buildscript {
ext.kotlin_version = '1.0.3' ext.kotlin_version = '1.0.3'

View File

@@ -57,7 +57,7 @@ object BetterFoliageMod {
PropertiesUtil(Properties()), PropertiesUtil(Properties()),
PrintStream(File(event.modConfigurationDirectory.parentFile, "logs/betterfoliage.log")) PrintStream(File(event.modConfigurationDirectory.parentFile, "logs/betterfoliage.log"))
) )
config = Configuration(event.suggestedConfigurationFile, null, false) config = Configuration(event.suggestedConfigurationFile, null, true)
} }
@Mod.EventHandler @Mod.EventHandler

View File

@@ -56,6 +56,6 @@ abstract class IdListConfigEntry<T>(
} }
override fun getComment() = I18n.format("${configElement.languageKey}.tooltip.element", "${GOLD}${item.itemName}${YELLOW}") override fun getComment() = I18n.format("${configElement.languageKey}.tooltip.element", "${GOLD}${item.itemName}${YELLOW}")
val booleanValue: Boolean get() = value as Boolean val booleanValue: Boolean get() = defaultValue as Boolean
} }
} }

View File

@@ -63,6 +63,11 @@ abstract class DelegatingConfig(val modId: String, val langPrefix: String) {
rootGuiElements.add(ConfigElement(configCategory)) rootGuiElements.add(ConfigElement(configCategory))
} }
save() save()
// hide all categories not in the config singleton
config.categoryNames.forEach {
config.getCategory(it).setShowInGui(it in subProperties.keySet())
}
} }
/** /**