Set up mod info and stuff.
This commit is contained in:
parent
f4b08c13ef
commit
7729cd9b90
7 changed files with 28 additions and 57 deletions
|
@ -8,9 +8,9 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
loader_version=0.11.0
|
loader_version=0.11.0
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.0
|
maven_group = net.hazelra
|
||||||
maven_group = com.example
|
archives_base_name = traincarts
|
||||||
archives_base_name = fabric-example-mod
|
mod_version = 0.1.0
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package net.fabricmc.example;
|
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
|
||||||
|
|
||||||
public class ExampleMod implements ModInitializer {
|
|
||||||
@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.
|
|
||||||
|
|
||||||
System.out.println("Hello Fabric world!");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package net.fabricmc.example.mixin;
|
|
||||||
|
|
||||||
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) {
|
|
||||||
System.out.println("This line is printed by an example mod mixin!");
|
|
||||||
}
|
|
||||||
}
|
|
12
src/main/java/net/hazelra/traincarts/TraincartsMod.java
Normal file
12
src/main/java/net/hazelra/traincarts/TraincartsMod.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package net.hazelra.traincarts;
|
||||||
|
|
||||||
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
public class TraincartsMod implements ModInitializer {
|
||||||
|
public static final Logger log = LogManager.getLogger("Train Carts");
|
||||||
|
public static final String logPrefix = "[Train Carts]";
|
||||||
|
|
||||||
|
public void onInitialize() { log.info(logPrefix + "Hello, blocky world!"); }
|
||||||
|
}
|
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 453 B |
|
@ -1,37 +1,28 @@
|
||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "modid",
|
"id": "traincarts",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
|
|
||||||
"name": "Example Mod",
|
"name": "Train Carts",
|
||||||
"description": "This is an example description! Tell everyone what your mod is about!",
|
"description": "Allows linking trains together with chains.",
|
||||||
"authors": [
|
"authors": ["Hazel Snider"],
|
||||||
"Me!"
|
|
||||||
],
|
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://fabricmc.net/",
|
"homepage": "https://github.com/hazelLanes/traincarts",
|
||||||
"sources": "https://github.com/FabricMC/fabric-example-mod"
|
"sources": "https://github.com/hazelLanes/traincarts"
|
||||||
},
|
},
|
||||||
|
|
||||||
"license": "CC0-1.0",
|
"license": "MIT",
|
||||||
"icon": "assets/modid/icon.png",
|
"icon": "assets/traincarts/icon.png",
|
||||||
|
|
||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": ["net.hazelra.traincarts.TraincartsMod"]
|
||||||
"net.fabricmc.example.ExampleMod"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [],
|
||||||
"modid.mixins.json"
|
|
||||||
],
|
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.7.4",
|
"fabricloader": ">=0.7.4",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.16.x"
|
"minecraft": "1.16.x"
|
||||||
},
|
|
||||||
"suggests": {
|
|
||||||
"another-mod": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "net.fabricmc.example.mixin",
|
"package": "net.hazelra.traincarts.mixin",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"mixins": [
|
"mixins": [],
|
||||||
],
|
"client": ["ExampleMixin"],
|
||||||
"client": [
|
|
||||||
"ExampleMixin"
|
|
||||||
],
|
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
}
|
}
|
Loading…
Reference in a new issue