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!");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

View file

@ -0,0 +1,39 @@
{
"schemaVersion": 1,
"id": "nec",
"version": "${version}",
"name": "Not Enough Cursedness",
"description": "A Minecraft mode introducing every little bit of cursed items/behavior into the game!",
"authors": [
"Jonas_Jones"
],
"contact": {
"homepage": "https://jonasjones.me/projects/nec",
"sources": "https://github.com/J-onasJones/NotEnoughCursedness",
"issues": "https://github.com/J-onasJones/NotEnoughCursedness/issues"
},
"license": "CC0-1.0",
"icon": "assets/nec/icon.png",
"environment": "*",
"entrypoints": {
"main": [
"me.jonasjones.nec.NotEnoughCursedness"
]
},
"mixins": [
"nec.mixins.json"
],
"depends": {
"fabricloader": ">=0.14.17",
"fabric-api": "*",
"minecraft": "~1.19.4",
"java": ">=17"
},
"suggests": {
"another-mod": "*"
}
}

View file

@ -0,0 +1,14 @@
{
"required": true,
"minVersion": "0.8",
"package": "me.jonasjones.nec.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"client": [
"ExampleMixin"
],
"injectors": {
"defaultRequire": 1
}
}