Mineuniverse
Log in Register
Mods

Krysztal's Language Scala

A fork of fabric-language-scala, but support the newest LTS version of Scala3
by krysztal112233
Download Claim this project
408 downloads
0 likes
Updated Jul 6, 2026
0 hypes
API and Library

Krysztal's fork of fabric-language-scala

Modrinth VersionCurseForge Version

This is a fork of fabric-language-scala,support the newest LTS Scala3 version and bundled Scala Library.

Why fork?

The number of people who use Scala is very small, but the power of Scala's expressiveness makes the language practically perfect for developing mods.

The original fabric-language-scala was unmaintained and the maintainers couldn't spare any more effort to maintain it, so it slowly became unmaintained and non-functional.

Support for Scala3 is, if anything, almost non-existent.

So I decided to fork it and maintain it myself and implement it to be compatible with the original fabric-language-scala,named krysztal-language-scala.

NOTE

  • This language adaptor will synchronize content upstream as much as possible and will ensure availability as much as possible.
  • This language adaptor only provide LTS version of Scala3

Bundled libraries

From a number of perspectives, the library needs to bind some popular scala libraries.

  • org.scala-lang:scala3-library_3:3.3.3
  • org.scala-lang:scala-library:2.13.12
  • org.typelevel:cats-core_3:2.12.0
  • com.chuusai:shapeless_2.13:2.3.12
  • org.typelevel:mouse_3:1.3.1

How to use?

Add dependence

Add those lines to your project's build.gradle


plugins {
  ...
	id 'scala' // Add `scala` plugin for gradle
  ...
}

repositories {
  ...
	maven { url "" rel="noopener nofollow" target="_blank">https://maven.dragons.plus/releases" }
  ...
}

dependencies {
  ...
	modImplementation "dev.krysztal:krysztal-language-scala:$VERSION$"
  ...
}

Usage: class

Suppose your entry name is ExampleEntry.scala

import net.fabricmc.api.ModInitializer;

class ExampleEntry extends ModInitializer {
   lazy val logger = LoggerFactory.getLogger("KMMO")
   override def onInitialize(): Unit = {
       logger.info("Hi")
   }
}

And in fabric.mod.json

    ...
 "entrypoints": {
    "main": [
      "dev.example.ExampleEntry"
    ],
  },
    ...

But thanks to Scala's excellent interoperability with Java, we can use this library simply as a Java entry point :)

Usage: object

Suppose your entry name is ExampleEntry.scala

import net.fabricmc.api.ModInitializer;

object ExampleEntry extends ModInitializer {
    lazy val logger = LoggerFactory.getLogger("KMMO")
    override def onInitialize(): Unit = {
        logger.info("Hi")
    }
}

And in fabric.mod.json

    ...
 "entrypoints": {
    "main": [
      {
        "adapter": "scala",
        "value": "dev.example.ExampleEntry"
      }
    ],
  },
    ...

Known issues

unknown invokedynamic bsm: scala/runtime*

This issues caused by scala's class loading mechanism.

It won't affect almost anything. Ignore it.

krysztal-language-scala 3.1.0+scala.3.3.4
MC 1.17.1, 1.19.3, 1.20.2, 1.21, 1.18.1, 1.20.5, 1.17, 1.19.4, Fabric, 1.18.2, 1.19.2, 1.20.3, 1.20.1, 1.20, 1.20.6, 1.19.1, 1.20.4, 1.21.3, 1.21.1, 1.18, 1.19, 1.21.2
Release 2024-11-24 Get

You Might Also Like

Vivecraft
A Minecraft VR mod on a loader of your choice!
9,988,339
Athena
A crossplatform (Forge/Fabric) solution to connected block textures for 1.19.4+
99,799,527
Lodestone
A collection of code used throughout projects under the Lodestar team.
9,914,417
TheDragonLib
A library for most of sokratis12GR's Mods
9,910,232
Multi Mob Library
A library mod containing essential files for Daveyx0's mob mods
9,892,767
FTB Library (Forge) (Legacy)
FTB Library is a library mod that is used for some of our mods.
98,265,314