Skip to content
Scala language provider for Minecraft 1.13.2 and newer
Scala Java
Branch: 1.14.4
Clone or download
Latest commit 8c5d53d Dec 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Just added comment Dec 1, 2019
.gitignore First commit May 5, 2019
README.md Update README.md Oct 26, 2019
build.gradle Update forge Nov 10, 2019
gradle.properties Update Scala version to 2.13.1 Sep 19, 2019

README.md

Scala language provider for Minecraft 1.14.4.

Branch 1.14.4

This mod adds Scala library to Minecraft 1.14.4 with Forge.

Usage

  • For Developer - In your build.gradle, add below code in top level.

    dependencies {
        def scala_version = getProperty("scala_version")
        def scala_major = getProperty("scala_major")
    
        // Change forge and minecraft version.
        minecraft 'net.minecraftforge:forge:1.14.4-28.0.55'
        implementation "org.scala-lang:scala-library:${scala_version}"
    
    }
    • Properties are set in your gradle.properties file or just hardcoded like def scala_version = "2.13.1".
    • scala_version should be 2.13.1 because this project contains binary of Scala 2.13.1. Make sure your version matches the version this mod provides. See this file
    • scala_major must be 2.13.

    If you want to write Mod entry class in Scala, add this jar to dependency. And.

    • Set modloader in your mods.toml file to "kotori_scala". (modLoader="kotori_scala") Loader version is like loaderVersion="[0,)".
    • See ScalaMC.scala and mods.toml in this project.
    • IMPORTANT - You can get Event Bus for each mod by calling ScalaLoadingContext.get().getModEventBus and IEventBus#addListener(Consumer), IEventBus#register(Object) work fine. But you can't use @Mod.EventBusSubscriber for inner objects because they don't have static methods in byte code. As for outer objects, @Mod.EventBusSubscriber may work if you pass FORGE as parameter but crash if you pass MOD due to the controlled access modifier.

    Then you can change mod entry class to Scala Object.

  • For Player - Download Jar file from Curse Forge and move the file to your mods folder. This mod doesn't appear in mods list.

You can’t perform that action at this time.