template
This commit is contained in:
commit
1c6e3a2abf
16 changed files with 693 additions and 0 deletions
18
src/main/java/com/example/example_mod/ExampleMod.java
Normal file
18
src/main/java/com/example/example_mod/ExampleMod.java
Normal 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());
|
||||
}
|
||||
}
|
|
@ -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!");
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/example_mod/icon.png
Normal file
BIN
src/main/resources/assets/example_mod/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 180 B |
13
src/main/resources/example_mod.mixins.json
Normal file
13
src/main/resources/example_mod.mixins.json
Normal 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
|
||||
}
|
||||
}
|
40
src/main/resources/quilt.mod.json
Normal file
40
src/main/resources/quilt.mod.json
Normal 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"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue