Community listing page, reviews here may not be monitored by the author.
Krysztal's Language Scala
No reviews yet
A fork of fabric-language-scala, but support the newest LTS version of Scala3
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Must be installed on both the client and the server.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
Krysztal's fork of fabric-language-scala
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.3org.scala-lang:scala-library:2.13.12org.typelevel:cats-core_3:2.12.0com.chuusai:shapeless_2.13:2.3.12org.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's fork of fabric-language-scala
This is a fork of fabric-language-scala, support the newest Scala3 version.
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 adapter will synchronize content upstream as much as possible and will ensure availability as much as possible.
- If you are DEVELOPER, please reading FOR_DEVELOPER, and remind your user which Scala3 version you used
- I suggested you should using the newest version as possible
- If you are USER, please reading FOR_USER
From KLS 3.3.2, the compile target is Java 25. Older Java runtimes are not supported.
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 "https://api.modrinth.com/maven" }
...
}
dependencies {
...
// Scala 3 language support (Fabric language adapter + Scala runtime, bundled at runtime by this mod).
implementation("maven.modrinth:krysztal-language-scala:${property("krysztal_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.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers