update to latest sun version

This commit is contained in:
Shrecknt 2024-08-19 07:51:39 -07:00
parent e4997f3a4a
commit 01191fca8b
5 changed files with 27 additions and 26 deletions

View file

@ -1,3 +1,5 @@
import java.util.*
plugins {
id("fabric-loom") version "1.7-SNAPSHOT"
}
@ -22,13 +24,16 @@ repositories {
maven("https://maven.shrecked.dev/private") {
name = "shweccyMavenPrivate"
credentials {
username = "username"
password = "password"
credentials(HttpHeaderCredentials::class) {
val alias = project.property("shweccy_maven_alias").toString()
val token = project.property("shweccy_maven_token").toString()
val basic = Base64.getEncoder().encodeToString("${alias}:${token}".toByteArray())
name = "Authorization"
value = "Basic $basic"
}
authentication {
create<BasicAuthentication>("basic")
create<HttpHeaderAuthentication>("header")
}
}
}
@ -42,9 +47,9 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}")
modImplementation("dev.shrecked:sun:${project.property("sun_version")}")
implementation("meteordevelopment:orbit:0.2.4")
implementation("io.github.racoondog:norbit:1.2.0")
modImplementation("dev.shrecked.sun:sorry_im_under_nda:${project.property("sun_version")}")
implementation("meteordevelopment:orbit:${project.property("orbit_version")}")
implementation("io.github.racoondog:norbit:${project.property("norbit_version")}")
}
tasks {

View file

@ -15,4 +15,6 @@ archives_base_name=sun-addon-template
# Dependencies
fabric_version=0.102.0+1.21.1
sun_version=1.1.0
sun_version=1.1.2
orbit_version=0.2.4
norbit_version=1.2.0

View file

@ -1,12 +1,8 @@
package com.example;
import com.example.commands.ExampleCommand;
import com.example.modules.ExampleModule;
import com.mojang.logging.LogUtils;
import dev.shrecked.components.Command;
import dev.shrecked.components.Module;
import dev.shrecked.components.ModuleRegistry;
import dev.shrecked.components.SunAddonInitializer;
import dev.shrecked.sun.components.*;
import dev.shrecked.sun.components.Module;
import org.slf4j.Logger;
import java.lang.invoke.MethodHandles;
@ -23,15 +19,13 @@ public class ExampleAddon implements SunAddonInitializer {
@Override
public List<Module> loadModules() {
return List.of(new Module[]{
new ExampleModule()
});
ModuleRegistry.reflectModulesFrom("com.example.modules");
return List.of();
}
@Override
public List<Command> loadCommands() {
return List.of(new Command[]{
new ExampleCommand()
});
CommandRegistry.reflectCommandsFrom("com.example.commands");
return List.of();
}
}

View file

@ -2,8 +2,8 @@ package com.example.commands;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import dev.shrecked.components.Command;
import dev.shrecked.util.ChatUtil;
import dev.shrecked.sun.components.Command;
import dev.shrecked.sun.util.ChatUtil;
import net.minecraft.command.CommandSource;
public class ExampleCommand extends Command {

View file

@ -1,10 +1,10 @@
package com.example.modules;
import com.example.ExampleAddon;
import dev.shrecked.components.Category;
import dev.shrecked.components.Event;
import dev.shrecked.components.Module;
import dev.shrecked.components.settings.StringSetting;
import dev.shrecked.sun.components.Category;
import dev.shrecked.sun.components.Event;
import dev.shrecked.sun.components.Module;
import dev.shrecked.sun.components.settings.StringSetting;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.MinecraftClient;