Template
Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package sib.bedohswe.hellofabric.examplemod;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Main implements ModInitializer {
|
||||
public static final String MOD_ID = "examplemod";
|
||||
public static final Logger LOGGER = Logger.getLogger(MOD_ID);
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
System.out.println("Hello Fabric world!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package sib.bedohswe.hellofabric.examplemod.mixin;
|
||||
|
||||
import sib.bedohswe.hellofabric.Main;
|
||||
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.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(Main.class)
|
||||
public class MainMixin {
|
||||
@Inject(method = "getMessage()Ljava/lang/String;", at = @At("RETURN"), cancellable = true)
|
||||
public void injectGetMessage(CallbackInfoReturnable<String> callbackInfo) {
|
||||
callbackInfo.setReturnValue("Goodbye World!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "sib.bedohswe.hellofabric.examplemod.mixin",
|
||||
"mixins": [
|
||||
"MainMixin"
|
||||
],
|
||||
"client": [],
|
||||
"server": [],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "examplemod",
|
||||
"version": "0.0.1",
|
||||
"name": "Example Mod",
|
||||
"description": "An example mod for HelloFabric",
|
||||
"authors": [
|
||||
"bʰedoh₂ swé"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://bedohswe.eu.org/"
|
||||
},
|
||||
"license": "0BSD",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"sib.bedohswe.hellofabric.examplemod.Main"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"examplemod.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.18.4",
|
||||
"hellofabric": "0.0.*"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user