Fix failed compilation from possible syntax errors (#2)
* fix cause of IllegalAccessException * logger not supposed to be private? * Revert "logger not supposed to be private?" This reverts commit4674c49b1b
. * Revert "fix cause of IllegalAccessException" This reverts commit1edbf0204d
. * Fix QMJ to use kotlin language adapter
This commit is contained in:
parent
a4f7f39196
commit
52195ceb2e
3 changed files with 6 additions and 3 deletions
|
@ -11,6 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
public class TitleScreenMixin {
|
public class TitleScreenMixin {
|
||||||
@Inject(method = "init", at = @At("TAIL"))
|
@Inject(method = "init", at = @At("TAIL"))
|
||||||
public void exampleMod$onInit(CallbackInfo ci) {
|
public void exampleMod$onInit(CallbackInfo ci) {
|
||||||
ExampleMod.Companion.getLOGGER().info("This line is printed by an example mod mixin!");
|
ExampleMod.INSTANCE.getLOGGER().info("This line is printed by an example mod mixin!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import org.slf4j.Logger
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
|
||||||
object ExampleMod : ModInitializer {
|
object ExampleMod : ModInitializer {
|
||||||
private val LOGGER: Logger = LoggerFactory.getLogger("Example Mod")
|
val LOGGER: Logger = LoggerFactory.getLogger("Example Mod")
|
||||||
|
|
||||||
override fun onInitialize(mod: ModContainer) {
|
override fun onInitialize(mod: ModContainer) {
|
||||||
LOGGER.info("Hello Quilt world from {}!", mod.metadata()?.name())
|
LOGGER.info("Hello Quilt world from {}!", mod.metadata()?.name())
|
||||||
|
|
|
@ -19,7 +19,10 @@
|
||||||
},
|
},
|
||||||
"intermediate_mappings": "net.fabricmc:intermediary",
|
"intermediate_mappings": "net.fabricmc:intermediary",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"init": "com.example.example_mod.ExampleMod"
|
"init": {
|
||||||
|
"adapter": "kotlin",
|
||||||
|
"value": "com.example.example_mod.ExampleMod"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"depends": [
|
"depends": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue