-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.kt
More file actions
24 lines (19 loc) · 963 Bytes
/
Example.kt
File metadata and controls
24 lines (19 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.example
import net.fabricmc.api.ClientModInitializer
import net.fabricmc.loader.api.FabricLoader
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
object Example : ClientModInitializer {
const val MOD_NAME = "Example"
const val MOD_ID = "example"
const val SYMBOL = "λ"
val VERSION: String = FabricLoader.getInstance()
.getModContainer(MOD_ID).orElseThrow()
.metadata.version.friendlyString
val LOG: Logger = LogManager.getLogger(SYMBOL)
// You do not need to register modules or commands as the mod depends on lambda, they will loaded
// into the class path and Lambda will use ClassGraph to scan the class path and load the classes.
// See com/lambda/util/reflections/Reflections.kt:39
// Realistically, you could even make an addon that isn't even a minecraft mod.
override fun onInitializeClient() = LOG.info("Plugin $MOD_NAME $VERSION initialized.")
}