This commit is contained in:
Morrígan 2025-06-25 19:20:25 +02:00
commit 1c6e3a2abf
Signed by: morrigan
GPG key ID: CACB010F463A77D0
16 changed files with 693 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package com.example.example_mod;
import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.qsl.base.api.entrypoint.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 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");
@Override
public void onInitialize(ModContainer mod) {
LOGGER.info("Hello Quilt world from {}!", mod.metadata().name());
}
}

View file

@ -0,0 +1,16 @@
package com.example.example_mod.mixin;
import com.example.example_mod.ExampleMod;
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 TitleScreenMixin {
@Inject(method = "init", at = @At("TAIL"))
public void onInit(CallbackInfo ci) {
ExampleMod.LOGGER.info("This line is printed by an example mod mixin!");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

View file

@ -0,0 +1,13 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.example.example_mod.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [],
"client": [
"TitleScreenMixin"
],
"injectors": {
"defaultRequire": 1
}
}

View file

@ -0,0 +1,40 @@
{
"schema_version": 1,
"quilt_loader": {
"group": "${group}",
"id": "example_mod",
"version": "${version}",
"metadata": {
"name": "Mod Name",
"description": "A short description of your mod.",
"contributors": {
"Your name here": "Owner"
},
"contact": {
"homepage": "https://example.com/",
"issues": "https://github.com/QuiltMC/quilt-template-mod/issues",
"sources": "https://github.com/QuiltMC/quilt-template-mod"
},
"icon": "assets/example_mod/icon.png"
},
"intermediate_mappings": "net.fabricmc:intermediary",
"entrypoints": {
"init": "com.example.example_mod.ExampleMod"
},
"depends": [
{
"id": "quilt_loader",
"versions": ">=0.19.1"
},
{
"id": "quilted_fabric_api",
"versions": ">=7.0.2"
},
{
"id": "minecraft",
"versions": ">=1.20"
}
]
},
"mixin": "example_mod.mixins.json"
}