initial project structure

This commit is contained in:
Jonas_Jones 2023-04-04 04:28:44 +02:00
parent 248f74057c
commit 664a6f9b67
15 changed files with 740 additions and 0 deletions

View file

@ -0,0 +1,21 @@
package me.jonasjones.nec;
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class NotEnoughCursedness 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 id as the logger's name.
// That way, it's clear which mod wrote info, warnings, and errors.
public static final Logger LOGGER = LoggerFactory.getLogger("nec");
@Override
public void onInitialize() {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
LOGGER.info("Your game is now cursed!");
}
}

View file

@ -0,0 +1,16 @@
package me.jonasjones.nec.mixin;
import me.jonasjones.nec.NotEnoughCursedness;
import net.minecraft.client.gui.screen.TitleScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(TitleScreen.class)
public class ExampleMixin {
@Inject(at = @At("HEAD"), method = "init()V")
private void init(CallbackInfo info) {
NotEnoughCursedness.LOGGER.info("This line is printed by an example mod mixin!");
}
}