From 6c3dd6b662ec86b8b7a185de9778ee97d435f3d1 Mon Sep 17 00:00:00 2001 From: Kevin <92656833+kevinthegreat1@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:42:08 -0500 Subject: Fix discoveries index (#557) --- .../skyblock/tabhud/widget/DungeonSecretWidget.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java index 6f40f5a8..309ba9ca 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java @@ -1,16 +1,19 @@ package de.hysky.skyblocker.skyblock.tabhud.widget; import de.hysky.skyblocker.skyblock.tabhud.util.Ico; +import de.hysky.skyblocker.skyblock.tabhud.util.PlayerListMgr; import net.minecraft.text.MutableText; import net.minecraft.text.Text; import net.minecraft.util.Formatting; +import java.util.regex.Pattern; + // this widget shows info about the secrets of the dungeon public class DungeonSecretWidget extends Widget { - private static final MutableText TITLE = Text.literal("Discoveries").formatted(Formatting.DARK_PURPLE, - Formatting.BOLD); + private static final MutableText TITLE = Text.literal("Discoveries").formatted(Formatting.DARK_PURPLE, Formatting.BOLD); + private static final Pattern DISCOVERIES = Pattern.compile("Discoveries: (\\d+)"); public DungeonSecretWidget() { super(TITLE, Formatting.DARK_PURPLE.getColorValue()); @@ -18,9 +21,12 @@ public class DungeonSecretWidget extends Widget { @Override public void updateContent() { - this.addSimpleIcoText(Ico.CHEST, "Secrets:", Formatting.YELLOW, 31); - this.addSimpleIcoText(Ico.SKULL, "Crypts:", Formatting.YELLOW, 32); - + if (PlayerListMgr.regexAt(31, DISCOVERIES) != null) { + this.addSimpleIcoText(Ico.CHEST, "Secrets:", Formatting.YELLOW, 32); + this.addSimpleIcoText(Ico.SKULL, "Crypts:", Formatting.YELLOW, 33); + } else { + this.addSimpleIcoText(Ico.CHEST, "Secrets:", Formatting.YELLOW, 31); + this.addSimpleIcoText(Ico.SKULL, "Crypts:", Formatting.YELLOW, 32); + } } - } -- cgit From 20117e764d3a4f444efd06c846449395caac20aa Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:42:58 -0500 Subject: Support the local memory cache for the API (#558) --- src/main/java/de/hysky/skyblocker/utils/Http.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/utils/Http.java b/src/main/java/de/hysky/skyblocker/utils/Http.java index 17079d15..58deced2 100644 --- a/src/main/java/de/hysky/skyblocker/utils/Http.java +++ b/src/main/java/de/hysky/skyblocker/utils/Http.java @@ -53,7 +53,7 @@ public class Http { String body = new String(decodedInputStream.readAllBytes()); HttpHeaders headers = response.headers(); - return new ApiResponse(body, response.statusCode(), getCacheStatus(headers), getAge(headers)); + return new ApiResponse(body, response.statusCode(), getCacheStatuses(headers), getAge(headers)); } public static HttpHeaders sendHeadRequest(String url) throws IOException, InterruptedException { @@ -115,12 +115,12 @@ public class Http { } /** - * Returns the cache status of the resource + * Returns the cache statuses of the resource. All possible cache status values conform to Cloudflare's. * - * @see Cloudflare Cache Docs + * @see Cloudflare Cache Docs */ - private static String getCacheStatus(HttpHeaders headers) { - return headers.firstValue("CF-Cache-Status").orElse("UNKNOWN"); + private static String[] getCacheStatuses(HttpHeaders headers) { + return new String[] { headers.firstValue("CF-Cache-Status").orElse("UNKNOWN"), headers.firstValue("Local-Cache-Status").orElse("UNKNOWN") }; } private static int getAge(HttpHeaders headers) { @@ -128,7 +128,7 @@ public class Http { } //TODO If ever needed, we could just replace cache status with the response headers and go from there - public record ApiResponse(String content, int statusCode, String cacheStatus, int age) implements AutoCloseable { + public record ApiResponse(String content, int statusCode, String[] cacheStatuses, int age) implements AutoCloseable { public boolean ok() { return statusCode == 200; @@ -139,7 +139,7 @@ public class Http { } public boolean cached() { - return cacheStatus.equals("HIT"); + return cacheStatuses[0].equals("HIT") || cacheStatuses[1].equals("HIT"); } @Override -- cgit From 5bfe95f71d5265efd680dbc3c19c94dc0485e343 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 20:11:43 +0100 Subject: add keybinding and identifier --- .../hysky/skyblocker/mixin/HandledScreenMixin.java | 22 +++++++++++-- .../de/hysky/skyblocker/mixin/InGameHudMixin.java | 12 ++++++++ .../skyblocker/mixin/MinecraftClientMixin.java | 2 ++ .../skyblocker/skyblock/item/ItemProtection.java | 34 +++++++++++++++++++++ .../resources/assets/skyblocker/lang/en_us.json | 1 + .../skyblocker/textures/gui/item_protection.png | Bin 0 -> 235 bytes 6 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/skyblocker/textures/gui/item_protection.png diff --git a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java index 8a1af570..0c779ebe 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java @@ -1,6 +1,7 @@ package de.hysky.skyblocker.mixin; import com.llamalad7.mixinextras.sugar.Local; +import com.mojang.blaze3d.systems.RenderSystem; import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.experiment.ChronomatronSolver; @@ -29,6 +30,7 @@ import net.minecraft.screen.ScreenHandler; import net.minecraft.screen.slot.Slot; import net.minecraft.screen.slot.SlotActionType; import net.minecraft.text.Text; +import net.minecraft.util.Identifier; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Final; @@ -52,6 +54,9 @@ public abstract class HandledScreenMixin extends Screen @Unique private static final int OUT_OF_BOUNDS_SLOT = -999; + @Unique + private static final Identifier ITEM_PROTECTION = new Identifier(SkyblockerMod.NAMESPACE, "textures/gui/item_protection.png"); + @Shadow @Nullable protected Slot focusedSlot; @@ -66,8 +71,15 @@ public abstract class HandledScreenMixin extends Screen @Inject(at = @At("HEAD"), method = "keyPressed") public void skyblocker$keyPressed(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable cir) { - if (this.client != null && this.focusedSlot != null && keyCode != 256 && !this.client.options.inventoryKey.matchesKey(keyCode, scanCode) && WikiLookup.wikiLookup.matchesKey(keyCode, scanCode)) { - WikiLookup.openWiki(this.focusedSlot, client.player); + if (this.client != null && this.focusedSlot != null && keyCode != 256) { + //wiki lookup + if (!this.client.options.inventoryKey.matchesKey(keyCode, scanCode) && WikiLookup.wikiLookup.matchesKey(keyCode, scanCode)) { + WikiLookup.openWiki(this.focusedSlot, client.player); + } + //item protection + if (!this.client.options.inventoryKey.matchesKey(keyCode, scanCode) && ItemProtection.itemProtection.matchesKey(keyCode, scanCode)) { + ItemProtection.handleKeyPressed(this.focusedSlot.getStack()); + } } } @@ -207,5 +219,11 @@ public abstract class HandledScreenMixin extends Screen private void skyblocker$drawItemRarityBackground(DrawContext context, Slot slot, CallbackInfo ci) { if (Utils.isOnSkyblock() && SkyblockerConfigManager.get().general.itemInfoDisplay.itemRarityBackgrounds) ItemRarityBackgrounds.tryDraw(slot.getStack(), context, slot.x, slot.y); + // Item protection + if (ItemProtection.isItemProtected(slot.getStack())){ + RenderSystem.enableBlend(); + context.drawTexture(ITEM_PROTECTION, slot.x, slot.y, 0, 0, 16, 16, 16, 16); + RenderSystem.disableBlend(); + } } } diff --git a/src/main/java/de/hysky/skyblocker/mixin/InGameHudMixin.java b/src/main/java/de/hysky/skyblocker/mixin/InGameHudMixin.java index 88be60cd..5e3daf3c 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/InGameHudMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/InGameHudMixin.java @@ -3,6 +3,7 @@ package de.hysky.skyblocker.mixin; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.sugar.Local; import com.mojang.blaze3d.systems.RenderSystem; +import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.FancyStatusBars; import de.hysky.skyblocker.skyblock.dungeon.DungeonMap; @@ -10,6 +11,7 @@ import de.hysky.skyblocker.skyblock.dungeon.DungeonScore; import de.hysky.skyblocker.skyblock.dungeon.DungeonScoreHUD; import de.hysky.skyblocker.skyblock.item.HotbarSlotLock; import de.hysky.skyblocker.skyblock.item.ItemCooldowns; +import de.hysky.skyblocker.skyblock.item.ItemProtection; import de.hysky.skyblocker.skyblock.item.ItemRarityBackgrounds; import de.hysky.skyblocker.utils.Utils; import net.fabricmc.api.EnvType; @@ -38,6 +40,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public abstract class InGameHudMixin { @Unique private static final Supplier SLOT_LOCK_ICON = () -> SkyblockerConfigManager.get().general.itemProtection.slotLockStyle.tex; + + @Unique + private static final Identifier ITEM_PROTECTION = new Identifier(SkyblockerMod.NAMESPACE, "textures/gui/item_protection.png"); @Unique private static final Pattern DICER_TITLE_BLACKLIST = Pattern.compile(".+? DROP!"); @@ -56,12 +61,19 @@ public abstract class InGameHudMixin { @Inject(method = "renderHotbar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;renderHotbarItem(Lnet/minecraft/client/gui/DrawContext;IIFLnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;I)V", ordinal = 0)) public void skyblocker$renderHotbarItemLockOrRarityBg(float tickDelta, DrawContext context, CallbackInfo ci, @Local(ordinal = 4, name = "m") int index, @Local(ordinal = 5, name = "n") int x, @Local(ordinal = 6, name = "o") int y, @Local PlayerEntity player) { if (Utils.isOnSkyblock()) { + // slot lock if (SkyblockerConfigManager.get().general.itemInfoDisplay.itemRarityBackgrounds) ItemRarityBackgrounds.tryDraw(player.getInventory().main.get(index), context, x, y); if (HotbarSlotLock.isLocked(index)) { RenderSystem.enableBlend(); context.drawTexture(SLOT_LOCK_ICON.get(), x, y, 0, 0, 16, 16, 16, 16); RenderSystem.disableBlend(); } + //item protection + if (ItemProtection.isItemProtected(player.getInventory().main.get(index))){ + RenderSystem.enableBlend(); + context.drawTexture(ITEM_PROTECTION, x, y, 0, 0, 16, 16, 16, 16); + RenderSystem.disableBlend(); + } } } diff --git a/src/main/java/de/hysky/skyblocker/mixin/MinecraftClientMixin.java b/src/main/java/de/hysky/skyblocker/mixin/MinecraftClientMixin.java index cf8aab78..dd671b2e 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/MinecraftClientMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/MinecraftClientMixin.java @@ -1,6 +1,7 @@ package de.hysky.skyblocker.mixin; import de.hysky.skyblocker.skyblock.item.HotbarSlotLock; +import de.hysky.skyblocker.skyblock.item.ItemProtection; import de.hysky.skyblocker.utils.JoinWorldPlaceholderScreen; import de.hysky.skyblocker.utils.ReconfiguringPlaceholderScreen; import de.hysky.skyblocker.utils.Utils; @@ -34,6 +35,7 @@ public abstract class MinecraftClientMixin { public void skyblocker$handleInputEvents(CallbackInfo ci) { if (Utils.isOnSkyblock()) { HotbarSlotLock.handleInputEvents(player); + ItemProtection.handleHotbarKeyPressed(player); } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java b/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java index 2d929c28..5fc0fed5 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java @@ -10,13 +10,23 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; +import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.client.option.KeyBinding; import net.minecraft.command.CommandRegistryAccess; import net.minecraft.item.ItemStack; import net.minecraft.text.Text; +import org.lwjgl.glfw.GLFW; public class ItemProtection { + public static KeyBinding itemProtection; public static void init() { + itemProtection = KeyBindingHelper.registerKeyBinding(new KeyBinding( + "key.itemProtection", + GLFW.GLFW_KEY_V, + "key.categories.skyblocker" + )); ClientCommandRegistrationCallback.EVENT.register(ItemProtection::registerCommand); } @@ -61,4 +71,28 @@ public class ItemProtection { return Command.SINGLE_SUCCESS; } + + public static void handleKeyPressed(ItemStack heldItem) { + if (!Utils.isOnSkyblock() || heldItem.isEmpty()) return; + + String itemUuid = ItemUtils.getItemUuid(heldItem); + if (!itemUuid.isEmpty()) { + ObjectOpenHashSet protectedItems = SkyblockerConfigManager.get().general.protectedItems; + + if (!protectedItems.contains(itemUuid)) { + protectedItems.add(itemUuid); + SkyblockerConfigManager.save(); + } else { + protectedItems.remove(itemUuid); + SkyblockerConfigManager.save(); + } + } + } + + public static void handleHotbarKeyPressed(ClientPlayerEntity player) { + while (itemProtection.wasPressed()) { + ItemStack heldItem = player.getMainHandStack(); + handleKeyPressed(heldItem); + } + } } diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 60631ef1..508accb2 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -5,6 +5,7 @@ "key.skyblocker.defaultTgl": "Switch tab HUD to default view", "key.skyblocker.toggleA": "Toggle tab HUD to screen A", "key.wikiLookup": "Wiki Lookup", + "key.itemProtection": "protect Item", "text.skyblocker.open": "Open", "text.skyblocker.quit_config": "Changes Not Saved", diff --git a/src/main/resources/assets/skyblocker/textures/gui/item_protection.png b/src/main/resources/assets/skyblocker/textures/gui/item_protection.png new file mode 100644 index 00000000..b76fe034 Binary files /dev/null and b/src/main/resources/assets/skyblocker/textures/gui/item_protection.png differ -- cgit From 9d37d533dca5e3d7be5758694d4b1360026c18eb Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 20:15:02 +0100 Subject: move visitor helper to location garden --- src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java | 6 +++--- .../de/hysky/skyblocker/config/categories/GeneralCategory.java | 7 ------- .../de/hysky/skyblocker/config/categories/LocationsCategory.java | 7 +++++++ src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 78458291..effd9e07 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -177,9 +177,6 @@ public class SkyblockerConfig { @SerialEntry public boolean dungeonQuality = true; - @SerialEntry - public boolean visitorHelper = true; - @SerialEntry public TabHudConf tabHud = new TabHudConf(); @@ -1091,6 +1088,9 @@ public class SkyblockerConfig { public static class Garden { @SerialEntry public boolean dicerTitlePrevent = true; + + @SerialEntry + public boolean visitorHelper = true; } public static class Slayer { diff --git a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java index 8a7d832c..1e2f8063 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -86,13 +86,6 @@ public class GeneralCategory { newValue -> config.general.dungeonQuality = newValue) .controller(ConfigUtils::createBooleanController) .build()) - .option(Option.createBuilder() - .name(Text.translatable("text.autoconfig.skyblocker.option.general.visitorHelper")) - .binding(defaults.general.visitorHelper, - () -> config.general.visitorHelper, - newValue -> config.general.visitorHelper = newValue) - .controller(ConfigUtils::createBooleanController) - .build()) //Tab Hud .group(OptionGroup.createBuilder() diff --git a/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java index 75c83a9b..d97513f8 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java @@ -153,6 +153,13 @@ public class LocationsCategory { newValue -> config.locations.garden.dicerTitlePrevent = newValue) .controller(ConfigUtils::createBooleanController) .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.visitorHelper")) + .binding(defaults.locations.garden.visitorHelper, + () -> config.locations.garden.visitorHelper, + newValue -> config.locations.garden.visitorHelper = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) .build()) .build(); } diff --git a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java index 8a1af570..123bbc0a 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java @@ -75,13 +75,13 @@ public abstract class HandledScreenMixin extends Screen public void skyblocker$renderScreen(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) { if (!Utils.isOnSkyblock()) return; - if (SkyblockerConfigManager.get().general.visitorHelper && (Utils.getLocationRaw().equals("garden") && !getTitle().getString().contains("Logbook") || getTitle().getString().startsWith("Bazaar"))) + if (SkyblockerConfigManager.get().locations.garden.visitorHelper && (Utils.getLocationRaw().equals("garden") && !getTitle().getString().contains("Logbook") || getTitle().getString().startsWith("Bazaar"))) VisitorHelper.renderScreen(this.getTitle().getString(), context, textRenderer, handler, mouseX, mouseY); } @Inject(at = @At("HEAD"), method = "mouseClicked") public void skyblocker$mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable cir) { - if (SkyblockerConfigManager.get().general.visitorHelper && (Utils.getLocationRaw().equals("garden") && !getTitle().getString().contains("Logbook") || getTitle().getString().startsWith("Bazaar"))) + if (SkyblockerConfigManager.get().locations.garden.visitorHelper && (Utils.getLocationRaw().equals("garden") && !getTitle().getString().contains("Logbook") || getTitle().getString().startsWith("Bazaar"))) VisitorHelper.onMouseClicked(mouseX, mouseY, button, this.textRenderer); } -- cgit From f94031b5e52a5e7dbf164ff3367288e02f4f3bde Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 20:15:34 +0100 Subject: rename npc price to npc sell price --- .../java/de/hysky/skyblocker/skyblock/item/tooltip/ItemTooltip.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/ItemTooltip.java b/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/ItemTooltip.java index d5be7eee..fbef1bcb 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/ItemTooltip.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/ItemTooltip.java @@ -51,7 +51,7 @@ public class ItemTooltip { boolean bazaarOpened = lines.stream().anyMatch(each -> each.getString().contains("Buy price:") || each.getString().contains("Sell price:")); if (TooltipInfoType.NPC.isTooltipEnabledAndHasOrNullWarning(internalID)) { - lines.add(Text.literal(String.format("%-21s", "NPC Price:")) + lines.add(Text.literal(String.format("%-21s", "NPC Sell Price:")) .formatted(Formatting.YELLOW) .append(getCoinsMessage(TooltipInfoType.NPC.getData().get(internalID).getAsDouble(), count))); } -- cgit From a19c612eb2c07b70110c31e385823cf28cbea255 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 20:18:17 +0100 Subject: made flame height/opacity easier to understand --- src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java | 4 ++-- .../de/hysky/skyblocker/config/categories/GeneralCategory.java | 10 ++++++---- .../de/hysky/skyblocker/mixin/InGameOverlayRendererMixin.java | 4 ++-- src/main/resources/assets/skyblocker/lang/en_us.json | 2 ++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index effd9e07..78605c00 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -465,10 +465,10 @@ public class SkyblockerConfig { public static class FlameOverlay { @SerialEntry - public float flameHeight = 0f; + public int flameHeight = 100; @SerialEntry - public float flameOpacity = 0f; + public int flameOpacity = 100; } public static class SearchOverlay { diff --git a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java index 1e2f8063..afd688d8 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -635,19 +635,21 @@ public class GeneralCategory { .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.flameOverlay")) .collapsed(true) - .option(Option.createBuilder() + .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.flameOverlay.flameHeight")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.flameOverlay.flameHeight.@Tooltip"))) .binding(defaults.general.flameOverlay.flameHeight, () -> config.general.flameOverlay.flameHeight, newValue -> config.general.flameOverlay.flameHeight = newValue) - .controller(opt -> FloatSliderControllerBuilder.create(opt).range(0.0f, 0.5f).step(0.01f)) + .controller(opt -> IntegerSliderControllerBuilder.create(opt).range(0, 100).step(1)) .build()) - .option(Option.createBuilder() + .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.flameOverlay.flameOpacity")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.flameOverlay.flameOpacity.@Tooltip"))) .binding(defaults.general.flameOverlay.flameOpacity, () -> config.general.flameOverlay.flameOpacity, newValue -> config.general.flameOverlay.flameOpacity = newValue) - .controller(opt -> FloatSliderControllerBuilder.create(opt).range(0.0f, 0.8f).step(0.1f)) + .controller(opt -> IntegerSliderControllerBuilder.create(opt).range(0, 100).step(1)) .build()) .build()) diff --git a/src/main/java/de/hysky/skyblocker/mixin/InGameOverlayRendererMixin.java b/src/main/java/de/hysky/skyblocker/mixin/InGameOverlayRendererMixin.java index b957603a..4775ce2d 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/InGameOverlayRendererMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/InGameOverlayRendererMixin.java @@ -11,12 +11,12 @@ public class InGameOverlayRendererMixin { @ModifyArg(method = "renderFireOverlay", index = 2, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/BufferBuilder;vertex(Lorg/joml/Matrix4f;FFF)Lnet/minecraft/client/render/VertexConsumer;")) private static float configureFlameHeight(float y) { - return y - SkyblockerConfigManager.get().general.flameOverlay.flameHeight; + return y - (0.5f - ((float) SkyblockerConfigManager.get().general.flameOverlay.flameHeight / 200.0f)); } @ModifyArg(method = "renderFireOverlay", index = 3, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/VertexConsumer;color(FFFF)Lnet/minecraft/client/render/VertexConsumer;")) private static float configureFlameOpacity(float opacity) { - return opacity - SkyblockerConfigManager.get().general.flameOverlay.flameOpacity; + return opacity - (0.8f - ((float) SkyblockerConfigManager.get().general.flameOverlay.flameOpacity / 125.0f)); } } diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 60631ef1..dc3d6911 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -132,7 +132,9 @@ "text.autoconfig.skyblocker.option.general.teleportOverlay.enableWitherImpact": "Enable Wither Impact Overlay", "text.autoconfig.skyblocker.option.general.flameOverlay": "Flame Overlay", "text.autoconfig.skyblocker.option.general.flameOverlay.flameHeight": "Flame Height", + "text.autoconfig.skyblocker.option.general.flameOverlay.flameHeight.@Tooltip": "100% default height\n0% off", "text.autoconfig.skyblocker.option.general.flameOverlay.flameOpacity": "Flame Opacity", + "text.autoconfig.skyblocker.option.general.flameOverlay.flameOpacity.@Tooltip": "100% default opacity\n0% off", "text.autoconfig.skyblocker.option.general.searchOverlay": "Search Overlay", "text.autoconfig.skyblocker.option.general.searchOverlay.enableBazaar": "Enable For Bazaar", "text.autoconfig.skyblocker.option.general.searchOverlay.enableBazaar.@Tooltip": "Show custom search overlay when searching in bazaar.", -- cgit From da44f96472797762f162bf477285b693ef70c175 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 20:18:55 +0100 Subject: made some menu elements not clickable --- .../hysky/skyblocker/mixin/HandledScreenMixin.java | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java index 123bbc0a..77141688 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java @@ -42,6 +42,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.util.Map; +import java.util.Set; import java.util.regex.Matcher; @Mixin(HandledScreen.class) @@ -167,6 +168,37 @@ public abstract class HandledScreenMixin extends Screen } if (slot != null) { + // Prevent some menu items from dragging and dropping + String itemName = slot.getStack().getName().getString(); + if (SkyblockerConfigManager.get().general.hideEmptyTooltips) { + Set blockedItemPatterns = Set.of( + " ", // Empty menu item + "Locked Page", + "Quick Crafting Slot", + "Locked Backpack Slot 2", //Regular expressions won't be utilized here since the search by contains is based on plain text rather than regex syntax + "Locked Backpack Slot 3", + "Locked Backpack Slot 4", + "Locked Backpack Slot 5", + "Locked Backpack Slot 6", + "Locked Backpack Slot 7", + "Locked Backpack Slot 8", + "Locked Backpack Slot 9", + "Locked Backpack Slot 10", + "Locked Backpack Slot 11", + "Locked Backpack Slot 12", + "Locked Backpack Slot 13", + "Locked Backpack Slot 14", + "Locked Backpack Slot 15", + "Locked Backpack Slot 16", + "Locked Backpack Slot 17", + "Locked Backpack Slot 18", + "Preparing" + ); + if (blockedItemPatterns.contains(itemName)) { + ci.cancel(); + } + } + // When you click your drop key while hovering over an item if (actionType == SlotActionType.THROW) { ItemStack stack = slot.getStack(); -- cgit From 4833d3494a47fba7c6f040a1d1f398877f351afe Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 22:33:27 +0100 Subject: update --- CHANGELOG.md | 76 +++++++++++++++++++++++++++++++++++++++ FEATURES.md | 105 ++++++++++++++++++++++++++++++++++++------------------ README.md | 68 ++++++++++++++++++++++++++--------- gradle.properties | 2 +- 4 files changed, 200 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b05e805..19e396b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,79 @@ +# Release 1.18.0 + +## Highlight +* **New Dungeon Solvers**: + * Silverfish Solvers by @kevinthegreat1 + * Ice Fill Solvers by @kevinthegreat1 + * Boulder Solver by @LifeIsAParadox +* **Crystal Hollows Feature**: + * Crystal Hollows Map by @olim88 and @AzureAaron + * Waypoints for special locations by @olim88 and @AzureAaron + * Powder HUD by @olim88 and @AzureAaron + * Mithril + * Gemstone +* **Kuudra Features** by @AzureAaron + * Kuudra waypoints + * No arrow poison warning + * Low arrow poison warning +* **Search overlays for bz and ah** by @olim88 +* **End HUD Widget** by @viciscat + * Zealots + * *Since last eye* + * *Total zealots kills* + * *Avg kills per eye* + * Endstone Protector + * *stage* + * *Location* +* **Garden Features**: + * Visitor helper by @esteban4567890 + * easy way to buy items that visitors require from bazaar by clicking the text + * Disable title and chat messages for Melon/Pumpkin Dicer by @Ghost-3 +* **Improve Item Protection feature** by @LifeIsAParadox + * protect item with shortcut "v" + * indicator in form of a star + +## What's Changed +* Nothing to see here by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/526 +* Crystal hollows fetures by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/523 +* Beacon Highlighter performance fix + Fix fire sales widget by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/521 +* Fix chest value not getting price data under certain circumstances by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/522 +* Update mayor cache every 20 minutes by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/525 +* Update IF conflict by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/529 +* Remove 1.20.2 from version selection menu in issue templates by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/530 +* Add the missing starter commission to the Dwarven HUD. by @Kaluub in https://github.com/SkyblockerMod/Skyblocker/pull/532 +* Kuudra Features by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/519 +* Disable title and chat messages for Melon/Pumpkin Dicer by @Ghost-3 in https://github.com/SkyblockerMod/Skyblocker/pull/534 +* Add Visitor helper by @esteban4567890 in https://github.com/SkyblockerMod/Skyblocker/pull/535 +* Search overlays for bz and ah by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/537 +* Add End HUD Widget by @viciscat in https://github.com/SkyblockerMod/Skyblocker/pull/524 +* Boulder Solver by @LifeIsAParadox in https://github.com/SkyblockerMod/Skyblocker/pull/540 +* Item Quality (dungeon drops) by @Fluboxer in https://github.com/SkyblockerMod/Skyblocker/pull/541 +* Treasure Hoarder Puncher Commission fix by @Ghost-3 in https://github.com/SkyblockerMod/Skyblocker/pull/542 +* center table components in tabhud by @btwonion in https://github.com/SkyblockerMod/Skyblocker/pull/543 +* Check all door blocks and fix fairy room door by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/536 +* Show the diff in the Powders widget by @Ghost-3 in https://github.com/SkyblockerMod/Skyblocker/pull/544 +* Add Item Floor Tier to tooltip by @Fluboxer in https://github.com/SkyblockerMod/Skyblocker/pull/546 +* Better location management by @Ghost-3 in https://github.com/SkyblockerMod/Skyblocker/pull/547 +* Small search overlay changes by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/548 +* Fix powder hud not updating when commissions hud is disabled by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/550 +* Improve secrets caching behaviour by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/545 +* Spider's Den Server Widget by @Ghost-3 in https://github.com/SkyblockerMod/Skyblocker/pull/553 +* Fix beacon highlights persisting after the boss dies by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/554 +* use mod-publish-plugin by @LifeIsAParadox in https://github.com/SkyblockerMod/Skyblocker/pull/556 +* Add Silverfish and Ice Fill Solvers by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/533 +* Fix discoveries index by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/557 +* Support the local memory cache for the API by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/558 +* 4 small changes by @LifeIsAParadox in https://github.com/SkyblockerMod/Skyblocker/pull/561 +* Improve Item Protection feature by @LifeIsAParadox in https://github.com/SkyblockerMod/Skyblocker/pull/562 + +## New Contributors +* @olim88 made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/523 +* @Ghost-3 made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/534 +* @esteban4567890 made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/535 +* @Fluboxer made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/541 + +**Full Changelog**: https://github.com/SkyblockerMod/Skyblocker/compare/v1.17.0...v1.18.0 +___ # Release 1.17.0 ## Highlight diff --git a/FEATURES.md b/FEATURES.md index b442a56f..ac063b53 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -5,16 +5,19 @@ - **Starred Mob Glow** - **Croesus Helper** - **Puzzle Solver:** - - *Three Weirdos* - - *Blaze* - - *Creeper Beams* - - *Quiz - Ouro the Omniscient* - - *Tic Tac Toe* - - *Waterboard* - - *Terminal:* - - *Order* - - *Coloured Items* - - *Item Name* + - *Three Weirdos* + - *Blaze* + - *Creeper Beams* + - *Quiz - Ouro the Omniscient* + - *Tic Tac Toe* + - *Waterboard* + - *Silverfish* + - *Ice Fill* + - *Boulder* + - Terminal: + - *Order* + - *Coloured Items* + - *Item Name* - **Rare Drop Special Effects** - **Chest Profit Calculator** - **F3/M3 Fire Freeze Staff Timer** @@ -27,6 +30,16 @@ - **resourcepack recoloring textures in dungeons** - **score title and sound** +### Kuudra Features +- **Kuudra waypoints** + - *Supplies* + - *Supply Piles* + - *Fuel Cells* + - *Safe Spots* + - *Pearl* +- **No arrow poison warning** +- **Low arrow poison warning** + ### Item and Armor Customization: - *Item Renaming* - *Custom Armor Dye Colors* @@ -34,17 +47,25 @@ ### Health and Status Bars: - **Bars:** - - *Health and absorption* - - *Mana* - - *Defense* - - *XP* + - *Health and absorption* + - *Mana* + - *Defense* + - *XP* -### Dwarven Mines: +### Dwarven Mines / Crystal hollows: - **Dwarven Mines Solver:** - - *Fetchur* - - *Puzzler* + - Fetchur + - Puzzler +- **Crystal hollows** + - Crystal Hollows Map + - *Shows players location in crystal hollows* + - *Shows important waypoints in crystal hollows* + - Crystal Hollows Waypoints + - *show waypoints for special location* + - *find locations in chat messages* - **Commission HUD** - - *Provides information on Dwarven Mines quests* + - *Provides information on Dwarven Mines quests* +- **Powder HUD** ### Rift Features: - **Mirrorverse Waypoints** @@ -64,6 +85,11 @@ - Beacon Highlighting - Nukekubi Head Highlighting +### Garden Features: +- **Visitor Helper** + - buy items that visitors require from bazaar by clicking the text +- **Disable title and chat messages for Melon/Pumpkin Dicer** + ### Visual Enhancements: - **Fancy Tab HUD:** Fully configurable with a resource pack. - **1.8 Hitbox for Lever and Farmland** @@ -74,37 +100,48 @@ - Circle or Square - **Item Cooldown Display** - **Configure Fire-Overlay Height** +- **End HUD Widget** + - Zealots + - *Since last eye* + - *Total zealots kills* + - *Avg kills per eye* + - Endstone Protector + - *stage* + - *Location* ### User Interface Enhancements: +- **Search overlays for bz and ah** - **Attribute Shard Info Display** - **Drill Fuel and Pickonimbus 2000 in Item Durability Bar** - **Hotbar Slot Lock Keybind:** Select the hotbar slot you want to lock/unlock and press the lock button. - **Item Tooltip:** (Provides information on) - - *NPC Prices* - - *Motes Prices* - - *bazaar (average, lowest bin)* - - *Auction House* - - *Museum* - - *Exotic Armor Identifier* + - *NPC Sell Prices* + - *Motes Prices* + - *bazaar (average, lowest bin)* + - *Auction House* + - *Museum* + - *Exotic Armor Identifier* + - *Item Quality* + - ** - **Quicknav:** (Fully customizeable) Fast navigation between pets, armor, enderchest, skill, collection, crafting, enchant, anvil, warp dungeon, and warp hub. - **Recipe Book:** Lists all Skyblock items in the vanilla recipe book, allowing you to see the recipe of the item. - **Backpack Preview:** After clicking your backpack or enderchest once, you can hover over the backpack or enderchest and hold Shift to preview its contents. ### Barn Features: - **Barn Solver:** - - *Treasure Hunter* - - *Hungry Hiker* + - *Treasure Hunter* + - *Hungry Hiker* ### Chat Features: - **Hide Messages:** - - *Ability Cooldown* - - *Heal* - - *Aspect of the End (AOTE)* - - *Implosion* - - *Molten Wave* - - *`/show command`* - - *Teleport Pad Messages* - - *Sky Mall* + - *Ability Cooldown* + - *Heal* + - *Aspect of the End (AOTE)* + - *Implosion* + - *Molten Wave* + - *`/show command`* + - *Teleport Pad Messages* + - *Sky Mall* ### Miscellaneous Solvers: - **Experiments Solvers** diff --git a/README.md b/README.md index bee317ba..f4a358d2 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,10 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - *Quiz - Ouro the Omniscient* - *Tic Tac Toe* - *Waterboard* - - *Terminal:* + - *Silverfish* + - *Ice Fill* + - *Boulder* + - Terminal: - *Order* - *Coloured Items* - *Item Name* @@ -47,6 +50,16 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - **resourcepack recoloring textures in dungeons** - **score title and sound** +### Kuudra Features +- **Kuudra waypoints** + - *Supplies* + - *Supply Piles* + - *Fuel Cells* + - *Safe Spots* + - *Pearl* +- **No arrow poison warning** +- **Low arrow poison warning** + ### Item and Armor Customization: - *Item Renaming* - *Custom Armor Dye Colors* @@ -59,19 +72,20 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - *Defense* - *XP* -### Dwarven Mines: +### Dwarven Mines / Crystal hollows: - **Dwarven Mines Solver:** - - *Fetchur* - - *Puzzler* -- **Commission/Powder HUD** + - Fetchur + - Puzzler +- **Crystal hollows** + - Crystal Hollows Map + - *Shows players location in crystal hollows* + - *Shows important waypoints in crystal hollows* + - Crystal Hollows Waypoints + - *show waypoints for special location* + - *find locations in chat messages* +- **Commission HUD** - *Provides information on Dwarven Mines quests* - - *Provides information on powder amounts* -- **Crystal Hollows Waypoints** - - *show waypoints for special location* - - *find locations in chat messages* -- **Crystal Hollows Map HUD** - - *Shows players location in crystal hollows* - - *Shows important waypoints in crystal hollows* +- **Powder HUD** ### Rift Features: - **Mirrorverse Waypoints** @@ -91,6 +105,11 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - Beacon Highlighting - Nukekubi Head Highlighting +### Garden Features: +- **Visitor Helper** + - buy items that visitors require from bazaar by clicking the text +- **Disable title and chat messages for Melon/Pumpkin Dicer** + ### Visual Enhancements: - **Fancy Tab HUD:** Fully configurable with a resource pack. - **1.8 Hitbox for Lever and Farmland** @@ -101,18 +120,29 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - Circle or Square - **Item Cooldown Display** - **Configure Fire-Overlay Height** +- **End HUD Widget** + - Zealots + - *Since last eye* + - *Total zealots kills* + - *Avg kills per eye* + - Endstone Protector + - *stage* + - *Location* ### User Interface Enhancements: +- **Search overlays for bz and ah** - **Attribute Shard Info Display** - **Drill Fuel and Pickonimbus 2000 in Item Durability Bar** - **Hotbar Slot Lock Keybind:** Select the hotbar slot you want to lock/unlock and press the lock button. - **Item Tooltip:** (Provides information on) - - *NPC Prices* + - *NPC Sell Prices* - *Motes Prices* - *bazaar (average, lowest bin)* - *Auction House* - *Museum* - *Exotic Armor Identifier* + - *Item Quality* + - ** - **Quicknav:** (Fully customizeable) Fast navigation between pets, armor, enderchest, skill, collection, crafting, enchant, anvil, warp dungeon, and warp hub. - **Recipe Book:** Lists all Skyblock items in the vanilla recipe book, allowing you to see the recipe of the item. - **Backpack Preview:** After clicking your backpack or enderchest once, you can hover over the backpack or enderchest and hold Shift to preview its contents. @@ -223,9 +253,15 @@ information. |:--------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------:|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| | [Grayray75](https://github.com/Grayray75) | [alexiayaa](https://github.com/alexiayaa) | [KhafraDev](https://github.com/KhafraDev) | [btwonion](https://github.com/btwonion) | -| [KhafraDev](https://github.com/Kaluub) | [KhafraDev](https://github.com/Emirlol) | [KhafraDev](https://github.com/Thsgun) | -|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------| -| [Kaluub](https://github.com/Kaluub) | [Emirlol](https://github.com/Emirlol) | [Thsgun](https://github.com/Thsgun) | + +| [KhafraDev](https://github.com/Kaluub) | [KhafraDev](https://github.com/Emirlol) | [KhafraDev](https://github.com/LegendaryLilac) | [KhafraDev](https://github.com/olim88) | +|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| [Kaluub](https://github.com/Kaluub) | [Emirlol](https://github.com/Emirlol) | [LegendaryLilac](https://github.com/LegendaryLilac) | [olim88](https://github.com/olim88) | + +| [Ghost-3](https://github.com/Ghost-3) | [esteban4567890](https://github.com/esteban4567890) | [Fluboxer](https://github.com/Fluboxer) | +|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| +| [Ghost-3](https://github.com/Ghost-3) | [esteban4567890](https://github.com/esteban4567890) | [Fluboxer](https://github.com/Fluboxer) | + ### Translators diff --git a/gradle.properties b/gradle.properties index 07340c99..6cf73016 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,7 +34,7 @@ jgit_version = 6.8.0.202311291450-r commons_math_version = 3.6.1 # Mod Properties -mod_version = 1.17.0 +mod_version = 1.18.0 maven_group = de.hysky archives_base_name = skyblocker modrinth_id=y6DuFGwJ -- cgit From 95df6036645c6aa19f769d7dc8f1a3cc16916bfe Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 22:39:24 +0100 Subject: capitalized "protect" --- src/main/resources/assets/skyblocker/lang/en_us.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 508accb2..63c8163a 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -5,7 +5,7 @@ "key.skyblocker.defaultTgl": "Switch tab HUD to default view", "key.skyblocker.toggleA": "Toggle tab HUD to screen A", "key.wikiLookup": "Wiki Lookup", - "key.itemProtection": "protect Item", + "key.itemProtection": "Protect Item", "text.skyblocker.open": "Open", "text.skyblocker.quit_config": "Changes Not Saved", -- cgit From 6885e1affbc71c703cf6195182c7ee4053603683 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 23:24:00 +0100 Subject: Update ItemProtection.java --- .../skyblocker/skyblock/item/ItemProtection.java | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java b/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java index 5fc0fed5..7e04652c 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/ItemProtection.java @@ -11,9 +11,11 @@ import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; +import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; import net.minecraft.command.CommandRegistryAccess; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.text.Text; import org.lwjgl.glfw.GLFW; @@ -73,7 +75,19 @@ public class ItemProtection { } public static void handleKeyPressed(ItemStack heldItem) { - if (!Utils.isOnSkyblock() || heldItem.isEmpty()) return; + PlayerEntity playerEntity = MinecraftClient.getInstance().player; + if (playerEntity == null){ + return; + } + if (!Utils.isOnSkyblock()) { + playerEntity.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.itemProtection.unableToProtect"))); + return; + } + + if (heldItem.isEmpty()) { + playerEntity.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.itemProtection.noItemUuid"))); + return; + } String itemUuid = ItemUtils.getItemUuid(heldItem); if (!itemUuid.isEmpty()) { @@ -82,10 +96,16 @@ public class ItemProtection { if (!protectedItems.contains(itemUuid)) { protectedItems.add(itemUuid); SkyblockerConfigManager.save(); + + playerEntity.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.itemProtection.added", heldItem.getName()))); } else { protectedItems.remove(itemUuid); SkyblockerConfigManager.save(); + + playerEntity.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.itemProtection.removed", heldItem.getName()))); } + } else { + playerEntity.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.itemProtection.noItemUuid"))); } } -- cgit From 17dfa6502a6f1031ef60d7e39930aeac58c7ba46 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 23:29:25 +0100 Subject: consistent casing --- FEATURES.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FEATURES.md b/FEATURES.md index ac063b53..987c4fd9 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -52,17 +52,17 @@ - *Defense* - *XP* -### Dwarven Mines / Crystal hollows: +### Dwarven Mines / Crystal Hollows: - **Dwarven Mines Solver:** - Fetchur - Puzzler -- **Crystal hollows** +- **Crystal Hollows** - Crystal Hollows Map - - *Shows players location in crystal hollows* - - *Shows important waypoints in crystal hollows* + - *Shows players location in Crystal Hollows* + - *Highlights important waypoints in Crystal Hollows* - Crystal Hollows Waypoints - - *show waypoints for special location* - - *find locations in chat messages* + - *Shows waypoints for special locations* + - *Find locations in chat messages* - **Commission HUD** - *Provides information on Dwarven Mines quests* - **Powder HUD** -- cgit From 43adc93fb620c6fa224b411feee9f7b177d2d151 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 20 Feb 2024 23:31:25 +0100 Subject: Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f4a358d2..5e9cee0f 100644 --- a/README.md +++ b/README.md @@ -72,17 +72,17 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - *Defense* - *XP* -### Dwarven Mines / Crystal hollows: +### Dwarven Mines / Crystal Hollows: - **Dwarven Mines Solver:** - Fetchur - Puzzler -- **Crystal hollows** +- **Crystal Hollows** - Crystal Hollows Map - - *Shows players location in crystal hollows* - - *Shows important waypoints in crystal hollows* + - *Shows players location in Crystal Hollows* + - *Highlights important waypoints in Crystal Hollows* - Crystal Hollows Waypoints - - *show waypoints for special location* - - *find locations in chat messages* + - *Shows waypoints for special locations* + - *Find locations in chat messages* - **Commission HUD** - *Provides information on Dwarven Mines quests* - **Powder HUD** -- cgit From 12f790b5c21c6ffc96f76d326ecb221cd11355d4 Mon Sep 17 00:00:00 2001 From: PumpkinXD Date: Thu, 25 Jan 2024 18:08:21 +0000 Subject: Translated using Weblate (Chinese (Simplified)) Currently translated at 41.9% (182 of 434 strings) Translation: Skyblocker/Skyblocker Translate-URL: https://translate.hysky.de/projects/Skyblocker/skyblocker/zh_Hans/ --- .../resources/assets/skyblocker/lang/zh_cn.json | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/skyblocker/lang/zh_cn.json b/src/main/resources/assets/skyblocker/lang/zh_cn.json index 4d058bf1..0c7b6f0c 100644 --- a/src/main/resources/assets/skyblocker/lang/zh_cn.json +++ b/src/main/resources/assets/skyblocker/lang/zh_cn.json @@ -157,5 +157,32 @@ "text.autoconfig.skyblocker.option.general.waypoints.waypointType": "路径点类型", "text.skyblocker.open": "开启", "text.autoconfig.skyblocker.option.general.wikiLookup.enableWikiLookup": "启用 wiki 查阅功能", - "text.autoconfig.skyblocker.option.general.wikiLookup.enableWikiLookup.@Tooltip": "指针悬停于物品之下按 F4 键打开 wiki 相关条目" + "text.autoconfig.skyblocker.option.general.wikiLookup.enableWikiLookup.@Tooltip": "指针悬停于物品之下按 F4 键打开 wiki 相关条目", + "text.autoconfig.skyblocker.option.general.mythologicalRitual": "神话仪式助手", + "text.autoconfig.skyblocker.option.general.mythologicalRitual.enableMythologicalRitualHelper": "开启神话仪式助手", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enablePearlWaypoints": "启用珍珠路径点", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableAotvWaypoints": "启用瞬息之刃路径点", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableFairySoulWaypoints": "启用仙女之魂路径点", + "text.autoconfig.skyblocker.option.locations.spidersDen.relics": "遗物助手", + "text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableDungeonScoreMessage": "启用地牢 %d 分数提示信息", + "text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableDungeonScoreMessage.@Tooltip": "在地牢中达到 %d 分时发送提示信息", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableEntranceWaypoints": "启用入口路径点", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableChestWaypoints": "启用箱子路径点", + "text.autoconfig.skyblocker.option.general.itemCooldown": "物品冷却提示", + "text.autoconfig.skyblocker.option.general.itemCooldown.enableItemCooldowns": "启用物品冷却提示", + "text.autoconfig.skyblocker.option.general.specialEffects.rareDungeonDropEffects.@Tooltip": "为地牢稀有掉落添加特殊的视觉效果!", + "text.autoconfig.skyblocker.option.locations.spidersDen": "蜘蛛巢穴", + "text.autoconfig.skyblocker.option.locations.spidersDen.relics.enableRelicsHelper": "启用遗物助手", + "text.autoconfig.skyblocker.option.locations.spidersDen.relics.highlightFoundRelics": "高亮已发现的遗物", + "text.autoconfig.skyblocker.option.general.compactorDeletorPreview": "启用个人压缩器/删除器预览", + "text.autoconfig.skyblocker.option.general.itemInfoDisplay.itemRarityBackgrounds.@Tooltip": "将物品背景颜色改为其稀有度所对应的颜色", + "text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore": "地牢分数", + "skyblocker.wikiLookup.noArticleFound": "§r无法找到此物品的 wiki 相关条目...", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableWitherWaypoints": "启用凋灵精粹路径点", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableBatWaypoints": "启用蝙蝠路径点", + "text.autoconfig.skyblocker.option.general.betterPartyFinder": "更好的组队查找", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableRoomMatching.@Tooltip": "关闭此选项可节省约20MB左右的内存,但是秘密路径点和§l部分谜题助手功能§r需要启用该选项", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableItemWaypoints": "启用物品路径点", + "text.autoconfig.skyblocker.option.general.quiverWarning.enableQuiverWarningAfterDungeon": "在地牢结束后启用箭袋提示", + "text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints.enableLeverWaypoints": "启用拉杆路径点" } -- cgit From ac628bc10716619beba8f2360ccdf77971073ee8 Mon Sep 17 00:00:00 2001 From: viciscat Date: Tue, 30 Jan 2024 22:15:09 +0000 Subject: Translated using Weblate (French) Currently translated at 33.4% (145 of 434 strings) Translation: Skyblocker/Skyblocker Translate-URL: https://translate.hysky.de/projects/Skyblocker/skyblocker/fr/ --- .../resources/assets/skyblocker/lang/fr_fr.json | 40 ++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/skyblocker/lang/fr_fr.json b/src/main/resources/assets/skyblocker/lang/fr_fr.json index 7c71081f..8b2c8123 100644 --- a/src/main/resources/assets/skyblocker/lang/fr_fr.json +++ b/src/main/resources/assets/skyblocker/lang/fr_fr.json @@ -112,6 +112,42 @@ "key.skyblocker.toggleB": "Basculer l'onglet HUD vers l'écran B", "key.skyblocker.toggleA": "Basculer l'onglet HUD vers l'écran A", "text.autoconfig.skyblocker.option.general.shortcuts.enableShortcuts": "Activer les Raccourcis", - "text.autoconfig.skyblocker.option.general.shortcuts.enableShortcuts.@Tooltip": "Marche seulement sur Hypixel. Edite les raccourcis avec \"/skyblocker shortcuts\". Au moins une des options suivantes doit être activée pour que ceci prenne effet.", - "text.autoconfig.skyblocker.option.general.shortcuts.enableCommandShortcuts": "Activer les Commandes Raccourcis" + "text.autoconfig.skyblocker.option.general.shortcuts.enableShortcuts.@Tooltip": "Marche partout, même en Vanilla ! Edite les raccourcis avec \"/skyblocker shortcuts\". Au moins une des options suivantes doit être activée pour que ceci prenne effet.", + "text.autoconfig.skyblocker.option.general.shortcuts.enableCommandShortcuts": "Activer les Commandes Raccourcis", + "text.autoconfig.skyblocker.option.general.mythologicalRitual": "Aide pour le Rituel Mythologique", + "text.autoconfig.skyblocker.option.general.mythologicalRitual.enableMythologicalRitualHelper": "Activer l'aide du Rituel Mythologique", + "text.autoconfig.skyblocker.option.general.itemCooldown.enableItemCooldowns": "Activer le Temps de Recharge de l'item", + "text.autoconfig.skyblocker.option.general.shortcuts.enableCommandArgShortcuts": "Activer les Raccourcis d'Argument de Commande", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableMuseumInfo": "Activer l'Info du Musée", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableObtainedDate": "Activer Date Obtenue", + "text.autoconfig.skyblocker.option.general.fairySouls.highlightOnlyNearbySouls": "Accentuer seulement les fairy souls proches", + "text.autoconfig.skyblocker.option.general.fairySouls.highlightFoundSouls": "Accentuer les fairy souls trouvées", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableExoticTooltip": "Activer l'info-bulle exotique", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableExoticTooltip.@Tooltip": "Affiche le type d'exotique en dessous du nom de l'item si une pièce d'armure est exotique.", + "text.autoconfig.skyblocker.option.general.etherwarpOverlay": "Overlay de l'Etherwarp", + "text.autoconfig.skyblocker.option.general.shortcuts.enableCommandArgShortcuts.@Tooltip": "Raccourcis qui remplacent un ou plus de mot(s)/argument(s) d'une commande qui a plusieurs mots/arguments. Edite les raccourcis avec \"/skyblocker shortcuts\". Les raccourcis doivent être activés pour que ceci prenne effet.", + "text.autoconfig.skyblocker.option.general.fairySouls.highlightOnlyNearbySouls.@Tooltip": "Lorsque cette option est activée, seules les fairy souls situées dans un rayon de 50 blocs sont mises en évidence", + "text.autoconfig.skyblocker.option.general.tabHud.plainPlayerNames.@Tooltip": "Activer pour afficher les pseudos des joueurs sans aucune mise en forme sur les îles publiques.", + "text.autoconfig.skyblocker.option.general.waypoints.enableWaypoints": "Activer les Waypoints", + "text.autoconfig.skyblocker.option.general.waypoints": "Waypoints", + "text.autoconfig.skyblocker.option.general.waypoints.waypointType": "Type de Waypoint", + "text.skyblocker.open": "Ouvrir", + "text.skyblocker.quit_config": "Les modifications ne sont pas sauvegardées", + "text.skyblocker.quit_config_sure": "Êtes-vous sur de vouloir arrêter d'éditer la config ? Vos changements ne seront pas sauvegardés !", + "text.autoconfig.skyblocker.option.general.tabHud.nameSorting": "Méthode de tri des Pseudos des Joueurs", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableMuseumInfo.@Tooltip": "If cet item est donnable au musée, alors la catégorie de cet item dans le musée sera affiché. Il affiche aussi un marqueur indiquant si vous avez donné l'item a votre musée ou non (Cadeaux pas pris en charge pour l'instant).\n\nAssurez vous d'activer l'API du musée pour des informations précises !", + "text.autoconfig.skyblocker.option.general.shortcuts.config":