From c048d26b658e49ba2fded842d371221742f60299 Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 1 May 2024 14:03:49 +0200 Subject: [PATCH] first commit --- .gitignore | 29 ++ LICENSE | 21 ++ build.gradle | 78 ++++++ gradle.properties | 19 ++ gradlew | 249 ++++++++++++++++++ gradlew.bat | 92 +++++++ settings.gradle | 10 + .../championoverlay/ChampionOverlay.java | 31 +++ .../lul/flummi/championoverlay/Client.java | 14 + .../client/rendering/OverlayRenderer.java | 104 ++++++++ .../championoverlay/event/ModEvents.java | 15 ++ .../championoverlay/championoverlay_icon.png | Bin 0 -> 12771 bytes .../resources/championoverlay.mixins.json | 12 + src/main/resources/fabric.mod.json | 39 +++ 14 files changed, 713 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100755 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle create mode 100644 src/main/java/lul/flummi/championoverlay/ChampionOverlay.java create mode 100644 src/main/java/lul/flummi/championoverlay/Client.java create mode 100644 src/main/java/lul/flummi/championoverlay/client/rendering/OverlayRenderer.java create mode 100644 src/main/java/lul/flummi/championoverlay/event/ModEvents.java create mode 100644 src/main/resources/assets/championoverlay/championoverlay_icon.png create mode 100644 src/main/resources/championoverlay.mixins.json create mode 100644 src/main/resources/fabric.mod.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a24f2b --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# gradle + +.gradle/ +build/ +out/ +classes/ + +# vscode + +.settings/ +.vscode/ +bin/ +.classpath +.project + +# fabric + +run/ + +# java + +hs_err_*.log +replay_*.log +*.hprof +*.jfr +/gradle/ +/.github/ +/libs/ +/Changelog.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6e38bd9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Flummi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..a9bfcfc --- /dev/null +++ b/build.gradle @@ -0,0 +1,78 @@ +plugins { + id 'fabric-loom' version '1.5-SNAPSHOT' + id 'maven-publish' +} + +version = project.mod_version +group = project.maven_group + +base { + archivesName = project.archives_base_name +} + +repositories { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + maven { + // ModMenu + name = "terraformersmc 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_version}" + + modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" + + modImplementation "maven.modrinth:telluriumforge:${project.telluriumforge_version}-fabric" +} + +processResources { + inputs.property "version", project.version + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +tasks.withType(JavaCompile).configureEach { + it.options.release = 17 +} + +java { + + withSourcesJar() + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +jar { + from("LICENSE") { + rename { "${it}_${project.base.archivesName.get()}"} + } +} + +// configure the maven publication +publishing { + publications { + mavenJava(MavenPublication) { + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + // Notice: This block does NOT have the same function as the block in the top level. + // The repositories here will be used for publishing your artifact, not for + // retrieving dependencies. + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..466718c --- /dev/null +++ b/gradle.properties @@ -0,0 +1,19 @@ +# Done to increase the memory available to gradle. +org.gradle.jvmargs=-Xmx1G +org.gradle.parallel=true + +# Fabric Properties +minecraft_version=1.20.4 +yarn_mappings=1.20.4+build.3 +loader_version=0.15.7 + +# Mod Properties +mod_version=1.2.0-1.20.4 +maven_group=lul.flummi +archives_base_name=championoverlay + +# Dependencies +fabric_version=0.96.4+1.20.4 + +modmenu_version=9.0.0 +telluriumforge_version=1.2.1 diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1aa94a4 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..7101f8e --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..dfacbd1 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,10 @@ +pluginManagement { + repositories { + maven { + name = 'Fabric' + url = 'https://maven.fabricmc.net/' + } + mavenCentral() + gradlePluginPortal() + } +} diff --git a/src/main/java/lul/flummi/championoverlay/ChampionOverlay.java b/src/main/java/lul/flummi/championoverlay/ChampionOverlay.java new file mode 100644 index 0000000..9be6c28 --- /dev/null +++ b/src/main/java/lul/flummi/championoverlay/ChampionOverlay.java @@ -0,0 +1,31 @@ +package lul.flummi.championoverlay; + +import com.mikitellurium.telluriumforge.registry.IdentifierProvider; +import net.fabricmc.api.ModInitializer; +import net.minecraft.util.Identifier; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ChampionOverlay implements ModInitializer { + + private static final String MOD_ID = "championoverlay"; + private static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); + private static final IdentifierProvider registrationHelper = () -> MOD_ID; + + @Override + public void onInitialize() { + } + + public static String modId() { + return MOD_ID; + } + + public static Logger logger() { + return LOGGER; + } + + public static Identifier getModIdentifier(String path) { + return registrationHelper.modIdentifier(path); + } + +} diff --git a/src/main/java/lul/flummi/championoverlay/Client.java b/src/main/java/lul/flummi/championoverlay/Client.java new file mode 100644 index 0000000..726ddcf --- /dev/null +++ b/src/main/java/lul/flummi/championoverlay/Client.java @@ -0,0 +1,14 @@ +package lul.flummi.championoverlay; + +import lul.flummi.championoverlay.event.ModEvents; +import net.fabricmc.api.ClientModInitializer; + +public class Client implements ClientModInitializer { + + @Override + public void onInitializeClient() { + ChampionOverlay.logger().info("Starting client"); + ModEvents.register(); + } + +} diff --git a/src/main/java/lul/flummi/championoverlay/client/rendering/OverlayRenderer.java b/src/main/java/lul/flummi/championoverlay/client/rendering/OverlayRenderer.java new file mode 100644 index 0000000..da67251 --- /dev/null +++ b/src/main/java/lul/flummi/championoverlay/client/rendering/OverlayRenderer.java @@ -0,0 +1,104 @@ +package lul.flummi.championoverlay.client.rendering; + +import java.text.DecimalFormat; +import java.text.NumberFormat; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NbtCompound; + +@SuppressWarnings("resource") +public class OverlayRenderer { + public static void renderOverlay(DrawContext context, float deltaTick) { + MinecraftClient Instance = MinecraftClient.getInstance(); + ClientPlayerEntity player = Instance.player; + + if (Instance.player == null || Instance.options.hudHidden) + return; + + ItemStack mainHandItem = player.getMainHandStack(); + + double ItemCombatXp = 0; + int ChampionExp = 0; + String ChampionLevel = "null"; + String ChampionPercent = "0%"; + int ChampionExpCumu = 0; + + if (mainHandItem != null) { + NbtCompound tags = mainHandItem.getNbt(); + if (tags == null || !tags.contains("ExtraAttributes", 10)) + return; + + NbtCompound extraAttributes = tags.getCompound("ExtraAttributes"); + if (extraAttributes == null || !extraAttributes.contains("champion_combat_xp")) + return; + + ItemCombatXp = extraAttributes.getDouble("champion_combat_xp"); + + if (ItemCombatXp < 50000) { + ChampionExp = 50000; + ChampionLevel = "I"; + } else if (ItemCombatXp < 100000) { + ChampionExp = 100000; + ChampionExpCumu = 50000; + ChampionLevel = "II"; + } else if (ItemCombatXp < 250000) { + ChampionExp = 250000; + ChampionExpCumu = 100000; + ChampionLevel = "III"; + } else if (ItemCombatXp < 500000) { + ChampionExp = 500000; + ChampionExpCumu = 250000; + ChampionLevel = "IV"; + } else if (ItemCombatXp < 1000000) { + ChampionExp = 1000000; + ChampionExpCumu = 500000; + ChampionLevel = "V"; + } else if (ItemCombatXp < 1500000) { + ChampionExp = 1500000; + ChampionExpCumu = 1000000; + ChampionLevel = "VI"; + } else if (ItemCombatXp < 2000000) { + ChampionExp = 2000000; + ChampionExpCumu = 1500000; + ChampionLevel = "VII"; + } else if (ItemCombatXp < 2500000) { + ChampionExp = 2500000; + ChampionExpCumu = 2000000; + ChampionLevel = "VIII"; + } else if (ItemCombatXp < 3000000) { + ChampionExp = 3000000; + ChampionExpCumu = 2500000; + ChampionLevel = "IX"; + } else if (ItemCombatXp > 3000000) { + ChampionExp = -1; + ChampionExpCumu = 3000000; + ChampionLevel = "X"; + } + + ChampionPercent = new DecimalFormat("##.00") + .format((ItemCombatXp - ChampionExpCumu) / (ChampionExp - ChampionExpCumu) * 100); + } + + // show hud + if(ItemCombatXp > 0) { + NumberFormat format = NumberFormat.getIntegerInstance(); + + TextRenderer textRenderer = Instance.textRenderer; + String text = "Champion " + ChampionLevel + ": " + + format.format(ItemCombatXp) + " / " + + (ChampionExp == -1 ? "Maxed" : format.format(ChampionExp) + " (" + ChampionPercent + "%)"); + int width = context.getScaledWindowWidth(); + int height = context.getScaledWindowHeight(); + int textWidth = textRenderer.getWidth(text); + + int xPos = width / 2 - textWidth / 2; + int yPos = height - 90; + + context.drawTextWithShadow(textRenderer, text, xPos, yPos, 0xFFFFFFFF); + } + } +} diff --git a/src/main/java/lul/flummi/championoverlay/event/ModEvents.java b/src/main/java/lul/flummi/championoverlay/event/ModEvents.java new file mode 100644 index 0000000..58649a6 --- /dev/null +++ b/src/main/java/lul/flummi/championoverlay/event/ModEvents.java @@ -0,0 +1,15 @@ +package lul.flummi.championoverlay.event; + +import lul.flummi.championoverlay.client.rendering.OverlayRenderer; +import com.mikitellurium.telluriumforge.event.EventHelper; +import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; + +public class ModEvents { + + private static final EventHelper HELPER = new EventHelper(); + + public static void register() { + HELPER.addListener(HudRenderCallback.EVENT, OverlayRenderer::renderOverlay).registerAll(); + } + +} diff --git a/src/main/resources/assets/championoverlay/championoverlay_icon.png b/src/main/resources/assets/championoverlay/championoverlay_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c342dd0fde0c6b8c7d0486143f0a532c05e3e579 GIT binary patch literal 12771 zcmY+rc|6qb_db5l*q6vIvV<%Xkz`*65oIgJlD&+mv6QuJQz?n85m}>Gl3R9>3pTGsAQ4``qVT=Q`IpH{m8m7mm>L&;tOD=y*d@(#3}+uTqp5Mqa`Twl zqzG9S%H+foWAoj=TXuVPYrib|9gse3T)kCNx4G#R+r4_QVKtpPs`SMwU_Pkl?!X_m z!&P?#9#PbKB;t3%Cjw(RyZi9ffp6a5&3`X`E{v`G>zcX#R{*DFF0bf*j|Im7D$8mc zqvP9=@#V|G>P)VE?W;)x7Z$R;?nE;IJj#q{{Vb1=U}#LSZjLP|Y+d%f_7wp{nl`R@1H6%ysM~79b4N5W_zLz^N;-8`XED75uC(EKM>!u! zj1M$w!pBESx9;9zEpPq|A7ap^=T#IV~FHh2_xlR*S-}h4oQBT$XUL4 z?PLMrNHa=Z@|F<|7|H7Vb?baWk;^?E@!C$KGdDa~jlR01qO1op^S2#ihAmI=flss9 zLTBm3T=Wv8aOTHxiKv?W(yfClBDhx{_xnojvw$a;v5V)jI?d(OjyNTkMr4^_=YDe( zpS>{sy4v+}W)VD(lg`7{DQ`gCcR|OQ)u{Ig%6h0!ksDL4{5lJP@%6xz%i}(sc|#Ec zFdKHl`8b{L-_fRKL@8FHvv59%S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