diff --git a/src/main/resources/assets/chromatic/icon.png b/assets/icon.png similarity index 100% rename from src/main/resources/assets/chromatic/icon.png rename to assets/icon.png diff --git a/build.gradle b/build.gradle index ecaf1f7..435f3a9 100644 --- a/build.gradle +++ b/build.gradle @@ -5,108 +5,116 @@ plugins { id 'com.modrinth.minotaur' version '2.+' } +allprojects { + apply plugin: 'fabric-loom' -def git = versionDetails() -def prefix = 'v' -def tag -if (git.lastTag.startsWith(prefix)) { - tag = git.lastTag.substring(prefix.length()) -} else { - tag = git.lastTag -} -if (hasProperty('ci')) { - switch (property('ci')) { - case 'release': - if (git.commitDistance != 0) { - throw new InvalidUserDataException('Not on a tag') - } - if (!git.lastTag.startsWith('v')) { - throw new InvalidUserDataException('Last tag was not a version tag') + repositories { + maven { + url 'https://maven.terraformersmc.com/' + } + maven { + url 'https://maven.shedaniel.me/' + } + maven { + url 'https://maven.pkg.github.com/thesupergamer20578/chroma/' + credentials { + username = project.findProperty('gpr.user') ?: System.getenv('GITHUB_ACTOR') + password = project.findProperty('gpr.key') ?: System.getenv('GITHUB_TOKEN') } - version = "${tag}" - break - case 'snapshot': - version = "${tag}${tag.contains('-') ? '.' : '-'}SNAPSHOT.${git.commitDistance}.${git.branchName}.${git.gitHash}" - break - default: - throw new InvalidUserDataException("Invalid ci argument: ${property("ci")}") + } } -} else { - version = "${tag}${tag.contains('-') ? '.' : '-'}SNAPSHOT.${git.commitDistance}.${git.branchName}.${git.gitHash}+local" -} -group = 'io.github.thesupergamer20578' -java.sourceCompatibility = java.targetCompatibility = JavaVersion.VERSION_17 - -repositories { - maven { - url 'https://maven.terraformersmc.com/' + dependencies { + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" + implementation "io.github.thesupergamer20578:chroma:${project.chroma_version}" + api it } - maven { - url 'https://maven.shedaniel.me/' + + def git = versionDetails() + def prefix = 'v' + def tag + if (git.lastTag.startsWith(prefix)) { + tag = git.lastTag.substring(prefix.length()) + } else { + tag = git.lastTag } - maven { - url 'https://maven.pkg.github.com/thesupergamer20578/chroma/' - credentials { - username = project.findProperty('gpr.user') ?: System.getenv('GITHUB_ACTOR') - password = project.findProperty('gpr.key') ?: System.getenv('GITHUB_TOKEN') + if (hasProperty('ci')) { + switch (property('ci')) { + case 'release': + if (git.commitDistance != 0) { + throw new InvalidUserDataException('Not on a tag') + } + if (!git.lastTag.startsWith('v')) { + throw new InvalidUserDataException('Last tag was not a version tag') + } + version = "${tag}" + break + case 'snapshot': + version = "${tag}${tag.contains('-') ? '.' : '-'}SNAPSHOT.${git.commitDistance}.${git.branchName}.${git.gitHash}" + break + default: + throw new InvalidUserDataException("Invalid ci argument: ${property("ci")}") } + } else { + version = "${tag}${tag.contains('-') ? '.' : '-'}SNAPSHOT.${git.commitDistance}.${git.branchName}.${git.gitHash}+local" } -} + group = 'io.github.thesupergamer20578' + java.sourceCompatibility = java.targetCompatibility = JavaVersion.VERSION_17 -dependencies { - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" - modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" - modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { - exclude(group: 'net.fabricmc.fabric-api') - } - implementation "io.github.thesupergamer20578:chroma:${project.chroma_version}" - shadow "io.github.thesupergamer20578:chroma:${project.chroma_version}" -} + processResources { + inputs.property 'version', project.version -processResources { - inputs.property 'version', project.version + filesMatching('fabric.mod.json') { + expand 'version': project.version + } + } - filesMatching('fabric.mod.json') { - expand 'version': project.version + tasks.withType(JavaCompile).configureEach { + it.options.encoding 'UTF-8' } -} -tasks.withType(JavaCompile).configureEach { - it.options.encoding 'UTF-8' -} + java { + withSourcesJar() + } -java { - withSourcesJar() -} + jar { + from('LICENSE') { + rename { "${it}_${project.archivesBaseName}" } + } + } -jar { - from('LICENSE') { - rename { "${it}_${project.archivesBaseName}" } + shadowJar { + archiveClassifier = 'unmapped' + configurations = [project.configurations.shadow] + minimize() { + exclude(dependency('com.github.hypfvieh:dbus-java-transport-.*:.*')) + } + enableRelocation true + relocationPrefix = "${project.group}.${project.name}.shadow" + relocate("${project.group}.${project.name}", "${project.group}.${project.name}") + relocate('org.freedesktop.dbus', 'org.freedesktop.dbus') + relocate('jnr', 'jnr') + relocate('com.kenai', 'com.kenai') } -} -shadowJar { - archiveClassifier = 'unmapped' - configurations = [project.configurations.shadow] - minimize() { - exclude(dependency('com.github.hypfvieh:dbus-java-transport-.*:.*')) + remapJar { + dependsOn shadowJar + mustRunAfter shadowJar + inputFile = file(shadowJar.archiveFile) } - enableRelocation true - relocationPrefix = "${project.group}.${project.name}.shadow" - relocate("${project.group}.${project.name}", "${project.group}.${project.name}") - relocate('org.freedesktop.dbus', 'org.freedesktop.dbus') - relocate('jnr', 'jnr') - relocate('com.kenai', 'com.kenai') } -remapJar { - dependsOn shadowJar - mustRunAfter shadowJar - inputFile = file(shadowJar.archiveFile) +dependencies { + modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" + modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { + exclude(group: 'net.fabricmc.fabric-api') + } + shadow "io.github.thesupergamer20578:chroma:${project.chroma_version}" +// include project(':chromatic-api') +// include project(':chromatic-core') } modrinth { diff --git a/chromatic-api/build.gradle b/chromatic-api/build.gradle new file mode 100644 index 0000000..e69de29 diff --git a/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Chromatic.java b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Chromatic.java new file mode 100644 index 0000000..dc331fa --- /dev/null +++ b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Chromatic.java @@ -0,0 +1,36 @@ +package io.github.thesupergamer20578.chromatic.api; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.util.*; + +public final class Chromatic { + private static Chromatic INSTANCE; + static final Logger logger = LogManager.getLogger("Chromatic"); + static final Queue effectQueue = new LinkedList<>(); + static final Map> overlays = new TreeMap<>(); + static final List modules = new ArrayList<>(); + + private Chromatic() {} + + static Chromatic getInstance() { + if (INSTANCE == null) { + INSTANCE = new Chromatic(); + } + return INSTANCE; + } + + public static void addModule(Module module) { + modules.add(module); + module.init(getInstance()); + } + + public void queueEffect(Effect effect) { + effectQueue.add(effect); + } + + public void applyOverlay(Overlay overlay, byte priority) { + overlays.computeIfAbsent(priority, k -> new ArrayList<>()).add(overlay); + } +} diff --git a/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/ClientMixin.java b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/ClientMixin.java new file mode 100644 index 0000000..0f25b0d --- /dev/null +++ b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/ClientMixin.java @@ -0,0 +1,80 @@ +package io.github.thesupergamer20578.chromatic.api; + +import io.github.thesupergamer20578.chroma.Chroma; +import io.github.thesupergamer20578.chroma.Colour; +import io.github.thesupergamer20578.chroma.drivers.Driver; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.network.ClientPlayerEntity; +import org.freedesktop.dbus.exceptions.DBusException; +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; + +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + +@Mixin(MinecraftClient.class) +public class ClientMixin { + @Inject(at = @At("HEAD"), method = "joinWorld") + private void joinWorld(CallbackInfo ci) { + Chromatic.effectQueue.clear(); + for (Module module : Chromatic.modules) { + module.reset(Chromatic.getInstance()); + } + } + + @Inject(at = @At("HEAD"), method = "tick") + private void tick(CallbackInfo ci) { + MinecraftClient client = MinecraftClient.getInstance(); + ClientPlayerEntity player = client.player; + Screen screen = client.currentScreen; + Driver driver; + try { + driver = Chroma.getDriver(); + assert driver != null; + } catch (DBusException e) { + throw new RuntimeException(e); + } + + for (Module module : Chromatic.modules) { + module.tick(Chromatic.getInstance(), client, player, screen); + } + + final AtomicBoolean end = new AtomicBoolean(false); + Chromatic.effectQueue.removeIf(effect -> { + if (end.get()) { + return false; + } + EffectResult result = effect.next(driver, client, player, screen); + if (result == EffectResult.CONTINUE) { + end.set(true); + } + return result == EffectResult.END; + }); + + Colour[][] matrix = new Colour[6][22]; + for (int i = 0; i < matrix.length; i++) { + for (int j = 0; j < matrix[i].length; j++) { + matrix[i][j] = new Colour(0x000000); + } + } + end.set(false); + for (List overlays : Chromatic.overlays.values()) { + overlays.removeIf(overlay -> { + if (end.get()) { + return false; + } + EffectResult result = overlay.apply(matrix, client, player, screen); + if (result == EffectResult.CONTINUE) { + end.set(true); + } + return result == EffectResult.END; + }); + if (end.get()) { + break; + } + } + } +} diff --git a/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Effect.java b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Effect.java new file mode 100644 index 0000000..bce28d2 --- /dev/null +++ b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Effect.java @@ -0,0 +1,17 @@ +package io.github.thesupergamer20578.chromatic.api; + +import io.github.thesupergamer20578.chroma.drivers.Driver; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.network.ClientPlayerEntity; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public interface Effect { + @NotNull EffectResult next( + @NotNull Driver driver, + @NotNull MinecraftClient client, + @Nullable ClientPlayerEntity player, + @Nullable Screen currentScreen + ); +} diff --git a/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/EffectResult.java b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/EffectResult.java new file mode 100644 index 0000000..f82a4c6 --- /dev/null +++ b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/EffectResult.java @@ -0,0 +1,7 @@ +package io.github.thesupergamer20578.chromatic.api; + +public enum EffectResult { + CONTINUE, + END, + TRANSPARENT +} diff --git a/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Module.java b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Module.java new file mode 100644 index 0000000..ed4b07a --- /dev/null +++ b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Module.java @@ -0,0 +1,15 @@ +package io.github.thesupergamer20578.chromatic.api; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.network.ClientPlayerEntity; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public interface Module { + @NotNull String name(); + default boolean enabledByDefault() { return true; } + default void init(Chromatic chromatic) {} + default void reset(Chromatic chromatic) {} + default void tick(@NotNull Chromatic chromatic, @NotNull MinecraftClient client, @Nullable ClientPlayerEntity player, @Nullable Screen currentScreen) {} +} diff --git a/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Overlay.java b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Overlay.java new file mode 100644 index 0000000..9066a44 --- /dev/null +++ b/chromatic-api/src/main/java/io/github/thesupergamer20578/chromatic/api/Overlay.java @@ -0,0 +1,18 @@ +package io.github.thesupergamer20578.chromatic.api; + +import io.github.thesupergamer20578.chroma.Colour; +import io.github.thesupergamer20578.chroma.drivers.Driver; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.network.ClientPlayerEntity; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public interface Overlay { + @NotNull EffectResult apply( + @NotNull Colour @NotNull [] @NotNull [] matrix, + @NotNull MinecraftClient client, + @Nullable ClientPlayerEntity player, + @Nullable Screen currentScreen + ); +} diff --git a/chromatic-api/src/main/resources/assets/chromatic b/chromatic-api/src/main/resources/assets/chromatic new file mode 120000 index 0000000..50aff6c --- /dev/null +++ b/chromatic-api/src/main/resources/assets/chromatic @@ -0,0 +1 @@ +../../../../../assets \ No newline at end of file diff --git a/chromatic-api/src/main/resources/chromatic-api.mixins.json b/chromatic-api/src/main/resources/chromatic-api.mixins.json new file mode 100644 index 0000000..a836f76 --- /dev/null +++ b/chromatic-api/src/main/resources/chromatic-api.mixins.json @@ -0,0 +1,7 @@ +{ + "required": true, + "package": "io.github.thesupergamer20578.chromatic.api", + "client": [ + "ClientMixin" + ] +} diff --git a/src/main/resources/fabric.mod.json b/chromatic-api/src/main/resources/fabric.mod.json similarity index 50% rename from src/main/resources/fabric.mod.json rename to chromatic-api/src/main/resources/fabric.mod.json index 09a8e86..852aea5 100644 --- a/src/main/resources/fabric.mod.json +++ b/chromatic-api/src/main/resources/fabric.mod.json @@ -1,9 +1,8 @@ { "schemaVersion": 1, - "id": "chromatic", + "id": "chromatic-core", "version": "${version}", - "name": "Chromatic", - "description": "A Minecraft mod for controlling Razer Chroma keyboards", + "name": "Chromatic Core", "authors": [ "TheSuperGamer20578" ], @@ -16,30 +15,14 @@ "icon": "assets/chromatic/icon.png", "environment": "client", "depends": { - "cloth-config": "*", "fabric": "*", "fabricloader": "*", "minecraft": ">=1.19", - "java": ">=11" + "java": ">=11", + "chromatic": "${version}" }, "entrypoints": { "main": [ - "io.github.thesupergamer20578.chromatic.Init" - ], - "preLaunch": [ - "io.github.thesupergamer20578.chromatic.PreInit" - ], - "modmenu": [ - "io.github.thesupergamer20578.chromatic.ModMenu" ] - }, - "mixins": [ - "chromatic.mixins.json" - ], - "custom": { - "mc-publish": { - "modrinth": "gB2OPOxC", - "curseforge": "558913" - } } } \ No newline at end of file diff --git a/chromatic-core/build.gradle b/chromatic-core/build.gradle new file mode 100644 index 0000000..d653d17 --- /dev/null +++ b/chromatic-core/build.gradle @@ -0,0 +1,3 @@ +dependencies { + modImplementation project(':chromatic-api') +} diff --git a/chromatic-core/src/main/java/io/github/thesupergamer20578/chromatic/core/Core.java b/chromatic-core/src/main/java/io/github/thesupergamer20578/chromatic/core/Core.java new file mode 100644 index 0000000..c7643e2 --- /dev/null +++ b/chromatic-core/src/main/java/io/github/thesupergamer20578/chromatic/core/Core.java @@ -0,0 +1,11 @@ +package io.github.thesupergamer20578.chromatic.core; + +import io.github.thesupergamer20578.chromatic.api.Module; +import org.jetbrains.annotations.NotNull; + +public class Core implements Module { + @Override + public @NotNull String name() { + return "Core"; + } +} diff --git a/chromatic-core/src/main/java/io/github/thesupergamer20578/chromatic/core/Main.java b/chromatic-core/src/main/java/io/github/thesupergamer20578/chromatic/core/Main.java new file mode 100644 index 0000000..4709228 --- /dev/null +++ b/chromatic-core/src/main/java/io/github/thesupergamer20578/chromatic/core/Main.java @@ -0,0 +1,11 @@ +package io.github.thesupergamer20578.chromatic.core; + +import io.github.thesupergamer20578.chromatic.api.Chromatic; +import net.fabricmc.api.ModInitializer; + +public class Main implements ModInitializer { + @Override + public void onInitialize() { + Chromatic.addModule(new Core()); + } +} diff --git a/chromatic-core/src/main/resources/assets/chromatic b/chromatic-core/src/main/resources/assets/chromatic new file mode 120000 index 0000000..50aff6c --- /dev/null +++ b/chromatic-core/src/main/resources/assets/chromatic @@ -0,0 +1 @@ +../../../../../assets \ No newline at end of file diff --git a/chromatic-core/src/main/resources/fabric.mod.json b/chromatic-core/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..852aea5 --- /dev/null +++ b/chromatic-core/src/main/resources/fabric.mod.json @@ -0,0 +1,28 @@ +{ + "schemaVersion": 1, + "id": "chromatic-core", + "version": "${version}", + "name": "Chromatic Core", + "authors": [ + "TheSuperGamer20578" + ], + "contact": { + "homepage": "https://modrinth.com/mod/chromatic", + "issues": "https://github.com/TheSuperGamer20578/Chromatic/issues", + "sources": "https://github.com/TheSuperGamer20578/Chromatic" + }, + "license": "LGPL-2.1-or-later", + "icon": "assets/chromatic/icon.png", + "environment": "client", + "depends": { + "fabric": "*", + "fabricloader": "*", + "minecraft": ">=1.19", + "java": ">=11", + "chromatic": "${version}" + }, + "entrypoints": { + "main": [ + ] + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 44e5619..6a45133 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,3 +10,5 @@ pluginManagement { } rootProject.name = 'chromatic' +include 'chromatic-api' +include 'chromatic-core' diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/Effect.java b/src/main/java/io/github/thesupergamer20578/chromatic/Effect.java deleted file mode 100644 index a99de57..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/Effect.java +++ /dev/null @@ -1,21 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import io.github.thesupergamer20578.chroma.drivers.Driver; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.ClientPlayerEntity; -import org.jetbrains.annotations.Nullable; - -@SuppressWarnings("BooleanMethodNameMustStartWithQuestion") -public interface Effect { - boolean noScreenOnly(); - - /** - * Called every tick to update the effect - * @param driver The Chroma driver - * @param client The Minecraft client - * @param player The current player object - * @param currentScreen The currently active screen - * @return false if the effect is finished and should be removed from the queue, true otherwise. - */ - boolean next(Driver driver, MinecraftClient client, @Nullable ClientPlayerEntity player, Screens currentScreen); -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/Init.java b/src/main/java/io/github/thesupergamer20578/chromatic/Init.java deleted file mode 100644 index ef76597..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/Init.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import io.github.thesupergamer20578.chroma.Chroma; -import io.github.thesupergamer20578.chroma.WaveDirection; -import io.github.thesupergamer20578.chroma.drivers.Driver; -import me.shedaniel.autoconfig.AutoConfig; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; -import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; -import net.minecraft.client.MinecraftClient; -import org.freedesktop.dbus.exceptions.DBusException; - - -public class Init implements ModInitializer { - @Override - public void onInitialize() { - ModConfig.init(); - Driver driver; - try { - driver = Chroma.getDriver(); - assert driver != null; - } catch (DBusException e) { - throw new RuntimeException(e); - } - driver.waveKeyboardEffect(WaveDirection.LEFT_TO_RIGHT); - //noinspection SpellCheckingInspection - ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> dispatcher.register(ClientCommandManager.literal("chromaticconfig") - .executes(context -> { - MinecraftClient.getInstance().send(() -> MinecraftClient.getInstance().setScreen(AutoConfig.getConfigScreen(ModConfig.class, null).get())); - return 1; - }) - )); - Util.LOGGER.info("Chromatic initialised"); - } - -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/Layouts.java b/src/main/java/io/github/thesupergamer20578/chromatic/Layouts.java deleted file mode 100644 index a729761..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/Layouts.java +++ /dev/null @@ -1,152 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import io.github.thesupergamer20578.chromatic.mixin.EntityAccessor; -import io.github.thesupergamer20578.chroma.Colour; -import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.world.Heightmap; -import net.minecraft.world.biome.Biome; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public final class Layouts { - private Layouts() {} - private static final Colour BLACK = new Colour(0x000000); - - public static Colour[][] mainLayout() { - ModConfig config = ModConfig.INSTANCE; - Colour bgd = new Colour(config.backgroundColour); - Colour cht = new Colour(config.chatColour); - Colour mov = new Colour(config.movementColour); - Colour esc = new Colour(config.ESCColour); - Colour tab = new Colour(config.tabColour); - Colour mod = new Colour(config.modifierColour); - Colour inv = new Colour(config.inventoryColour); - return new Colour[][]{ - {bgd, esc, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd}, - {bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd}, - {bgd, tab, inv, mov, inv, bgd, cht, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd}, - {bgd, bgd, mov, mov, mov, inv, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd}, - {bgd, mod, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, cht, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd}, - {bgd, mod, bgd, bgd, bgd, bgd, bgd, mov, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd, bgd} - }; - } - - public static void applyStatus(Colour[][] layout, @NotNull ClientPlayerEntity player, boolean tint) { - ModConfig config = ModConfig.INSTANCE; - if (!player.getAbilities().invulnerable) { - double health = player.getHealth() / player.getMaxHealth(); - boolean hardcore = player.getWorld().getLevelProperties().isHardcore(); - Colour healthColour; - if (player.hasStatusEffect(StatusEffects.POISON)) { - healthColour = hardcore ? new Colour(config.health.hardcorePoisonedColour) : new Colour(config.health.poisonedColour); - } else if (player.hasStatusEffect(StatusEffects.WITHER)) { - healthColour = hardcore ? new Colour(config.health.hardcoreWitheredColour) : new Colour(config.health.witheredColour); - } else if (player.isFrozen()) { - healthColour = hardcore ? new Colour(config.health.hardcoreFrozenColour) : new Colour(config.health.frozenColour); - } else { - healthColour = hardcore ? new Colour(config.health.hardcoreNormalColour) : new Colour(config.health.normalColour); - } - if (tint) healthColour = healthColour.tint(tint(player)); - layout[0][3] = healthColour.multiply(health == 0 ? 0 : health > 0.25 ? 1 : health * 4); - layout[0][4] = healthColour.multiply(health < 0.25 ? 0 : health > 0.5 ? 1 : (health - 0.25) * 4); - layout[0][5] = healthColour.multiply(health < 0.5 ? 0 : health > 0.75 ? 1 : (health - 0.5) * 4); - layout[0][6] = healthColour.multiply(health < 0.75 ? 0 : (health - 0.75) * 4); - - if (player.getAir() < player.getMaxAir()) { - float oxygen = (float) player.getAir() / player.getMaxAir(); - Colour oxygenColour = new Colour(config.oxygenColour); - if (tint) oxygenColour = oxygenColour.tint(tint(player)); - layout[0][7] = oxygenColour.multiply(oxygen == 0 ? 0 : oxygen > 0.25 ? 1 : oxygen * 4); - layout[0][8] = oxygenColour.multiply(oxygen < 0.25 ? 0 : oxygen > 0.5 ? 1 : (oxygen - 0.25) * 4); - layout[0][9] = oxygenColour.multiply(oxygen < 0.5 ? 0 : oxygen > 0.75 ? 1 : (oxygen - 0.5) * 4); - layout[0][10] = oxygenColour.multiply(oxygen < 0.75 ? 0 : (oxygen - 0.75) * 4); - } - - float hunger = player.getHungerManager().getFoodLevel() / 20.0f; - Colour hungerColour = new Colour(config.hungerColour); - if (tint) hungerColour = hungerColour.tint(tint(player)); - layout[0][11] = hungerColour.multiply(hunger == 0 ? 0 : hunger > 0.25 ? 1 : hunger * 4); - layout[0][12] = hungerColour.multiply(hunger < 0.25 ? 0 : hunger > 0.5 ? 1 : (hunger - 0.25) * 4); - layout[0][13] = hungerColour.multiply(hunger < 0.5 ? 0 : hunger > 0.75 ? 1 : (hunger - 0.5) * 4); - layout[0][14] = hungerColour.multiply(hunger < 0.75 ? 0 : (hunger - 0.75) * 4); - } - - Colour selectedColour = new Colour(config.items.selectedColour); - if (tint) selectedColour = selectedColour.tint(tint(player)); - Colour stackableColour = new Colour(config.items.stackableColour); - if (tint) stackableColour = stackableColour.tint(tint(player)); - Colour toolColour = new Colour(config.items.toolColour); - if (tint) toolColour = toolColour.tint(tint(player)); - Colour otherColour = new Colour(config.items.otherColour); - if (tint) otherColour = otherColour.tint(tint(player)); - Colour emptyColour = new Colour(config.items.emptyColour); - if (tint) emptyColour = emptyColour.tint(tint(player)); - float minBrightness = config.items.minBrightness / (float) 0xff; - for (int i = 0; i < 9; i++) { - ItemStack item = player.getInventory().getStack(i); - boolean current = player.getInventory().selectedSlot == i; - if (item.getCount() == 0) { - layout[1][i + 2] = emptyColour; - } else { - if (item.isStackable()) { - layout[1][i + 2] = (current ? selectedColour : stackableColour).multiply(Math.max((float) item.getCount() / item.getMaxCount(), minBrightness)); - } else if (item.isDamageable()) { - layout[1][i + 2] = (current ? selectedColour : toolColour).multiply(Math.max((item.getMaxDamage() - (float) item.getDamage()) / item.getMaxDamage(), minBrightness)); - } else { - layout[1][i + 2] = current ? selectedColour : otherColour; - } - } - } - } - - @Nullable - public static Colour tint(@Nullable ClientPlayerEntity player) { - ModConfig.Tint config = ModConfig.INSTANCE.tint; - if (player == null || !config.enabled) { - return null; - } - - if (player.inPowderSnow || player.wasInPowderSnow) { - return new Colour(config.powderSnowColour); - } - if (player.isSubmergedInWater()) { - return new Colour(config.waterColour); - } - if (player.isOnFire()) { - return new Colour(config.fireColour); - } - if (((EntityAccessor) player).invokeIsBeingRainedOn()) { - if (player.getWorld().isThundering()) { - return new Colour(config.stormColour); - } - return new Colour(config.rainColour); - } - if ( - player.getWorld().isRaining() - && player.getWorld().getBiome(player.getBlockPos()).value().getPrecipitation(player.getBlockPos()) == Biome.Precipitation.SNOW - && !player.getWorld().getBiome(player.getBlockPos()).value().doesNotSnow(player.getBlockPos()) - && player.getWorld().isSkyVisible(player.getBlockPos()) - && player.getWorld().getTopPosition(Heightmap.Type.MOTION_BLOCKING, player.getBlockPos()).getY() <= player.getBlockPos().getY() - ) { - return new Colour(config.snowColour); - } - return null; - } - - public static void applyTint(Colour[][] layout, @Nullable ClientPlayerEntity player) { - Colour tint = tint(player); - if (tint == null) { - return; - } - for (byte row = 0; row < layout.length; row++) { - for (byte key = 0; key < layout[row].length; key++) { - if (ModConfig.INSTANCE.tint.preserveBlack && layout[row][key].equals(BLACK)) { - continue; - } - layout[row][key] = layout[row][key].tint(tint); - } - } - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/ModConfig.java b/src/main/java/io/github/thesupergamer20578/chromatic/ModConfig.java deleted file mode 100644 index f6c2539..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/ModConfig.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import me.shedaniel.autoconfig.AutoConfig; -import me.shedaniel.autoconfig.ConfigData; -import me.shedaniel.autoconfig.annotation.Config; -import me.shedaniel.autoconfig.annotation.ConfigEntry; -import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; - -@SuppressWarnings("CanBeFinal") -@Config(name = "chromatic") -public class ModConfig implements ConfigData { - @ConfigEntry.Gui.Excluded - public static ModConfig INSTANCE; - - public static void init() { - AutoConfig.register(ModConfig.class, GsonConfigSerializer::new); - INSTANCE = AutoConfig.getConfigHolder(ModConfig.class).getConfig(); - } - - @ConfigEntry.ColorPicker - public int backgroundColour = 0x000000; - - @ConfigEntry.ColorPicker - public int chatColour = 0xffffff; - - @ConfigEntry.ColorPicker - public int oxygenColour = 0x0000ff; - - @ConfigEntry.ColorPicker - public int hungerColour = 0xffff00; - - @ConfigEntry.ColorPicker - public int movementColour = 0x00ffff; - - @ConfigEntry.ColorPicker - public int ESCColour = 0xff0000; - - @ConfigEntry.ColorPicker - public int tabColour = 0x00ff00; - - @ConfigEntry.ColorPicker - public int modifierColour = 0x00ff00; - - @ConfigEntry.ColorPicker - public int inventoryColour = 0x0000ff; - - @ConfigEntry.Gui.CollapsibleObject - public Health health = new Health(); - - @ConfigEntry.Gui.CollapsibleObject - public Items items = new Items(); - - @ConfigEntry.Gui.CollapsibleObject - public Tint tint = new Tint(); - - public static class Health { - @ConfigEntry.ColorPicker - public int normalColour = 0xff0000; - - @ConfigEntry.ColorPicker - public int poisonedColour = 0x00ff00; - - @ConfigEntry.ColorPicker - public int witheredColour = 0x1a0000; - - @ConfigEntry.ColorPicker - public int frozenColour = 0x00eaff; - - @ConfigEntry.ColorPicker - public int hardcoreNormalColour = 0xff4000; - - @ConfigEntry.ColorPicker - public int hardcorePoisonedColour = 0x40ff00; - - @ConfigEntry.ColorPicker - public int hardcoreWitheredColour = 0x1a0600; - - @ConfigEntry.ColorPicker - public int hardcoreFrozenColour = 0x00aaff; - - @ConfigEntry.ColorPicker - public int regenColour = 0x00ff00; - - public int regenFlashDuration = 10; - - @ConfigEntry.ColorPicker - public int damageColour = 0xff1100; - - public int damageFlashDuration = 5; - - public int damageThreshold = 5; - } - - public static class Items { - @ConfigEntry.ColorPicker - public int selectedColour = 0x00ff00; - - @ConfigEntry.ColorPicker - public int toolColour = 0x00ffff; - - @ConfigEntry.ColorPicker - public int stackableColour = 0x0000ff; - - @ConfigEntry.ColorPicker - public int otherColour = 0xffffff; - - @ConfigEntry.ColorPicker - public int emptyColour = 0x000000; - - @ConfigEntry.BoundedDiscrete(max = 0xff) - public int minBrightness = 50; - } - - public static class Tint { - public boolean enabled = true; - - public boolean preserveBlack = true; - - @ConfigEntry.ColorPicker - public int waterColour = 0x5555aa; - - @ConfigEntry.ColorPicker - public int fireColour = 0xff5555; - - @ConfigEntry.ColorPicker - public int rainColour = 0x00aaaa; - - @ConfigEntry.ColorPicker - public int stormColour = 0x2f444a; - - @ConfigEntry.ColorPicker - public int powderSnowColour = 0xffffff; - - @ConfigEntry.ColorPicker - public int snowColour = 0xdddddd; - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/ModMenu.java b/src/main/java/io/github/thesupergamer20578/chromatic/ModMenu.java deleted file mode 100644 index b382a78..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/ModMenu.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import com.terraformersmc.modmenu.api.ConfigScreenFactory; -import com.terraformersmc.modmenu.api.ModMenuApi; -import me.shedaniel.autoconfig.AutoConfig; - -public class ModMenu implements ModMenuApi { - @Override - public ConfigScreenFactory getModConfigScreenFactory() { - return parent -> AutoConfig.getConfigScreen(ModConfig.class, parent).get(); - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/PreInit.java b/src/main/java/io/github/thesupergamer20578/chromatic/PreInit.java deleted file mode 100644 index 53024a9..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/PreInit.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import io.github.thesupergamer20578.chroma.Chroma; -import io.github.thesupergamer20578.chroma.drivers.Driver; -import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint; -import org.freedesktop.dbus.exceptions.DBusException; - -public class PreInit implements PreLaunchEntrypoint { - @Override - public void onPreLaunch() { - Driver driver; - try { - driver = Chroma.getDriver(); - } catch (DBusException e) { - throw new RuntimeException("Could not initialise Chroma driver", e); - } - if (driver == null) { - throw new RuntimeException("Could not initialise Chroma driver: no driver found"); - } - Util.LOGGER.info("Chroma initialised. Using {}", driver.getClass().getName()); - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/Screens.java b/src/main/java/io/github/thesupergamer20578/chromatic/Screens.java deleted file mode 100644 index 513947c..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/Screens.java +++ /dev/null @@ -1,63 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import net.minecraft.client.gui.screen.*; -import net.minecraft.client.gui.screen.ingame.*; -import net.minecraft.client.gui.screen.multiplayer.*; -import net.minecraft.client.gui.screen.option.*; -import net.minecraft.client.gui.screen.world.*; -import org.jetbrains.annotations.Nullable; - -import java.util.HashMap; -import java.util.Map; - -public enum Screens { - // Ingame - ANVIL(AnvilScreen.class), - BOOK_EDIT(BookEditScreen.class), - COMMAND_BLOCK(CommandBlockScreen.class), - CREATIVE_INVENTORY(CreativeInventoryScreen.class), - JIGSAW(JigsawBlockScreen.class), - MINECART_COMMAND_BLOCK(MinecartCommandBlockScreen.class), - SIGN(SignEditScreen.class), - STRUCTURE_BLOCK(StructureBlockScreen.class), - - // Multiplayer - SOCIAL_INTERACTIONS(SocialInteractionsScreen.class), - - // Options - CONTROLS(ControlsOptionsScreen.class), - KEYBINDS(KeybindsScreen.class), - - // World - CREATE_WORLD(CreateWorldScreen.class), - EDIT_WORLD(EditWorldScreen.class), - - // Main - ADD_SERVER(AddServerScreen.class), - CHAT(ChatScreen.class), - DEATH(DeathScreen.class), - DIRECT_CONNECT(DirectConnectScreen.class), - SLEEPING(SleepingChatScreen.class), - NONE(null), - OTHER(Screen.class); - - public final @Nullable Class value; - private static final Map<@Nullable Class, Screens> cache = new HashMap<>(Screens.values().length); - - Screens(@Nullable Class screen) { - value = screen; - } - - - public static Screens of(@Nullable Class key) { - return cache.computeIfAbsent(key, k -> { - if (k == null) return NONE; - for (Screens screen : Screens.values()) { - if (screen.value != null && screen.value.isAssignableFrom(k)) { - return screen; - } - } - throw new IllegalStateException("Unreachable"); - }); - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/Util.java b/src/main/java/io/github/thesupergamer20578/chromatic/Util.java deleted file mode 100644 index f5a5425..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/Util.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.github.thesupergamer20578.chromatic; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.LinkedList; -import java.util.Queue; - -public final class Util { - private Util() {} - public static final Logger LOGGER = LogManager.getLogger("Chromatic"); - public static final Queue effectQueue = new LinkedList<>(); -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/effects/Damage.java b/src/main/java/io/github/thesupergamer20578/chromatic/effects/Damage.java deleted file mode 100644 index c733464..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/effects/Damage.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.github.thesupergamer20578.chromatic.effects; - -import io.github.thesupergamer20578.chromatic.Effect; -import io.github.thesupergamer20578.chromatic.ModConfig; -import io.github.thesupergamer20578.chromatic.Screens; -import io.github.thesupergamer20578.chroma.Colour; -import io.github.thesupergamer20578.chroma.drivers.Driver; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.ClientPlayerEntity; -import org.jetbrains.annotations.Nullable; - -public class Damage implements Effect { - private long time = 0; - - @Override - public boolean noScreenOnly() { - return false; - } - - @Override - public boolean next(Driver driver, MinecraftClient client, @Nullable ClientPlayerEntity player, Screens currentScreen) { - time++; - if (time > ModConfig.INSTANCE.health.damageFlashDuration) - return false; - driver.staticKeyboardEffect(new Colour(ModConfig.INSTANCE.health.damageColour)); - return true; - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/effects/Regen.java b/src/main/java/io/github/thesupergamer20578/chromatic/effects/Regen.java deleted file mode 100644 index 880dd45..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/effects/Regen.java +++ /dev/null @@ -1,49 +0,0 @@ -package io.github.thesupergamer20578.chromatic.effects; - -import io.github.thesupergamer20578.chroma.Colour; -import io.github.thesupergamer20578.chroma.drivers.Driver; -import io.github.thesupergamer20578.chromatic.Effect; -import io.github.thesupergamer20578.chromatic.Layouts; -import io.github.thesupergamer20578.chromatic.ModConfig; -import io.github.thesupergamer20578.chromatic.Screens; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.ClientPlayerEntity; -import org.jetbrains.annotations.Nullable; - -public class Regen implements Effect { - private long time = 0; - - @Override - public boolean noScreenOnly() { - return true; - } - - @Override - public boolean next(Driver driver, MinecraftClient client, @Nullable ClientPlayerEntity player, Screens currentScreen) { - time++; - if (time > ModConfig.INSTANCE.health.regenFlashDuration) - return false; - - Colour[][] layout = Layouts.mainLayout(); - if (player == null) { - driver.customKeyboardEffect(layout); - return true; - } - Layouts.applyTint(layout, player); - Layouts.applyStatus(layout, player, true); - - double health = player.getHealth() / player.getMaxHealth(); - Colour colour = new Colour(ModConfig.INSTANCE.health.regenColour); - if (health > 0.75) - layout[0][6] = colour.multiply((health - 0.75) * 4); - else if (health > 0.5) - layout[0][5] = colour.multiply((health - 0.5) * 4); - else if (health > 0.25) - layout[0][4] = colour.multiply((health - 0.25) * 4); - else - layout[0][3] = colour.multiply(health * 4); - - driver.customKeyboardEffect(layout); - return true; - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/mixin/Client.java b/src/main/java/io/github/thesupergamer20578/chromatic/mixin/Client.java deleted file mode 100644 index 741d4ef..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/mixin/Client.java +++ /dev/null @@ -1,105 +0,0 @@ -package io.github.thesupergamer20578.chromatic.mixin; - -import io.github.thesupergamer20578.chromatic.*; -import io.github.thesupergamer20578.chromatic.effects.Damage; -import io.github.thesupergamer20578.chromatic.effects.Regen; -import io.github.thesupergamer20578.chroma.Chroma; -import io.github.thesupergamer20578.chroma.Colour; -import io.github.thesupergamer20578.chroma.drivers.Driver; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.ClientPlayerEntity; -import org.freedesktop.dbus.exceptions.DBusException; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(MinecraftClient.class) -public class Client { - @Unique - private float lastHealth = -1; - @Unique - private @Nullable Screens lastScreen = null; - - @Inject(at = @At("HEAD"), method = "joinWorld") - private void joinWorld(CallbackInfo ci) { - Util.effectQueue.clear(); - lastHealth = -1; - } - - @Inject(at = @At("HEAD"), method = "tick") - private void tick(CallbackInfo ci) { - MinecraftClient client = MinecraftClient.getInstance(); - ClientPlayerEntity player = client.player; - Screens screen = Screens.of(client.currentScreen == null ? null : client.currentScreen.getClass()); - Driver driver; - try { - driver = Chroma.getDriver(); - assert driver != null; - } catch (DBusException e) { - throw new RuntimeException(e); - } - ModConfig config = ModConfig.INSTANCE; - - // Regen/damage check - if (player != null) { - float health = player.getHealth(); - if (Util.effectQueue.isEmpty() && lastHealth != -1) { - if (health > lastHealth) - Util.effectQueue.add(new Regen()); - else if (health < lastHealth && lastHealth-health > config.health.damageThreshold) - Util.effectQueue.add(new Damage()); - } - lastHealth = health; - } - - Effect effect = Util.effectQueue.peek(); - while (effect != null && (!effect.noScreenOnly() || screen == Screens.NONE)) { - if (effect.next(driver, client, player, screen)) { - return; - } - effect = Util.effectQueue.poll(); - } - - if (screen != Screens.NONE && screen == lastScreen) return; - - switch (screen) { - case OTHER: - driver.staticKeyboardEffect(new Colour(config.backgroundColour)); - break; - case ANVIL: - case BOOK_EDIT: - case COMMAND_BLOCK: - case CREATIVE_INVENTORY: - case JIGSAW: - case MINECART_COMMAND_BLOCK: - case SIGN: - case STRUCTURE_BLOCK: - case SOCIAL_INTERACTIONS: - case CONTROLS: - case KEYBINDS: - case CREATE_WORLD: - case EDIT_WORLD: - case ADD_SERVER: - case CHAT: - case DIRECT_CONNECT: - case SLEEPING: - driver.staticKeyboardEffect(new Colour(config.chatColour)); - break; - case DEATH: - // TODO Should this be in the config? - driver.staticKeyboardEffect(new Colour(0xff0000)); - break; - case NONE: - Colour[][] layout = Layouts.mainLayout(); - Layouts.applyTint(layout, player); - if (player != null) - Layouts.applyStatus(layout, player, true); - driver.customKeyboardEffect(layout); - break; - } - lastScreen = screen; - } -} diff --git a/src/main/java/io/github/thesupergamer20578/chromatic/mixin/EntityAccessor.java b/src/main/java/io/github/thesupergamer20578/chromatic/mixin/EntityAccessor.java deleted file mode 100644 index 0c3d1a0..0000000 --- a/src/main/java/io/github/thesupergamer20578/chromatic/mixin/EntityAccessor.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.github.thesupergamer20578.chromatic.mixin; - -import net.minecraft.entity.Entity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@SuppressWarnings("BooleanMethodNameMustStartWithQuestion") -@Mixin(Entity.class) -public interface EntityAccessor { - @Invoker("isBeingRainedOn") - boolean invokeIsBeingRainedOn(); -} diff --git a/src/main/resources/assets/chromatic/lang/en_au.json b/src/main/resources/assets/chromatic/lang/en_au.json deleted file mode 100644 index 8f210aa..0000000 --- a/src/main/resources/assets/chromatic/lang/en_au.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "text.autoconfig.chromatic.title": "Chromatic Configuration", - "text.autoconfig.chromatic.option.backgroundColour": "Background Colour", - "text.autoconfig.chromatic.option.chatColour": "Chat Colour", - "text.autoconfig.chromatic.option.oxygenColour": "Oxygen Colour", - "text.autoconfig.chromatic.option.hungerColour": "Hunger Colour", - "text.autoconfig.chromatic.option.movementColour": "Movement Colour", - "text.autoconfig.chromatic.option.ESCColour": "Escape Colour", - "text.autoconfig.chromatic.option.tabColour": "Tab Colour", - "text.autoconfig.chromatic.option.modifierColour": "Modifier Colour", - "text.autoconfig.chromatic.option.inventoryColour": "Inventory Colour", - "text.autoconfig.chromatic.option.health": "Health", - "text.autoconfig.chromatic.option.health.normalColour": "Normal Colour", - "text.autoconfig.chromatic.option.health.poisonedColour": "Poisoned Colour", - "text.autoconfig.chromatic.option.health.witheredColour": "Withered Colour", - "text.autoconfig.chromatic.option.health.frozenColour": "Frozen Colour", - "text.autoconfig.chromatic.option.health.hardcoreNormalColour": "Hardcore Normal Colour", - "text.autoconfig.chromatic.option.health.hardcorePoisonedColour": "Hardcore Poisoned Colour", - "text.autoconfig.chromatic.option.health.hardcoreWitheredColour": "Hardcore Withered Colour", - "text.autoconfig.chromatic.option.health.hardcoreFrozenColour": "Hardcore Frozen Colour", - "text.autoconfig.chromatic.option.health.regenColour": "Regen Colour", - "text.autoconfig.chromatic.option.health.regenFlashDuration": "Regen Flash Duration", - "text.autoconfig.chromatic.option.health.damageColour": "Damage Colour", - "text.autoconfig.chromatic.option.health.damageFlashDuration": "Damage Flash Duration", - "text.autoconfig.chromatic.option.health.damageThreshold": "Damage Threshold", - "text.autoconfig.chromatic.option.items": "Items", - "text.autoconfig.chromatic.option.items.selectedColour": "Selected Colour", - "text.autoconfig.chromatic.option.items.toolColour": "Tool Colour", - "text.autoconfig.chromatic.option.items.stackableColour": "Stackable Colour", - "text.autoconfig.chromatic.option.items.otherColour": "Other Colour", - "text.autoconfig.chromatic.option.items.emptyColour": "Empty Colour", - "text.autoconfig.chromatic.option.items.minBrightness": "Minimum Brightness", - "text.autoconfig.chromatic.option.tint": "Tint", - "text.autoconfig.chromatic.option.tint.enabled": "Enable Tinting", - "text.autoconfig.chromatic.option.tint.preserveBlack": "Preserve Black", - "text.autoconfig.chromatic.option.tint.waterColour": "Water Colour", - "text.autoconfig.chromatic.option.tint.fireColour": "Fire Colour", - "text.autoconfig.chromatic.option.tint.rainColour": "Rain Colour", - "text.autoconfig.chromatic.option.tint.stormColour": "Storm Colour", - "text.autoconfig.chromatic.option.tint.powderSnowColour": "Powder Snow Colour", - "text.autoconfig.chromatic.option.tint.snowColour": "Snow Colour" -} diff --git a/src/main/resources/assets/chromatic/lang/en_us.json b/src/main/resources/assets/chromatic/lang/en_us.json deleted file mode 100644 index 5ad9363..0000000 --- a/src/main/resources/assets/chromatic/lang/en_us.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "text.autoconfig.chromatic.title": "Chromatic Configuration", - "text.autoconfig.chromatic.option.backgroundColour": "Background Color", - "text.autoconfig.chromatic.option.chatColour": "Chat Color", - "text.autoconfig.chromatic.option.oxygenColour": "Oxygen Color", - "text.autoconfig.chromatic.option.hungerColour": "Hunger Color", - "text.autoconfig.chromatic.option.movementColour": "Movement Color", - "text.autoconfig.chromatic.option.ESCColour": "Escape Color", - "text.autoconfig.chromatic.option.tabColour": "Tab Color", - "text.autoconfig.chromatic.option.modifierColour": "Modifier Color", - "text.autoconfig.chromatic.option.inventoryColour": "Inventory Color", - "text.autoconfig.chromatic.option.health": "Health", - "text.autoconfig.chromatic.option.health.normalColour": "Normal Color", - "text.autoconfig.chromatic.option.health.poisonedColour": "Poisoned Color", - "text.autoconfig.chromatic.option.health.witheredColour": "Withered Color", - "text.autoconfig.chromatic.option.health.frozenColour": "Frozen Color", - "text.autoconfig.chromatic.option.health.hardcoreNormalColour": "Hardcore Normal Color", - "text.autoconfig.chromatic.option.health.hardcorePoisonedColour": "Hardcore Poisoned Color", - "text.autoconfig.chromatic.option.health.hardcoreWitheredColour": "Hardcore Withered Color", - "text.autoconfig.chromatic.option.health.hardcoreFrozenColour": "Hardcore Frozen Color", - "text.autoconfig.chromatic.option.health.regenColour": "Regen Color", - "text.autoconfig.chromatic.option.health.regenFlashDuration": "Regen Flash Duration", - "text.autoconfig.chromatic.option.health.damageColour": "Damage Color", - "text.autoconfig.chromatic.option.health.damageFlashDuration": "Damage Flash Duration", - "text.autoconfig.chromatic.option.health.damageThreshold": "Damage Threshold", - "text.autoconfig.chromatic.option.items": "Items", - "text.autoconfig.chromatic.option.items.selectedColour": "Selected Color", - "text.autoconfig.chromatic.option.items.toolColour": "Tool Color", - "text.autoconfig.chromatic.option.items.stackableColour": "Stackable Color", - "text.autoconfig.chromatic.option.items.otherColour": "Other Color", - "text.autoconfig.chromatic.option.items.emptyColour": "Empty Color", - "text.autoconfig.chromatic.option.items.minBrightness": "Minimum Brightness", - "text.autoconfig.chromatic.option.tint": "Tint", - "text.autoconfig.chromatic.option.tint.enabled": "Enable Tinting", - "text.autoconfig.chromatic.option.tint.preserveBlack": "Preserve Black", - "text.autoconfig.chromatic.option.tint.waterColour": "Water Color", - "text.autoconfig.chromatic.option.tint.fireColour": "Fire Color", - "text.autoconfig.chromatic.option.tint.rainColour": "Rain Color", - "text.autoconfig.chromatic.option.tint.stormColour": "Storm Color", - "text.autoconfig.chromatic.option.tint.powderSnowColour": "Powder Snow Color", - "text.autoconfig.chromatic.option.tint.snowColour": "Snow Color" -} diff --git a/src/main/resources/chromatic.mixins.json b/src/main/resources/chromatic.mixins.json deleted file mode 100644 index 42604c9..0000000 --- a/src/main/resources/chromatic.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "required": true, - "package": "io.github.thesupergamer20578.chromatic.mixin", - "client": [ - "Client", - "EntityAccessor" - ] -} \ No newline at end of file