aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-07-21 12:15:37 +0200
committerGitHub <noreply@github.com>2023-07-21 12:15:37 +0200
commit2c7e371cb8d566875d767dd20c4a1287d5275b2c (patch)
tree593b568f15ac5de7cbced5519f8850a37ea7aba7 /src
downloadSkyblockPlayersAnonymous-2c7e371cb8d566875d767dd20c4a1287d5275b2c.tar.gz
SkyblockPlayersAnonymous-2c7e371cb8d566875d767dd20c4a1287d5275b2c.tar.bz2
SkyblockPlayersAnonymous-2c7e371cb8d566875d767dd20c4a1287d5275b2c.zip
Initial commit
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/example/ExampleMod.java13
-rw-r--r--src/main/java/com/example/mixin/MixinGuiMainMenu.java16
-rw-r--r--src/main/resources/mcmod.info18
-rw-r--r--src/main/resources/mixins.examplemod.json11
4 files changed, 58 insertions, 0 deletions
diff --git a/src/main/java/com/example/ExampleMod.java b/src/main/java/com/example/ExampleMod.java
new file mode 100644
index 0000000..c18b591
--- /dev/null
+++ b/src/main/java/com/example/ExampleMod.java
@@ -0,0 +1,13 @@
+package com.example;
+
+import net.minecraft.init.Blocks;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.event.FMLInitializationEvent;
+
+@Mod(modid = "examplemod", useMetadata=true)
+public class ExampleMod {
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent event) {
+ System.out.println("Dirt: " + Blocks.dirt.getUnlocalizedName());
+ }
+}
diff --git a/src/main/java/com/example/mixin/MixinGuiMainMenu.java b/src/main/java/com/example/mixin/MixinGuiMainMenu.java
new file mode 100644
index 0000000..47eee87
--- /dev/null
+++ b/src/main/java/com/example/mixin/MixinGuiMainMenu.java
@@ -0,0 +1,16 @@
+package com.example.mixin;
+
+import net.minecraft.client.gui.GuiMainMenu;
+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(GuiMainMenu.class)
+public class MixinGuiMainMenu {
+
+ @Inject(method = "initGui", at = @At("HEAD"))
+ public void onInitGui(CallbackInfo ci) {
+ System.out.println("Hello from Main Menu!");
+ }
+}
diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info
new file mode 100644
index 0000000..ab6d5dd
--- /dev/null
+++ b/src/main/resources/mcmod.info
@@ -0,0 +1,18 @@
+[
+ {
+ "modid": "${modid}",
+ "name": "Xample Mod",
+ "description": "A mod that is used as an example.",
+ "version": "${version}",
+ "mcversion": "${mcversion}",
+ "url": "https://github.com/romangraef/Forge1.8.9Template/",
+ "updateUrl": "",
+ "authorList": [
+ "You"
+ ],
+ "credits": "",
+ "logoFile": "",
+ "screenshots": [],
+ "dependencies": []
+ }
+] \ No newline at end of file
diff --git a/src/main/resources/mixins.examplemod.json b/src/main/resources/mixins.examplemod.json
new file mode 100644
index 0000000..570a0d0
--- /dev/null
+++ b/src/main/resources/mixins.examplemod.json
@@ -0,0 +1,11 @@
+{
+ "package": "${mixinGroup}",
+ "refmap": "mixins.${modid}.refmap.json",
+ "minVersion": "0.7",
+ "compatibilityLevel": "JAVA_8",
+ "mixins": [
+ ],
+ "client": [
+ "MixinGuiMainMenu"
+ ]
+}