Update code to reflect newer kotlin version

This commit is contained in:
DBotThePony 2023-02-10 19:04:29 +07:00
parent abe53a417f
commit 536c959f47
Signed by: DBot
GPG Key ID: DCC23B5715498507
3 changed files with 9 additions and 8 deletions

View File

@ -5,19 +5,20 @@ Minecraft mod with science fiction style, about matter, and energy, combined.
### Required mods
* [Kotlin for Forge](https://www.curseforge.com/minecraft/mc-mods/kotlin-for-forge) or have Kotlin standard library in classpath
* [Kotlin for Forge](https://www.curseforge.com/minecraft/mc-mods/kotlin-for-forge) or have Kotlin standard library in classpath (at least 1.8.0 is required)
* [Koremods](https://beta.curseforge.com/minecraft/mc-mods/koremods)
### Recommended mods
* [Ferrite Core](https://www.curseforge.com/minecraft/mc-mods/ferritecore), reduces memory usage
* In case of Overdrive That Matters, ***greatly*** reduces JVM heap bloat caused by model data being duplicated
### Supported mods
### Mods with special compatibility code
* [Mekanism](https://www.curseforge.com/minecraft/mc-mods/Mekanism) (full duplex Mekanism Joules support, QIO)
* [Curios](https://www.curseforge.com/minecraft/mc-mods/curios) (GUI support, technical inventory access)
* [Cosmetic Armor Reworked](https://www.curseforge.com/minecraft/mc-mods/cosmetic-armor-reworked) (GUI support, technical inventory access)
* [JEI](https://www.curseforge.com/minecraft/mc-mods/jei)
* [Mekanism](https://www.curseforge.com/minecraft/mc-mods/Mekanism)
* [Curios](https://www.curseforge.com/minecraft/mc-mods/curios)
* [Cosmetic Armor Reworked](https://www.curseforge.com/minecraft/mc-mods/cosmetic-armor-reworked)
----

View File

@ -76,8 +76,8 @@ public final class OverdriveThatMatters {
}
private static void checkIfKotlinIsInstalled() {
if (!KotlinVersion.CURRENT.isAtLeast(1, 6, 10)) {
throw new UnsupportedClassVersionError("Installed kotlin version is " + KotlinVersion.CURRENT + ", when at least 1.6.10 is required.");
if (!KotlinVersion.CURRENT.isAtLeast(1, 8, 0)) {
throw new UnsupportedClassVersionError("Installed kotlin version is " + KotlinVersion.CURRENT + ", when at least 1.8.0 is required.");
}
}

View File

@ -252,7 +252,7 @@ inline fun <T> MutableList<out Reference<out T>>.forValidRefs(fn: (T) -> Unit) {
}
val ComponentContents.key: String
get() = (this as? TranslatableContents ?: throw ClassCastException("$this is not a TranslatableContents"))?.key
get() = (this as? TranslatableContents ?: throw ClassCastException("$this is not a TranslatableContents")).key
fun <T : Comparable<T>> BlockState.getValueNullable(prop: Property<T>): T? {
if (hasProperty(prop)) {