update
This commit is contained in:
parent
8565e92526
commit
81df76869f
@ -1,6 +1,6 @@
|
||||
# Meteor Addon Template
|
||||
|
||||
A template to allow easy usage of the Meteor Client API.
|
||||
A template to allow easy usage of the Meteor Addon API.
|
||||
|
||||
### How to use:
|
||||
- Clone this project
|
||||
|
38
build.gradle
38
build.gradle
@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.6-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
@ -16,17 +15,12 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// To change the versions see the gradle.properties file
|
||||
//Minecraft
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||
// You may need to force-disable transitiveness on them.
|
||||
|
||||
//Meteor
|
||||
modImplementation "com.github.MeteorDevelopment:meteor-client:master-SNAPSHOT"
|
||||
}
|
||||
|
||||
@ -39,37 +33,27 @@ processResources {
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||
// If Javadoc is generated, this must be specified in that task too.
|
||||
it.options.encoding = "UTF-8"
|
||||
|
||||
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
||||
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
||||
// We'll use that if it's available, but otherwise we'll use the older option.
|
||||
def targetVersion = 8
|
||||
if (JavaVersion.current().isJava9Compatible()) {
|
||||
it.options.release = targetVersion
|
||||
it.options.release = targetVersion
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
}
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
// add all the jars that should be included when publishing to maven
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
@ -78,10 +62,4 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Select the repositories you want to publish to
|
||||
// To publish to maven local, no extra repositories are necessary. Just use the task `publishToMavenLocal`.
|
||||
repositories {
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +1,17 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# Minecraft
|
||||
minecraft_version=1.16.5
|
||||
|
||||
# Fabric Properties
|
||||
fabric_version=0.30.3+1.16
|
||||
yarn_mappings=1.16.5+build.4
|
||||
loader_version=0.11.1
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 0.0.1
|
||||
maven_group = meteordevelopment.exampleaddon
|
||||
archives_base_name = example-addon
|
||||
mod_version = 0.1
|
||||
maven_group = meteordevelopment.addons
|
||||
archives_base_name = example
|
||||
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
fabric_version=0.30.3+1.16
|
||||
|
@ -1,7 +1,7 @@
|
||||
package meteordevelopment.exampleaddon;
|
||||
package meteordevelopment.addons.example;
|
||||
|
||||
import meteordevelopment.exampleaddon.modules.ExampleModule;
|
||||
import meteordevelopment.exampleaddon.modules.ExampleModule2;
|
||||
import meteordevelopment.addons.example.modules.ExampleModule;
|
||||
import meteordevelopment.addons.example.modules.ExampleModule2;
|
||||
import minegame159.meteorclient.MeteorAddon;
|
||||
import minegame159.meteorclient.modules.Category;
|
||||
import minegame159.meteorclient.modules.Modules;
|
||||
@ -9,18 +9,20 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class ExampleAddon extends MeteorAddon {
|
||||
|
||||
public static final Logger LOG = LogManager.getLogger();
|
||||
public static final Category CATEGORY = new Category("Example");
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
LOG.info("Initializing Meteor Addon");
|
||||
Modules.get().addModule(new ExampleModule());
|
||||
Modules.get().addModule(new ExampleModule2());
|
||||
Modules.get().add(new ExampleModule());
|
||||
Modules.get().add(new ExampleModule2());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterCategories() {
|
||||
Modules.registerCategory(CATEGORY);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package meteordevelopment.addons.example.modules;
|
||||
|
||||
import meteordevelopment.addons.example.ExampleAddon;
|
||||
import minegame159.meteorclient.modules.Module;
|
||||
|
||||
public class ExampleModule extends Module {
|
||||
|
||||
public ExampleModule() {
|
||||
super(ExampleAddon.CATEGORY, "example", "This is an example module inside a custom category.");
|
||||
}
|
||||
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package meteordevelopment.exampleaddon.modules;
|
||||
package meteordevelopment.addons.example.modules;
|
||||
|
||||
import minegame159.meteorclient.modules.Categories;
|
||||
import minegame159.meteorclient.modules.Module;
|
||||
|
||||
public class ExampleModule2 extends Module {
|
||||
|
||||
public ExampleModule2() {
|
||||
super(Categories.Player, "example-module-2", "This is an example module that is in an existing category.");
|
||||
super(Categories.Player, "example-2", "This is an example module that is in an existing category.");
|
||||
}
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package meteordevelopment.exampleaddon.modules;
|
||||
|
||||
import meteordevelopment.exampleaddon.ExampleAddon;
|
||||
import minegame159.meteorclient.modules.Module;
|
||||
|
||||
public class ExampleModule extends Module {
|
||||
public ExampleModule() {
|
||||
super(ExampleAddon.CATEGORY, "example-module", "This is an example module inside an example category.");
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@ -1,9 +1,7 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "meteordevelopment.exampleaddon.mixins",
|
||||
"package": "meteordevelopment.addons.example.mixins",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
"injectors": {
|
@ -4,7 +4,7 @@
|
||||
"version": "${version}",
|
||||
|
||||
"name": "Example Addon",
|
||||
"description": "An addon template for the Meteor Client API.",
|
||||
"description": "An addon template for the Meteor Addon API.",
|
||||
"authors": [
|
||||
"seasnail8169"
|
||||
],
|
||||
@ -15,18 +15,17 @@
|
||||
},
|
||||
|
||||
"license": "GPL-3.0",
|
||||
"icon": "assets/example-addon/icon.png",
|
||||
"icon": "assets/example/icon.png",
|
||||
|
||||
"environment": "client",
|
||||
"entrypoints": {
|
||||
"meteor": [
|
||||
"meteordevelopment.exampleaddon.ExampleAddon"
|
||||
"meteordevelopment.addons.example.ExampleAddon"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"example-addon.mixins.json"
|
||||
"example.mixins.json"
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.7.4",
|
||||
"fabric": "*",
|
||||
|
Loading…
Reference in New Issue
Block a user