project setup

This commit is contained in:
Joseph Garcia 2020-11-03 17:37:26 -06:00
parent 22348a192c
commit 94f1874c41
6 changed files with 35 additions and 40 deletions

View File

@ -10,6 +10,13 @@ archivesBaseName = project.archives_base_name
version = project.mod_version version = project.mod_version
group = project.maven_group group = project.maven_group
repositories {
maven {
name = "CottonMC"
url = "https://server.bbkr.space/artifactory/libs-release"
}
}
dependencies { dependencies {
//to change the versions see the gradle.properties file //to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}" minecraft "com.mojang:minecraft:${project.minecraft_version}"
@ -21,6 +28,9 @@ dependencies {
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them. // You may need to force-disable transitiveness on them.
dependencies {
modImplementation "io.github.cottonmc:LibGui:3.2.1+1.16.3"
}
} }
processResources { processResources {

View File

@ -0,0 +1,13 @@
package com.josyf.macrobuttons;
import net.fabricmc.api.ModInitializer;
public class MacroButtons implements ModInitializer {
public static final String MOD_ID = "mgbuttons";
@Override
public void onInitialize() {
}
}

View File

@ -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!");
}
}

View File

@ -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!");
}
}

View File

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

View File

@ -1,35 +1,36 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"id": "modid", "id": "mgbuttons",
"version": "${version}", "version": "${version}",
"name": "Example Mod", "name": "Macro GUI Buttons",
"description": "This is an example description! Tell everyone what your mod is about!", "description": "Create GUI buttons in-game to execute macro commands.",
"authors": [ "authors": [
"Me!" "JosephG"
], ],
"contact": { "contact": {
"homepage": "https://fabricmc.net/", "homepage": "",
"sources": "https://github.com/FabricMC/fabric-example-mod" "sources": "https://github.com/joseph-garcia/macro-gui-buttons"
}, },
"license": "CC0-1.0", "license": "gpl-3.0",
"icon": "assets/modid/icon.png", "icon": "assets/mgbuttons/icon.png",
"environment": "*", "environment": "*",
"entrypoints": { "entrypoints": {
"main": [ "main": [
"net.fabricmc.example.ExampleMod" "com.josyf.macrobuttons.MacroButtons"
] ]
}, },
"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",
"fabric-key-binding-api-v1": "*"
}, },
"suggests": { "suggests": {
"flamingo": "*" "flamingo": "*"