Compare commits
2 commits
16cfcac0c4
...
572b8e9783
Author | SHA1 | Date | |
---|---|---|---|
572b8e9783 | |||
d2066d8e5d |
3 changed files with 16 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
package xyz.minecommune.micomc;
|
||||
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.minecraft.server.command.CommandManager;
|
||||
import net.minecraft.text.Text;
|
||||
import org.quiltmc.loader.api.ModContainer;
|
||||
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -10,10 +13,21 @@ public class MicoMc implements ModInitializer {
|
|||
// This logger is used to write text to the console and the log file.
|
||||
// It is considered best practice to use your mod name as the logger's name.
|
||||
// That way, it's clear which mod wrote info, warnings, and errors.
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger("Example Mod");
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger("MicoMc");
|
||||
|
||||
@Override
|
||||
public void onInitialize(ModContainer mod) {
|
||||
LOGGER.info("Hello Quilt world from {}!", mod.metadata().name());
|
||||
CommandRegistrationCallback.EVENT.register(
|
||||
(dispatcher, registryAccess, enviroment) ->
|
||||
dispatcher.register(
|
||||
CommandManager.literal("foo").executes(context -> {
|
||||
context
|
||||
.getSource()
|
||||
.sendFeedback(() -> Text.literal("hii"), false);
|
||||
return 1;
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,5 +35,5 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"mixin": "mico-mod.mixins.json"
|
||||
"mixin": "micomc.mixins.json"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue