updated to the latest meteor snapshot
This commit is contained in:
parent
86878781a8
commit
2df79d8cf7
@ -1,16 +1,16 @@
|
|||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
# Fabric (https://fabricmc.net/versions.html)
|
# Fabric Properties (https://fabricmc.net/versions.html)
|
||||||
minecraft_version=1.19
|
minecraft_version=1.19
|
||||||
yarn_mappings=1.19+build.1
|
yarn_mappings=1.19+build.4
|
||||||
loader_version=0.14.7
|
loader_version=0.14.8
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=0.1
|
mod_version=0.1.0
|
||||||
maven_group=dummy.package
|
maven_group=com.example
|
||||||
archives_base_name=addon-template
|
archives_base_name=addon-template
|
||||||
|
|
||||||
# Dependency Versions
|
# Dependencies
|
||||||
|
|
||||||
# Meteor (https://maven.meteordev.org/)
|
# Meteor (https://maven.meteordev.org/)
|
||||||
meteor_version=0.5.0-SNAPSHOT
|
meteor_version=0.5.0-SNAPSHOT
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
|
||||||
maven {
|
maven {
|
||||||
name = 'Fabric'
|
name = 'Fabric'
|
||||||
url = 'https://maven.fabricmc.net/'
|
url = 'https://maven.fabricmc.net/'
|
||||||
}
|
}
|
||||||
|
mavenCentral()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
43
src/main/java/com/example/addon/Addon.java
Normal file
43
src/main/java/com/example/addon/Addon.java
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
package com.example.addon;
|
||||||
|
|
||||||
|
import com.example.addon.commands.CommandExample;
|
||||||
|
import com.example.addon.hud.HudExample;
|
||||||
|
import com.example.addon.modules.ModuleExample;
|
||||||
|
import meteordevelopment.meteorclient.addons.MeteorAddon;
|
||||||
|
import meteordevelopment.meteorclient.systems.commands.Commands;
|
||||||
|
import meteordevelopment.meteorclient.systems.hud.Hud;
|
||||||
|
import meteordevelopment.meteorclient.systems.hud.HudGroup;
|
||||||
|
import meteordevelopment.meteorclient.systems.modules.Category;
|
||||||
|
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class Addon extends MeteorAddon {
|
||||||
|
public static final Logger LOG = LoggerFactory.getLogger(Addon.class);
|
||||||
|
public static final Category CATEGORY = new Category("Example");
|
||||||
|
public static final HudGroup HUD_GROUP = new HudGroup("Example");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInitialize() {
|
||||||
|
LOG.info("Initializing Meteor Addon Template");
|
||||||
|
|
||||||
|
// Modules
|
||||||
|
Modules.get().add(new ModuleExample());
|
||||||
|
|
||||||
|
// Commands
|
||||||
|
Commands.get().add(new CommandExample());
|
||||||
|
|
||||||
|
// HUD
|
||||||
|
Hud.get().register(HudExample.INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRegisterCategories() {
|
||||||
|
Modules.registerCategory(CATEGORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPackage() {
|
||||||
|
return "com.example.addon";
|
||||||
|
}
|
||||||
|
}
|
@ -1,21 +1,20 @@
|
|||||||
package dummy.addon.template.commands;
|
package com.example.addon.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.systems.commands.Command;
|
||||||
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
|
||||||
public class ExampleCommand extends Command {
|
public class CommandExample extends Command {
|
||||||
public ExampleCommand() {
|
public CommandExample() {
|
||||||
super("example", "Sends a message.");
|
super("example", "Sends a message.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||||
builder.executes(context -> {
|
builder.executes(context -> {
|
||||||
ChatUtils.info("hi");
|
info("hi");
|
||||||
return SINGLE_SUCCESS;
|
return SINGLE_SUCCESS;
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,13 +1,13 @@
|
|||||||
package dummy.addon.template.modules.hud;
|
package com.example.addon.hud;
|
||||||
|
|
||||||
import dummy.addon.template.TemplateAddon;
|
import com.example.addon.Addon;
|
||||||
import meteordevelopment.meteorclient.systems.hud.HudElement;
|
import meteordevelopment.meteorclient.systems.hud.HudElement;
|
||||||
import meteordevelopment.meteorclient.systems.hud.HudElementInfo;
|
import meteordevelopment.meteorclient.systems.hud.HudElementInfo;
|
||||||
import meteordevelopment.meteorclient.systems.hud.HudRenderer;
|
import meteordevelopment.meteorclient.systems.hud.HudRenderer;
|
||||||
import meteordevelopment.meteorclient.utils.render.color.Color;
|
import meteordevelopment.meteorclient.utils.render.color.Color;
|
||||||
|
|
||||||
public class HudExample extends HudElement {
|
public class HudExample extends HudElement {
|
||||||
public static final HudElementInfo<HudExample> INFO = new HudElementInfo<>(TemplateAddon.HUD_GROUP, "example", "HUD element example.", HudExample::new);
|
public static final HudElementInfo<HudExample> INFO = new HudElementInfo<>(Addon.HUD_GROUP, "example", "HUD element example.", HudExample::new);
|
||||||
|
|
||||||
public HudExample() {
|
public HudExample() {
|
||||||
super(INFO);
|
super(INFO);
|
10
src/main/java/com/example/addon/modules/ModuleExample.java
Normal file
10
src/main/java/com/example/addon/modules/ModuleExample.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.example.addon.modules;
|
||||||
|
|
||||||
|
import com.example.addon.Addon;
|
||||||
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
|
|
||||||
|
public class ModuleExample extends Module {
|
||||||
|
public ModuleExample() {
|
||||||
|
super(Addon.CATEGORY, "example", "An example module in a custom category.");
|
||||||
|
}
|
||||||
|
}
|
@ -1,46 +0,0 @@
|
|||||||
package dummy.addon.template;
|
|
||||||
|
|
||||||
import dummy.addon.template.commands.ExampleCommand;
|
|
||||||
import dummy.addon.template.modules.AnotherExample;
|
|
||||||
import dummy.addon.template.modules.Example;
|
|
||||||
import dummy.addon.template.modules.hud.HudExample;
|
|
||||||
import meteordevelopment.meteorclient.MeteorClient;
|
|
||||||
import meteordevelopment.meteorclient.addons.MeteorAddon;
|
|
||||||
import meteordevelopment.meteorclient.systems.commands.Commands;
|
|
||||||
import meteordevelopment.meteorclient.systems.hud.Hud;
|
|
||||||
import meteordevelopment.meteorclient.systems.hud.HudGroup;
|
|
||||||
import meteordevelopment.meteorclient.systems.modules.Category;
|
|
||||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.lang.invoke.MethodHandles;
|
|
||||||
|
|
||||||
public class TemplateAddon extends MeteorAddon {
|
|
||||||
public static final Logger LOG = LoggerFactory.getLogger(TemplateAddon.class);
|
|
||||||
public static final Category CATEGORY = new Category("Example");
|
|
||||||
public static final HudGroup HUD_GROUP = new HudGroup("Template");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onInitialize() {
|
|
||||||
LOG.info("Initializing Meteor Addon Template");
|
|
||||||
|
|
||||||
// Required when using @EventHandler
|
|
||||||
MeteorClient.EVENT_BUS.registerLambdaFactory("meteordevelopment.addons.template", (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup()));
|
|
||||||
|
|
||||||
// Modules
|
|
||||||
Modules.get().add(new Example());
|
|
||||||
Modules.get().add(new AnotherExample());
|
|
||||||
|
|
||||||
// Commands
|
|
||||||
Commands.get().add(new ExampleCommand());
|
|
||||||
|
|
||||||
// HUD
|
|
||||||
Hud.get().register(HudExample.INFO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRegisterCategories() {
|
|
||||||
Modules.registerCategory(CATEGORY);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
package dummy.addon.template.modules;
|
|
||||||
|
|
||||||
import meteordevelopment.meteorclient.systems.modules.Categories;
|
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
|
||||||
|
|
||||||
public class AnotherExample extends Module {
|
|
||||||
public AnotherExample() {
|
|
||||||
super(Categories.Player, "example-2", "An example module in an existing category.");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
package dummy.addon.template.modules;
|
|
||||||
|
|
||||||
import dummy.addon.template.TemplateAddon;
|
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
|
||||||
|
|
||||||
public class Example extends Module {
|
|
||||||
public Example() {
|
|
||||||
super(TemplateAddon.CATEGORY, "example", "An example module in a custom category.");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +1,8 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "meteordevelopment.addons.template.mixins",
|
"package": "com.example.addon.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"client": [
|
"client": [],
|
||||||
|
|
||||||
],
|
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
}
|
}
|
@ -5,7 +5,7 @@
|
|||||||
"name": "Addon Template",
|
"name": "Addon Template",
|
||||||
"description": "An addon template for the Meteor addons.",
|
"description": "An addon template for the Meteor addons.",
|
||||||
"authors": [
|
"authors": [
|
||||||
"seasnail8169"
|
"seasnail"
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"repo": "https://github.com/MeteorDevelopment/meteor-addon-template"
|
"repo": "https://github.com/MeteorDevelopment/meteor-addon-template"
|
||||||
@ -14,11 +14,11 @@
|
|||||||
"environment": "client",
|
"environment": "client",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"meteor": [
|
"meteor": [
|
||||||
"dummy.addon.template.TemplateAddon"
|
"com.example.addon.Addon"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"template.mixins.json"
|
"addon.mixins.json"
|
||||||
],
|
],
|
||||||
"custom": {
|
"custom": {
|
||||||
"meteor-client:color": "225,25,25"
|
"meteor-client:color": "225,25,25"
|
||||||
|
Loading…
Reference in New Issue
Block a user