First step to my own mod
This commit is contained in:
parent
eab1b6b7a0
commit
3185cfb26d
19
src/main/java/dev/c0de/minecraft/c0deFoxMod.java
Normal file
19
src/main/java/dev/c0de/minecraft/c0deFoxMod.java
Normal file
@ -0,0 +1,19 @@
|
||||
package dev.c0de.minecraft;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class c0deFoxMod implements ModInitializer {
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger("c0defox");
|
||||
|
||||
@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("Hello world!");
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package net.fabricmc.example.mixin;
|
||||
package dev.c0de.minecraft.mixin;
|
||||
|
||||
import net.fabricmc.example.ExampleMod;
|
||||
import dev.c0de.minecraft.c0deFoxMod;
|
||||
import net.minecraft.client.gui.screen.TitleScreen;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@ -8,9 +8,10 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(TitleScreen.class)
|
||||
public class ExampleMixin {
|
||||
public class c0deFoxMixin {
|
||||
@Inject(at = @At("HEAD"), method = "init()V")
|
||||
private void init(CallbackInfo info) {
|
||||
ExampleMod.LOGGER.info("This line is printed by an example mod mixin!");
|
||||
c0deFoxMod.LOGGER.info("This line is printed by an example mod mixin!");
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
package net.fabricmc.example;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ExampleMod 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("modid");
|
||||
|
||||
@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("Hello Fabric world!");
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/c0defox/icon.png
Normal file
BIN
src/main/resources/assets/c0defox/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 453 B |
@ -1,12 +1,12 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "net.fabricmc.example.mixin",
|
||||
"package": "dev.c0de.minecraft.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"ExampleMixin"
|
||||
"c0deFoxMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
@ -1,25 +1,25 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "modid",
|
||||
"id": "c0defox",
|
||||
"version": "${version}",
|
||||
|
||||
"name": "Example Mod",
|
||||
"description": "This is an example description! Tell everyone what your mod is about!",
|
||||
"name": "c0de's client mod",
|
||||
"description": "Various tweaks and functions to play around with minecraft",
|
||||
"authors": [
|
||||
"Me!"
|
||||
"c0de"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://fabricmc.net/",
|
||||
"sources": "https://github.com/FabricMC/fabric-example-mod"
|
||||
"homepage": "https://c0defox.es",
|
||||
"sources": "https://c0de.dev/c0de/minecraft-mod"
|
||||
},
|
||||
|
||||
"license": "CC0-1.0",
|
||||
"license": "MIT",
|
||||
"icon": "assets/modid/icon.png",
|
||||
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"net.fabricmc.example.ExampleMod"
|
||||
"dev.c0de.minecraft.c0deFoxMod"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
|
Loading…
Reference in New Issue
Block a user