repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

KLS check & jij

+17 -3
+1 -1
build.gradle.kts
··· 186 186 mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2") 187 187 modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}") 188 188 189 - modImplementation("dev.krysztal:krysztal-language-scala:3.3.0+scala.3.7.1") 189 + include(modImplementation("dev.krysztal:krysztal-language-scala:3.3.0+scala.3.7.1")!!) 190 190 include(modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}+$minecraft_version")!!) 191 191 include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:$cca_version")!!) 192 192 include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-world:$cca_version")!!)
+1 -1
gradle.properties
··· 17 17 kotlin_loader_version=1.13.4+kotlin.2.2.0 18 18 scala_loader_version=0.3.1.11 19 19 # Mod Properties 20 - mod_version=0.0.5 20 + mod_version=0.0.6 21 21 maven_group=org.net.eu.pool.mica 22 22 archives_base_name=mica 23 23 # Dependencies
+15 -1
src/main/scala/org/net/eu/pool/mica/Mica.scala
··· 6 6 import com.mojang.serialization.codecs.RecordCodecBuilder 7 7 import com.mojang.serialization.{Codec, DataResult, Decoder, DynamicOps, Encoder, Lifecycle, MapCodec} 8 8 import it.unimi.dsi.fastutil.longs.{Long2FloatMap, Long2IntMap, Long2IntMaps, Long2IntOpenHashMap, Long2LongMap} 9 + import net.fabricmc.loader.api.{FabricLoader, Version} 10 + import net.minecraft.Bootstrap 9 11 import net.minecraft.component.`type`.ProfileComponent 10 12 import net.minecraft.component.{ComponentChanges, ComponentType, DataComponentTypes} 11 13 import net.minecraft.entity.{Entity, ItemEntity, LivingEntity} ··· 1431 1433 extension [T] (x: T) 1432 1434 /** 1433 1435 * Tries to cast the value to the given type. 1434 - * @tparam R The destination type of the cast. 1436 + * @tparam R The destination type of the cast.git status- 1435 1437 * @return [[Some]] if the cast succeeds. 1436 1438 */ 1437 1439 def cast[R: ClassTag]: Option[R] = x match 1438 1440 case r: R => Some(r) 1439 1441 case _ => None 1440 1442 1443 + @tailrec 1444 + def panic(reason: String): Nothing = 1445 + Bootstrap.SYSOUT.println(s"thread '${Thread.currentThread.getName}' panicked at '$reason'") 1446 + Bootstrap.SYSOUT.flush() 1447 + Runtime.getRuntime.halt(101) 1448 + panic(reason) 1449 + 1441 1450 private[mica] class ComponentInitializer extends WorldComponentInitializer: 1442 1451 def registerWorldComponentFactories(factories: WorldComponentFactoryRegistry): Unit = 1443 1452 /*dnl*/ () /* ··· 1447 1456 Registry.register(Registries.DATA_COMPONENT_TYPE, Identifier.of(modid, "effect"), sideEffectComponent) 1448 1457 register() 1449 1458 println(s"Rune registry contains ${registryFor[Rune].size} runes") 1459 + val klsContainer = FabricLoader.getInstance().getModContainer("krysztal-language-scala").orElseGet(() => panic("no such mod 'krysztal-language-scala'")) 1460 + val scalaVersion = klsContainer.getMetadata.getVersion.getFriendlyString.split("\\+scala\\.")(1) 1461 + println(s"KLS version = $scalaVersion") 1462 + if (Version.parse(scalaVersion) compareTo Version.parse("3.7.1")) < 0 then 1463 + panic("mod 'krysztal-language-scala' bundles outdated version of scala. please use at least 3.7.1") 1450 1464 try 1451 1465 val config = Path.of("config/mica:extra_classes.txt") 1452 1466 if Files.exists(config) then