updated to the latest meteor snapshot

This commit is contained in:
seasnail 2022-07-22 15:40:16 +01:00
parent 86878781a8
commit 2df79d8cf7
13 changed files with 73 additions and 89 deletions

View File

@ -1,16 +1,16 @@
org.gradle.jvmargs=-Xmx2G
# Fabric (https://fabricmc.net/versions.html)
# Fabric Properties (https://fabricmc.net/versions.html)
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.7
yarn_mappings=1.19+build.4
loader_version=0.14.8
# Mod Properties
mod_version=0.1
maven_group=dummy.package
mod_version=0.1.0
maven_group=com.example
archives_base_name=addon-template
# Dependency Versions
# Dependencies
# Meteor (https://maven.meteordev.org/)
meteor_version=0.5.0-SNAPSHOT

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
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
zipStorePath=wrapper/dists

View File

@ -1,10 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}

View 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";
}
}

View File

@ -1,21 +1,20 @@
package dummy.addon.template.commands;
package com.example.addon.commands;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.systems.commands.Command;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.command.CommandSource;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public class ExampleCommand extends Command {
public ExampleCommand() {
public class CommandExample extends Command {
public CommandExample() {
super("example", "Sends a message.");
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
ChatUtils.info("hi");
info("hi");
return SINGLE_SUCCESS;
});
}

View File

@ -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.HudElementInfo;
import meteordevelopment.meteorclient.systems.hud.HudRenderer;
import meteordevelopment.meteorclient.utils.render.color.Color;
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() {
super(INFO);

View 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.");
}
}

View File

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

View File

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

View File

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

View File

@ -1,10 +1,8 @@
{
"required": true,
"package": "meteordevelopment.addons.template.mixins",
"package": "com.example.addon.mixin",
"compatibilityLevel": "JAVA_17",
"client": [
],
"client": [],
"injectors": {
"defaultRequire": 1
}

View File

@ -5,7 +5,7 @@
"name": "Addon Template",
"description": "An addon template for the Meteor addons.",
"authors": [
"seasnail8169"
"seasnail"
],
"contact": {
"repo": "https://github.com/MeteorDevelopment/meteor-addon-template"
@ -14,11 +14,11 @@
"environment": "client",
"entrypoints": {
"meteor": [
"dummy.addon.template.TemplateAddon"
"com.example.addon.Addon"
]
},
"mixins": [
"template.mixins.json"
"addon.mixins.json"
],
"custom": {
"meteor-client:color": "225,25,25"