diff options
author | Yasin <LifeIsAParadox@users.noreply.github.com> | 2022-03-09 09:52:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 09:52:33 +0100 |
commit | 33e27b83b7ac873312c415aed82728caf9f70d00 (patch) | |
tree | 05cacd32948e60828c91bccb6d4a57b810022e3b | |
parent | 270f37c727233d5400eaa9f18357218bca437484 (diff) | |
parent | 31ad86829ef86b82d4f4307171f31b9cf2b73a4c (diff) | |
download | Skyblocker-33e27b83b7ac873312c415aed82728caf9f70d00.tar.gz Skyblocker-33e27b83b7ac873312c415aed82728caf9f70d00.tar.bz2 Skyblocker-33e27b83b7ac873312c415aed82728caf9f70d00.zip |
Merge pull request #54 from LifeIsAParadox/1.6.0-update
1.6.0 update
19 files changed, 173 insertions, 172 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c0af1ef2..8e858560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,35 @@ -# Release 1.5.0 +# Release 1.6.0 + +This release only support 1.18.x + +Skyblocker now supports 1.18.2 but requires minimum **fabricloader** version of 0.13.11 -the mod support 1.17.x and 1.18.x but requires java 17. +New Features +* Add backpack preview by @KonaeAkira in https://github.com/LifeIsAParadox/Skyblocker/pull/40 +* Added Update Notification by @TacoMonkey11 in https://github.com/LifeIsAParadox/Skyblocker/pull/36 + +Fixes +* Fix item search not including lore by @KonaeAkira in https://github.com/LifeIsAParadox/Skyblocker/pull/37 +* Updated fetchur solver by @ExternalTime in https://github.com/LifeIsAParadox/Skyblocker/pull/41 +* customizable and improved item tooltip by @Fix3dll in https://github.com/LifeIsAParadox/Skyblocker/pull/44 +* Added simple scheduler for recurring and delayed tasks by @ExternalTime in https://github.com/LifeIsAParadox/Skyblocker/pull/39 +* Fix RPC crash by @TacoMonkey11 in https://github.com/LifeIsAParadox/Skyblocker/pull/45 +* Use the new scheduler and use fabricLoader to get config dir by @KonaeAkira in https://github.com/LifeIsAParadox/Skyblocker/pull/49 +* little fix for other items, change TimerTask to Scheduler by @Fix3dll in https://github.com/LifeIsAParadox/Skyblocker/pull/46 +* Rewrote chat listener interface to use fabric events api by @ExternalTime in https://github.com/LifeIsAParadox/Skyblocker/pull/53 +* migrate from log4j to slf4j by @Lifeisaparadox +* Fix RPC crash by @Lifeisaparadox +* Fix Backpack preview crash by @Lifeisaparadox + +added Indonesian translate by @null2264 +added russian translate by @HyperSoop + +New Contributor +* @Fix3dll made their first contribution in https://github.com/LifeIsAParadox/Skyblocker/pull/44 + +**Full Changelog**: https://github.com/LifeIsAParadox/Skyblocker/compare/v1.5.0...v1.6.0 +___ +# Release 1.5.0 New Features * Added Wiki Lookup by @TacoMonkey11 in https://github.com/LifeIsAParadox/Skyblocker/pull/30 diff --git a/FEATURES.md b/FEATURES.md index 900dea59..4a057057 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -1,5 +1,5 @@ * Bars: Health and absorption, Mana, Defense, XP -* Hide Messages: Ability Cooldown, Heal, AOTE, Implosion, Molten Wave +* Hide Messages: Ability Cooldown, Heal, AOTE, Implosion, Molten Wave, Teleport Pad Messages * Dungeon Minimap * Dungeon Puzzle Solver: * Three Weirdos @@ -13,4 +13,6 @@ * Wiki Lookup: press f4 to open the wiki page about the held item * Discord Rich Presence: Allows user to show either their Piggy, Bits, or location. Along with a custom message * Quicknav: fast navigate between pets, armor, enderchest, skill, collection, crafting, enchant, envil, warp dungeon, warp hub -* Recipe book: in the vanilla recipe book all skyblock items are listed and you can see the recipe of the item
\ No newline at end of file +* Recipe book: in the vanilla recipe book all skyblock items are listed and you can see the recipe of the item +* Backpack preview: after you clicked your backpack or enderchest once you can hover over the backpack or enderchest and hold shift to preview +* Update notification
\ No newline at end of file @@ -10,23 +10,14 @@ Hypixel Skyblock Mod for Minecraft 1.17.x + 1.18.x +Installation guide is [here](https://github.com/LifeIsAParadox/Skyblocker/wiki/installation) -### Table of content -* [Features](#features) -* [Images](#images) -* [Requirements](#requirements) -* [Install Fabric](#install-fabric) -* [Install Skyblocker](#install-skyblocker) -* [Modpack](#modpack) easy install (recommended) - -<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> -___ ## Features <details open> <summary>open</summary> * Bars: Health and absorption, Mana, Defense, XP -* Hide Messages: Ability Cooldown, Heal, AOTE, Implosion, Molten Wave +* Hide Messages: Ability Cooldown, Heal, AOTE, Implosion, Molten Wave, Teleport Pad Messages * Dungeon Minimap * Dungeon Puzzle Solver: * Three Weirdos @@ -41,6 +32,8 @@ ___ * Discord Rich Presence: Allows user to show either their Piggy, Bits, or location. Along with a custom message * Quicknav: fast navigate between pets, armor, enderchest, skill, collection, crafting, enchant, envil, warp dungeon, warp hub * Recipe book: in the vanilla recipe book all skyblock items are listed and you can see the recipe of the item +* Backpack preview: after you clicked your backpack or enderchest once you can hover over the backpack or enderchest and hold shift to preview +* Update notification </details> @@ -56,72 +49,25 @@ ___ <img padding="10px,0px" height="150" src="https://hysky.de/drill.png" /> <img padding="10px,0px" height="150" src="https://hysky.de/richpresencesmall.png" /> <img padding="10px,0px" height="150" src="https://hysky.de/recipe.png" /> +<img padding="10px,0px" height="150" src="https://hysky.de/backpack-preview.png" /> </details> -___ -## Requirements -<details> -<summary>open</summary> - -**Fabric Loader** 0.12.11 or higher: https://fabricmc.net/use/ \ -**Fabric API**: https://modrinth.com/mod/fabric-api/versions \ -(optional) **modmenu**: https://modrinth.com/mod/modmenu - -</details> - -___ -## Install Fabric -<details> -<summary>open</summary> - -1. Download the Fabric installer from https://fabricmc.net/use/. Similar to Forge, this installer will generate all of the required files for whichever version of Minecraft you select. However, Fabric does not have multiple installers for each version and you can install any version you want via the same installer. -2. Open the Fabric installer, which should automatically have the `Client` tab selected at the top. \ -![install image](https://web.archive.org/web/20211023134637im_/https://images.shockbyte.com/knowledgebase/javaw_0EdmmFE7hw.png) -3. Select the Minecraft version you want to install onto your client. You can also select a version for the Fabric Mod Loader here, although it's normally best left on the latest version unless required by a specific mod. -4. Ensure that the install location is set to the correct place. The correct location varies per operating system and install, but should look something like one of these depending on your platform: - * Windows: `%AppData%/.minecraft` or `C:/Users/(username)/AppData/Roaming/.minecraft` - * MacOS: `~/Library/Application Support/minecraft` - * Linux: `~/.minecraft` -5. If you'd like the installer to automatically create a selectable profile within your Minecraft launcher, make sure the `Create profile` box is checked. -6. Click the Install button, and your install should complete within a few seconds! After that, click `OK` and close off the installer. - 1. Open the Minecraft Launcher and the newly created Fabric profile should automatically be selected. Click `Play`, and your Fabric install will load up. \ - ![Install image 2](https://web.archive.org/web/20211023134637im_/https://images.shockbyte.com/knowledgebase/javaw_r8qQWFtkAh.png) \ - <small><i>Source and images: <a href='https://web.archive.org/web/20211023134636/https://shockbyte.com/billing/knowledgebase/212/How-to-install-FabricMC-on-your-PC.html'>schockbyte.com</a></i></small> - -</details> - -___ -## Install Skyblocker - -<details> -<summary>open</summary> +## Contribute -1. Download Skyblocker from [Modrinth](https://modrinth.com/mod/skyblocker-liap/versions) or [Github](https://github.com/LifeIsAParadox/Skyblocker/releases/latest) -2. Download Fabric Api from [Modrinth](https://modrinth.com/mod/fabric-api/versions) or [Curseforge](https://www.curseforge.com/minecraft/mc-mods/fabric-api) - 1. (optional) Download Modmenu from [Modrinth](https://modrinth.com/mod/modmenu/versions) or [Curseforge](https://www.curseforge.com/minecraft/mc-mods/modmenu) -3. Once the mods have been downloaded, navigate to your Minecraft install folder. This varies per operating system and install, but should look something like this depending on your platform: - * Windows: `%AppData%/.minecraft` or `C:/Users/(username)/AppData/Roaming/.minecraft` - * MacOS: `~/Library/Application Support/minecraft` - * Linux: `~/.minecraft` +Everyone can contribute to Skyblocker, read [this](https://github.com/LifeIsAParadox/Skyblocker/wiki/Contribute) for more information. - ![](https://web.archive.org/web/20211022181423im_/https://images.shockbyte.com/knowledgebase/explorer_aDOT2ascSM.png) -4. Open the `mods` folder in your Minecraft install folder. If there isn't a `mods` folder there, you can create it. -5. Move the mod JAR files that you downloaded into the `mods` folder in your Minecraft install folder. -6. After moving all the files, open the Minecraft Launcher and start the game using your Fabric profile. +## Stargazers -<small><i>Source and image: <a href='https://web.archive.org/web/20211024070022/https://shockbyte.com/billing/knowledgebase/213/How-to-install-FabricMC-Mods-on-your-PC.html'>schockbyte.com</a></i></small> +[![Stargazers repo roster for @LifeIsAParadox/Skyblocker](https://reporoster.com/stars/LifeIsAParadox/Skyblocker)](https://github.com/LifeIsAParadox/Skyblocker/stargazers) -</details> - -___ -## Modpack - -<details> -<summary>open</summary> +## Credits -1. Download the [skyblocker modpack](https://github.com/LifeIsAParadox/Skyblocker-modpack/releases/latest). Select Multimc or ~~Curseforge~~ version. - 1. (Multimc) Drag and drop the zip into Multi mc and start the new instance. Every time you start the instance the modpack checks and updates mods to the latest version. - 2. (Curseforge) not implemented yet +| [<img alt="Kraineff" src="https://github.com/Kraineff.png" width="100">](https://github.com/Kraineff) | [<img alt="d3dx9" src="https://github.com/d3dx9.png" width="100">](https://github.com/d3dx9) | [<img alt="LifeIsAParadox" src="https://github.com/LifeIsAParadox.png" width="100">](https://github.com/LifeIsAParadox) | [<img alt="ExternalTime" src="https://github.com/ExternalTime.png" width="100">](https://github.com/ExternalTime) | [<img alt="Zailer43" src="https://github.com/Zailer43.png" width="100">](https://github.com/Zailer43) | [<img alt="TacoMonkey11" src="https://github.com/TacoMonkey11.png" width="100">](https://github.com/TacoMonkey11) | [<img alt="KonaeAkira" src="https://github.com/KonaeAkira.png" width="100">](https://github.com/KonaeAkira) | [<img alt="Fix3dll" src="https://github.com/Fix3dll.png" width="100">](https://github.com/Fix3dll) | +|:-------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------:| +| [Kraineff](https://github.com/Kraineff) | [d3dx9](https://github.com/d3dx9) | [LifeIsAParadox](https://github.com/LifeIsAParadox) | [ExternalTime](https://github.com/ExternalTime) | [Zailer43](https://github.com/Zailer43) | [TacoMonkey11](https://github.com/TacoMonkey11) | [KonaeAkira](https://github.com/KonaeAkira) | [Fix3dll](https://github.com/Fix3dll) | -</details>
\ No newline at end of file +### Translators +German ([LifeIsAParadox](https://github.com/LifeIsAParadox)) \ +Indonesian ([null2264](https://github.com/null2264)) \ +Russian ([HyperSoop](https://github.com/HyperSoop)) diff --git a/build.gradle b/build.gradle index 9b03c3fe..32109586 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,10 @@ plugins { - id 'fabric-loom' version '0.10-SNAPSHOT' + id 'fabric-loom' version '0.11-SNAPSHOT' id 'maven-publish' - id 'com.modrinth.minotaur' version '1.2.+' + id 'com.modrinth.minotaur' version '2.0.2' } -import com.modrinth.minotaur.TaskModrinthUpload -import com.modrinth.minotaur.request.VersionType +import com.modrinth.minotaur.dependencies.ModDependency sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 @@ -25,13 +24,12 @@ repositories { } maven { url "https://maven.terraformersmc.com/releases" } maven { url "https://maven.shedaniel.me/" } - maven { + maven { url 'https://repo.maven.apache.org/maven2' name 'Maven Central' } maven {url "https://maven.jaackson.me/repo"} maven {url "https://jitpack.io"} - } dependencies { @@ -56,24 +54,20 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - // https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit + // https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit used pull data from the NEU item repo include(implementation("org.eclipse.jgit:org.eclipse.jgit:6.0.0.202111291000-r")) - // https://mvnrepository.com/artifact/org.slf4j/slf4j-api - include(implementation("org.slf4j:slf4j-api:1.7.28")) - - //DiscordIPC + Libraries so it works on unix systems - modImplementation ("com.jagrosh:DiscordIPC:0.5"){ - exclude module: "slf4j-api" - } + modImplementation ("com.jagrosh:DiscordIPC:0.5") + // https://github.com/jaacksondev/DiscordIPC include "com.jagrosh:DiscordIPC:0.5" - //https://github.com/kohlschutter/junixsocket + //https://github.com/kohlschutter/junixsocket discordrpc unix include(modImplementation("com.kohlschutter.junixsocket:junixsocket-common:2.0.4")) include(modImplementation("com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4")) + // allow gson to deserialize the api data into a record include(modImplementation("com.github.Marcono1234:gson-record-type-adapter-factory:0.2.0")) } @@ -90,7 +84,7 @@ tasks.withType(JavaCompile).configureEach { // this fixes some edge cases with special characters not displaying correctly // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html // If Javadoc is generated, this must be specified in that task too. - it.options.encoding = "UTF-8" + // Minecraft 1.18 upwards uses Java 17. it.options.release = 17 @@ -113,26 +107,24 @@ test { useJUnitPlatform() } -task publishModrinth(type: TaskModrinthUpload) { - dependsOn(build) - onlyIf { - System.getenv('MODRINTH_TOKEN') - } - +modrinth { token = System.getenv('MODRINTH_TOKEN') projectId = project.modrinth_id versionNumber = "v${project.version}" - versionName = "Skyblocker ${project.mod_version} (${project.suported_version})" + versionName = "Skyblocker ${project.mod_version} for ${project.suported_version}" uploadFile = remapJar - addGameVersion('1.17.1') - addGameVersion((String) project.minecraft_version) - addLoader('fabric') - versionType = VersionType.RELEASE + gameVersions = ["1.18", project.minecraft_version] + loaders = ["fabric"] + versionType = "release" + dependencies = [ // Yet another array. Create a new `ModDependency` or `VersionDependency` with two strings - the ID and the scope + new ModDependency("P7dR8mSH", "required"), // Creates a new required dependency on Fabric API + new ModDependency("mOgUt4GM", "optional") // modmenu + ] changelog = System.getenv('CHANGELOG') - doLast { - println "::set-output name=url::https://modrinth.com/mod/skyblocker-liap/version/$uploadInfo.id" - } +} +tasks.modrinth.doLast { + println "::set-output name=url::https://modrinth.com/mod/skyblocker-liap/version/$uploadInfo.id" } // configure the maven publication diff --git a/gradle.properties b/gradle.properties index f1e32644..d9daf2ac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,22 +1,22 @@ org.gradle.jvmargs=-Xmx1G -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US # Fabric Properties (https://fabricmc.net/versions.html) -minecraft_version=1.18.1 -yarn_mappings=1.18.1+build.2 -loader_version=0.12.11 +minecraft_version=1.18.2 +yarn_mappings=1.18.2+build.1 +loader_version=0.13.3 #Fabric api -fabric_version=0.44.0+1.18 +fabric_version=0.47.9+1.18.2 # Dependencies ## Cloth Api (https://www.curseforge.com/minecraft/mc-mods/cloth-config/files) -clothconfig_version=6.1.50 +clothconfig_version=6.2.57 ## Mod Menu (https://www.curseforge.com/minecraft/mc-mods/modmenu/files) -mod_menu_version=3.0.1 +mod_menu_version=3.1.0 # Mod Properties -mod_version = 1.5.0 +mod_version = 1.6.0 maven_group = me.xmrvizzy archives_base_name = skyblocker modrinth_id=y6DuFGwJ -suported_version=1.17.x-1.18.x
\ No newline at end of file +suported_version=1.18.x
\ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a33384a3..856da69b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
\ No newline at end of file diff --git a/src/main/java/me/xmrvizzy/skyblocker/discord/DiscordRPCManager.java b/src/main/java/me/xmrvizzy/skyblocker/discord/DiscordRPCManager.java index efbc3e56..e13dfd09 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/discord/DiscordRPCManager.java +++ b/src/main/java/me/xmrvizzy/skyblocker/discord/DiscordRPCManager.java @@ -17,7 +17,7 @@ public class DiscordRPCManager implements IPCListener{ public static long startTimestamp; public static IPCClient client; public boolean isConnected; - public static final Logger logger = LoggerFactory.getLogger("Skyblocker DiscordRPC"); + private static final Logger LOGGER = LoggerFactory.getLogger(DiscordRPCManager.class.getName()); public static DecimalFormat dFormat = new DecimalFormat("###,###.##"); public int cycleCount = 0; @@ -34,17 +34,17 @@ public class DiscordRPCManager implements IPCListener{ public void start(){ try { - logger.info("Starting..."); + LOGGER.info("[Skyblocker DiscordRPC] Starting..."); startTimestamp = OffsetDateTime.now().toEpochSecond(); client = new IPCClient(934607927837356052L); client.setListener(this); try { client.connect(); } catch (Exception e) { - logger.warn("Failed to connect: " + e.getMessage()); + LOGGER.warn("Failed to connect: " + e.getMessage()); } } catch (Throwable ex) { - logger.error("unexpected error occurred while trying to start..."); + LOGGER.error("[Skyblocker DiscordRPC] unexpected error occurred while trying to start..."); ex.printStackTrace(); } } @@ -79,7 +79,7 @@ public class DiscordRPCManager implements IPCListener{ public void stop(){ if (client != null && client.getStatus() == PipeStatus.CONNECTED) { - logger.info("Closing..."); + LOGGER.info("[Skyblocker DiscordRPC] Closing..."); isConnected = false; client.close(); client = null; @@ -88,13 +88,13 @@ public class DiscordRPCManager implements IPCListener{ @Override public void onReady(IPCClient client) { - logger.info("Started!"); + LOGGER.info("[Skyblocker DiscordRPC] Started!"); isConnected = true; } @Override public void onClose(IPCClient client, JsonObject json) { - logger.info("Closed"); + LOGGER.info("[Skyblocker DiscordRPC] Closed"); isConnected = false; } diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java index cba87f48..b3de4850 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java @@ -47,7 +47,7 @@ public abstract class HandledScreenMixin extends Screen { @Inject(at = @At("HEAD"), method = "keyPressed", cancellable = true) public void keyPressed(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable<Boolean> cir) { - if (keyCode != 256 && !MinecraftClient.getInstance().options.keyInventory.matchesKey(keyCode, scanCode)){ + if (keyCode != 256 && !MinecraftClient.getInstance().options.inventoryKey.matchesKey(keyCode, scanCode)){ if (WikiLookup.wikiLookup.matchesKey(keyCode, scanCode)) WikiLookup.openWiki(focusedSlot); } } diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/BackpackPreview.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/BackpackPreview.java index 53a48a04..2638b0a6 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/BackpackPreview.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/BackpackPreview.java @@ -47,7 +47,7 @@ public class BackpackPreview extends DrawableHelper { } private static File getSaveDir() { - String uuid = MinecraftClient.getInstance().player.getUuidAsString(); + String uuid = MinecraftClient.getInstance().getSession().getUuid(); File dir = FabricLoader.getInstance().getConfigDir().resolve("skyblocker/backpack-preview/" + uuid).toFile(); dir.mkdirs(); return dir; diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java index d4f7fec5..1b87925c 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java @@ -9,8 +9,11 @@ import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; import net.minecraft.client.MinecraftClient; import net.minecraft.entity.Entity; import net.minecraft.util.math.Box; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DungeonBlaze { + private static final Logger LOGGER = LoggerFactory.getLogger(DungeonBlaze.class.getName()); static Entity highestBlaze = null; static Entity lowestBlaze = null; static boolean renderHooked = false; @@ -70,7 +73,7 @@ public class DungeonBlaze { } } }catch(Exception e) { - System.out.println("BlazeRenderer: " + e); + LOGGER.warn("[Skyblocker BlazeRenderer] " + e); } } }
\ No newline at end of file diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/terminal/ColorTerminal.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/terminal/ColorTerminal.java index 4d40ea83..57c40654 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/terminal/ColorTerminal.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/terminal/ColorTerminal.java @@ -9,14 +9,14 @@ import net.minecraft.item.Items; import net.minecraft.util.DyeColor; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.*; public class ColorTerminal extends ContainerSolver { - private static final Logger LOGGER = LogManager.getLogger(ColorTerminal.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(ColorTerminal.class.getName()); private static final Map<String, DyeColor> colorFromName; private DyeColor targetColor; private static final Map<Item, DyeColor> itemColor; diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java index 1d70c5e0..8afefdb4 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java @@ -13,7 +13,8 @@ import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; import net.minecraft.util.Formatting; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; @@ -27,6 +28,7 @@ import java.util.concurrent.CompletableFuture; import java.util.zip.GZIPInputStream; public class PriceInfoTooltip { + private static final Logger LOGGER = LoggerFactory.getLogger(PriceInfoTooltip.class.getName()); private static final SkyblockerMod skyblocker = SkyblockerMod.getInstance(); private static final MinecraftClient client = MinecraftClient.getInstance(); private static JsonObject npcPricesJson; @@ -301,7 +303,7 @@ public class PriceInfoTooltip { } } } catch (IOException e) { - LogManager.getLogger(PriceInfoTooltip.class.getName()).warn("[Skyblocker] Failed to download average BIN prices!", e); + LOGGER.warn("[Skyblocker] Failed to download average BIN prices!", e); } switch (type) { case ONE_DAY -> oneDayAvgPricesJson = result; @@ -316,7 +318,7 @@ public class PriceInfoTooltip { InputStreamReader reader = new InputStreamReader(apiAddr.openStream()); result = new Gson().fromJson(reader, JsonObject.class); } catch (IOException e) { - LogManager.getLogger(PriceInfoTooltip.class.getName()).warn("[Skyblocker] Failed to download bazaar prices!", e); + LOGGER.warn("[Skyblocker] Failed to download bazaar prices!", e); } bazaarPricesJson = result; } @@ -328,7 +330,7 @@ public class PriceInfoTooltip { InputStreamReader reader = new InputStreamReader(apiAddr.openStream()); result = new Gson().fromJson(reader, JsonObject.class); } catch (IOException e) { - LogManager.getLogger(PriceInfoTooltip.class.getName()).warn("[Skyblocker] Failed to download lowest BIN prices!", e); + LOGGER.warn("[Skyblocker] Failed to download lowest BIN prices!", e); } lowestPricesJson = result; } @@ -340,7 +342,7 @@ public class PriceInfoTooltip { InputStreamReader reader = new InputStreamReader(apiAddr.openStream()); result = new Gson().fromJson(reader, JsonObject.class); } catch (IOException e) { - LogManager.getLogger(PriceInfoTooltip.class.getName()).warn("[Skyblocker] Failed to download NPC prices!", e); + LOGGER.warn("[Skyblocker] Failed to download NPC prices!", e); } npcPricesJson = result; } @@ -352,7 +354,7 @@ public class PriceInfoTooltip { InputStreamReader reader = new InputStreamReader(apiAddr.openStream()); result = new Gson().fromJson(reader, JsonObject.class); } catch (IOException e) { - LogManager.getLogger(PriceInfoTooltip.class.getName()).warn("[Skyblocker] Failed to download museum items!", e); + LOGGER.warn("[Skyblocker] Failed to download museum items!", e); } isMuseumJson = result; } diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemStackBuilder.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemStackBuilder.java index 6781f99c..b7a6e919 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemStackBuilder.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemStackBuilder.java @@ -130,7 +130,7 @@ public class ItemStackBuilder { for (int i = 0; i < otherNumsMin.size(); ++i) { String left = "\\{" + i + "\\}"; String right = otherNumsMin.get(i).getAsString() + " ➡ " + otherNumsMax.get(i).getAsString(); - list.add(new Pair(left, right)); + list.add(new Pair<>(left, right)); } return list; diff --git a/src/main/java/me/xmrvizzy/skyblocker/utils/Events.java b/src/main/java/me/xmrvizzy/skyblocker/utils/Events.java index e3aa4da4..9c488f34 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/utils/Events.java +++ b/src/main/java/me/xmrvizzy/skyblocker/utils/Events.java @@ -1,7 +1,6 @@ package me.xmrvizzy.skyblocker.utils; import me.xmrvizzy.skyblocker.SkyblockerMod; -import me.xmrvizzy.skyblocker.config.SkyblockerConfig; import net.minecraft.client.MinecraftClient; import net.minecraft.text.*; import org.slf4j.Logger; @@ -9,11 +8,11 @@ import org.slf4j.LoggerFactory; public class Events { public static MinecraftClient client = MinecraftClient.getInstance(); - public static Logger logger = LoggerFactory.getLogger(SkyblockerMod.NAMESPACE); + public static Logger LOGGER = LoggerFactory.getLogger(SkyblockerMod.NAMESPACE); public static void onSkyblockJoin(){ Utils.isOnSkyblock = true; - logger.info("Joined Skyblock"); + LOGGER.info("[Skyblocker] Joined Skyblock"); if (UpdateChecker.shouldUpdate()){ TranslatableText linkMessage = new TranslatableText("skyblocker.update.update_message"); TranslatableText linkMessageEnding = new TranslatableText("skyblocker.update.update_message_end"); @@ -21,12 +20,14 @@ public class Events { TranslatableText hoverText = new TranslatableText("skyblocker.update.hover_text"); linkMessage.append(link.styled(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://modrinth.com/mod/skyblocker-liap/versions")).withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverText)))).append(linkMessageEnding); - client.player.sendMessage(linkMessage, false); + if (client.player != null) { + client.player.sendMessage(linkMessage, false); + } } } public static void onSkyblockDisconnect(){ - logger.info("Disconnected from Skyblock"); + LOGGER.info("[Skyblocker] Disconnected from Skyblock"); SkyblockerMod.getInstance().discordRPCManager.stop(); Utils.isOnSkyblock = false; Utils.isInDungeons = false; diff --git a/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java b/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java index 21c30ada..66d04b50 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java +++ b/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java @@ -45,12 +45,13 @@ public class Utils { String location = null; List<String> sidebarLines = getSidebar(); try { - assert sidebarLines != null; - for (String sidebarLine : sidebarLines) { - if (sidebarLine.contains("⏣")) location = sidebarLine; + if( sidebarLines != null) { + for (String sidebarLine : sidebarLines) { + if (sidebarLine.contains("⏣")) location = sidebarLine; + } + if (location == null) location = "Unknown"; + location = location.replace('⏣', ' ').strip(); } - if (location == null) location = "Unknown"; - location = location.replace('⏣', ' ').strip(); } catch (IndexOutOfBoundsException e) { e.printStackTrace(); } @@ -63,10 +64,12 @@ public class Utils { List<String> sidebarLines = getSidebar(); try { - assert sidebarLines != null; - for (String sidebarLine : sidebarLines) { - if (sidebarLine.contains("Piggy:")) purseString = sidebarLine; - if (sidebarLine.contains("Purse:")) purseString = sidebarLine; + + if (sidebarLines != null) { + for (String sidebarLine : sidebarLines) { + if (sidebarLine.contains("Piggy:")) purseString = sidebarLine; + if (sidebarLine.contains("Purse:")) purseString = sidebarLine; + } } if (purseString != null) purse = Double.parseDouble(purseString.replaceAll("[^0-9.]", "").strip()); else purse = 0; @@ -82,9 +85,10 @@ public class Utils { String bitsString = null; List<String> sidebarLines = getSidebar(); try { - assert sidebarLines != null; - for (String sidebarLine : sidebarLines) { - if (sidebarLine.contains("Bits")) bitsString = sidebarLine; + if (sidebarLines != null) { + for (String sidebarLine : sidebarLines) { + if (sidebarLine.contains("Bits")) bitsString = sidebarLine; + } } if (bitsString != null) { bits = Integer.parseInt(bitsString.replaceAll("[^0-9.]", "").strip()); diff --git a/src/main/resources/assets/skyblocker/lang/de_de.json b/src/main/resources/assets/skyblocker/lang/de_de.json index d08e868d..a74b39ff 100644 --- a/src/main/resources/assets/skyblocker/lang/de_de.json +++ b/src/main/resources/assets/skyblocker/lang/de_de.json @@ -5,7 +5,6 @@ "text.autoconfig.skyblocker.title": "Skyblocker-Einstellungen", "text.autoconfig.skyblocker.category.general": "Allgemein", - "text.autoconfig.skyblocker.option.general.apiKey": "Hypixel API Schlüssel (WIP)", "text.autoconfig.skyblocker.option.general.bars": "Gesundheits-, Mana-, Verteidigungs- und XP-Balken", "text.autoconfig.skyblocker.option.general.bars.enableBars": "Balken aktivieren", diff --git a/src/main/resources/assets/skyblocker/lang/id_id.json b/src/main/resources/assets/skyblocker/lang/id_id.json new file mode 100644 index 00000000..9d093884 --- /dev/null +++ b/src/main/resources/assets/skyblocker/lang/id_id.json @@ -0,0 +1,18 @@ +{
+ "key.categories.skyblocker": "Skyblocker",
+ "key.hotbarSlotLock": "Kunci Slot (Hotbar)",
+ "text.autoconfig.skyblocker.title": "Pengaturan Skyblocker",
+ "text.autoconfig.skyblocker.category.general": "Umum",
+ "text.autoconfig.skyblocker.option.general.bars": "Darah, Mana, Pertahanan & Bar XP",
+ "text.autoconfig.skyblocker.option.general.bars.enableBars": "Aktifkan Bar",
+ "text.autoconfig.skyblocker.category.locations": "Lokasi",
+ "text.autoconfig.skyblocker.option.locations.dungeons": "Dungeons",
+ "text.autoconfig.skyblocker.option.locations.dungeons.enableMap": "Aktifkan Peta",
+ "text.autoconfig.skyblocker.option.locations.dungeons.solveThreeWeirdos": "Pecahkan Teka Teki \"Tiga Orang Aneh\"",
+ "text.autoconfig.skyblocker.option.locations.dungeons.blazesolver": "Pecahkan Teka Teki \"Blaze\"",
+ "text.autoconfig.skyblocker.category.messages": "Pesan",
+ "text.autoconfig.skyblocker.option.messages.hideAbility": "Sembunyikan Cooldown Kemampuan",
+ "text.autoconfig.skyblocker.option.messages.hideHeal": "Sembunyikan Pesan Penyembuhan",
+ "text.autoconfig.skyblocker.option.messages.hideAOTE": "Sembunyikan Pesan AOTE",
+ "text.autoconfig.skyblocker.option.messages.hideAds": "Sembunyikan Iklan dari Chat Publik"
+}
diff --git a/src/main/resources/assets/skyblocker/lang/ru_ru.json b/src/main/resources/assets/skyblocker/lang/ru_ru.json index 0e89b9fa..96066725 100644 --- a/src/main/resources/assets/skyblocker/lang/ru_ru.json +++ b/src/main/resources/assets/skyblocker/lang/ru_ru.json @@ -1,30 +1,34 @@ { "key.categories.skyblocker": "Skyblocker", - "key.hotbarSlotLock": "Блокировка слотов (Хотбар)", + "key.hotbarSlotLock": "Блокировка Слотов (В хотбаре)", "text.autoconfig.skyblocker.title": "Настройки Skyblocker", "text.autoconfig.skyblocker.category.general": "Основные", - "text.autoconfig.skyblocker.option.general.apiKey": "Hypixel API-ключ ( в разработке)", - "text.autoconfig.skyblocker.option.general.bars": " Бары здоровья, маны, защиты и XP", - "text.autoconfig.skyblocker.option.general.bars.enableBars": "Включить бары", + "text.autoconfig.skyblocker.option.general.bars": "Полоски здоровья, маны, защиты и опыта", + "text.autoconfig.skyblocker.option.general.bars.enableBars": "Включить полоски", "text.autoconfig.skyblocker.category.locations": "Локации", "text.autoconfig.skyblocker.option.locations.dungeons": "Подземелья", - "text.autoconfig.skyblocker.option.locations.dungeons.enableMap": "Включить карту", - "text.autoconfig.skyblocker.option.locations.dungeons.solveThreeWeirdos": "Решить загадку \"Три чудака\"", - "text.autoconfig.skyblocker.option.locations.dungeons.blazesolver": "Решить головоломку Блейза", - "text.autoconfig.skyblocker.option.locations.dungeons.solveTrivia": "Решить головоломку Тривия", - "text.autoconfig.skyblocker.option.locations.dwarvenMines": "Гномьи шахты", + "text.autoconfig.skyblocker.option.locations.dungeons.enableMap": "Включить Карту", + "text.autoconfig.skyblocker.option.locations.dungeons.solveThreeWeirdos": "Решать Головоломку \"Три чудака\"", + "text.autoconfig.skyblocker.option.locations.dungeons.blazesolver": "Решать Головоломку С Ифритами", + "text.autoconfig.skyblocker.option.locations.dungeons.solveTrivia": "Решать Головоломку С Вопросами", + "text.autoconfig.skyblocker.option.locations.dwarvenMines": "Гномьи Шахты", "text.autoconfig.skyblocker.option.locations.dwarvenMines.enableDrillFuel": "Включить топливо дрели", - "text.autoconfig.skyblocker.option.locations.dwarvenMines.solveFetchur": "Solve Fetchur", - "text.autoconfig.skyblocker.option.locations.dwarvenMines.solvePuzzler": "Решить загадку \"Puzzler\"", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.solveFetchur": "Решать загадку Fetchur-а", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.solvePuzzler": "Решать загадку Puzzler-а", "text.autoconfig.skyblocker.category.messages": "Сообщения", - "text.autoconfig.skyblocker.option.messages.hideAbility": "Скрыть откат способностей", - "text.autoconfig.skyblocker.option.messages.hideHeal": "Скрыть сообщения об исцелении", - "text.autoconfig.skyblocker.option.messages.hideAOTE": "Скрыть сообщения от \"AOTE\"", - "text.autoconfig.skyblocker.option.messages.hideImplosion": "Скрыть сообщение \"Implosion\"", - "text.autoconfig.skyblocker.option.messages.hideMoltenWave": "Скрыть сообщение \"Molten Wave\"", - "text.autoconfig.skyblocker.option.messages.hideAds": "Скрывать рекламу из публичного чата" + "text.autoconfig.skyblocker.option.messages.hideAbility": "Скрыть Перезарядку Способностей", + "text.autoconfig.skyblocker.option.messages.hideHeal": "Скрыть Сообщения об Исцелении", + "text.autoconfig.skyblocker.option.messages.hideAOTE": "Скрыть сообщения AOTE/AOTV", + "text.autoconfig.skyblocker.option.messages.hideImplosion": "Скрыть сообщения Implosion", + "text.autoconfig.skyblocker.option.messages.hideMoltenWave": "Скрыть сообщения Molten Wave", + "text.autoconfig.skyblocker.option.messages.hideAds": "Скрывать рекламу в чате", + "text.autoconfig.skyblocker.option.locations.dungeons.oldLevers": "Хитбокс рычагов из 1.8", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals": "Решение Терминалов", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals.solveColor": "Решать Выбор по Цвету", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals.solveOrder": "Решать Клик По Возрастанию", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals.solveStartsWith": "Решать Начинается С" }
\ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index fa04da47..aa1ad170 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -5,7 +5,8 @@ "name": "Skyblocker", "description": "Hypixel Skyblock Mod", "authors": ["xMrVizzy", "d3dx9", "LifeIsAParadox"], - "contributors": ["ExternalTime", "Zailer43", "TacoMonkey", "KonaeAkira"], + "contributors": ["ExternalTime", "Zailer43", "TacoMonkey", "KonaeAkira", "Fix3dll"], + "translators" : ["null2264", "HyperSoop"], "contact": { "homepage": "https://hysky.de", "sources": "https://github.com/LifeIsAParadox/Skyblocker", @@ -26,10 +27,10 @@ "skyblocker.mixins.json" ], "depends": { - "fabricloader": ">=0.12.11", + "fabricloader": ">=0.13.3", "fabric": "*", "cloth-config2": "*", - "minecraft": ["1.18.x","1.17.x"] + "minecraft": ["1.18.x"] }, "custom": { "modmenu": { |