From cec065a79d10319aaf0b6c3e96b4d76001f3e93b Mon Sep 17 00:00:00 2001 From: olim Date: Mon, 8 Apr 2024 22:07:29 +0100 Subject: add option for timer above rod when fishing give option to show how long a rod has been out for --- src/main/resources/assets/skyblocker/lang/en_us.json | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 84409b9f..5c590d57 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -35,6 +35,10 @@ "text.autoconfig.skyblocker.option.general.etherwarpOverlay": "Etherwarp Overlay", "text.autoconfig.skyblocker.option.general.fishing": "Fishing Helper", "text.autoconfig.skyblocker.option.general.fishing.enableFishingHelper": "Enable Fishing Helper", + "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer": "Enable Timer", + "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer.@Tooltip": "Display fishing time above bobber", + "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale": "Fishing Timer Scale", + "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale.@Tooltip": "How big to display the fishing timer", "text.autoconfig.skyblocker.option.general.fairySouls": "Fairy Souls Helper", "text.autoconfig.skyblocker.option.general.fairySouls.enableFairySoulsHelper": "Enable Fairy Souls Helper", "text.autoconfig.skyblocker.option.general.fairySouls.highlightFoundSouls": "Highlight found fairy souls", -- cgit From cdf2b3f8a1cdb665df7b3da1ecf6c328630faf5d Mon Sep 17 00:00:00 2001 From: olim Date: Mon, 8 Apr 2024 22:39:34 +0100 Subject: add option to change text color after 20 seconds add option to change the text to green after 20 seconds (use full for some larva fishing) --- .../java/de/hysky/skyblocker/config/SkyblockerConfig.java | 3 +++ .../hysky/skyblocker/config/categories/GeneralCategory.java | 7 +++++++ .../java/de/hysky/skyblocker/skyblock/FishingHelper.java | 12 +++++++++++- src/main/resources/assets/skyblocker/lang/en_us.json | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 3e292ba4..ed74ea4f 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -353,6 +353,9 @@ public class SkyblockerConfig { @SerialEntry public boolean enableFishingTimer = true; + @SerialEntry + public boolean changeTimerColor = true; + @SerialEntry public float fishingTimerScale = 1f; } 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 b1e02ee3..52a9cd15 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -233,6 +233,13 @@ public class GeneralCategory { newValue -> config.general.fishing.enableFishingTimer = newValue) .controller(ConfigUtils::createBooleanController) .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.changeTimerColor")) + .binding(defaults.general.fishing.changeTimerColor, + () -> config.general.fishing.changeTimerColor, + newValue -> config.general.fishing.changeTimerColor = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale")) .binding(defaults.general.fishing.fishingTimerScale, diff --git a/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java b/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java index fb368e30..121921b3 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java @@ -20,6 +20,8 @@ import net.minecraft.util.TypedActionResult; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; +import java.awt.*; + public class FishingHelper { private static final Title title = new Title("skyblocker.fishing.reelNow", Formatting.GREEN); private static long startTime; @@ -83,7 +85,15 @@ public class FishingHelper { float time = Math.round((System.currentTimeMillis()-startTime) / 100f) / 10f; //leave 1dp in seconds float scale = SkyblockerConfigManager.get().general.fishing.fishingTimerScale; Vec3d pos = player.fishHook.getPos().add(0,0.4 + scale / 10,0); - RenderHelper.renderText(context, Text.of(String.valueOf(time)), pos, scale, true); + + Text text; + if (time >= 20 && SkyblockerConfigManager.get().general.fishing.changeTimerColor) { + text = Text.literal(String.valueOf(time)).withColor(Color.GREEN.getRGB()); + } else { + text = Text.literal(String.valueOf(time)); + } + + RenderHelper.renderText(context, text, pos, scale, true); } } diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 5c590d57..d1b28471 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -37,6 +37,8 @@ "text.autoconfig.skyblocker.option.general.fishing.enableFishingHelper": "Enable Fishing Helper", "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer": "Enable Timer", "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer.@Tooltip": "Display fishing time above bobber", + "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor": "Change timer color at 20s", + "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor.@Tooltip": "Changes the color of the timer to green after 20 seconds has passed", "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale": "Fishing Timer Scale", "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale.@Tooltip": "How big to display the fishing timer", "text.autoconfig.skyblocker.option.general.fairySouls": "Fairy Souls Helper", -- cgit From f4b7cccafe1c84e3d7c2cd2da5633a4689b3c6e6 Mon Sep 17 00:00:00 2001 From: olim Date: Tue, 9 Apr 2024 13:26:12 +0100 Subject: add ability to hide others rods add option to toggle rendering of other players rods --- .../hysky/skyblocker/config/SkyblockerConfig.java | 3 +++ .../config/categories/GeneralCategory.java | 11 ++++++++ .../de/hysky/skyblocker/mixin/RenderFishMixin.java | 31 ++++++++++++++++++++++ .../resources/assets/skyblocker/lang/en_us.json | 4 ++- src/main/resources/skyblocker.mixins.json | 1 + 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java (limited to 'src/main/resources/assets') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index ed74ea4f..01df542e 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -358,6 +358,9 @@ public class SkyblockerConfig { @SerialEntry public float fishingTimerScale = 1f; + + @SerialEntry + public boolean hideOtherPlayers = true; } public static class FairySouls { 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 52a9cd15..830c67fd 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -228,6 +228,7 @@ public class GeneralCategory { .build()) .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer.@Tooltip"))) .binding(defaults.general.fishing.enableFishingTimer, () -> config.general.fishing.enableFishingTimer, newValue -> config.general.fishing.enableFishingTimer = newValue) @@ -235,6 +236,7 @@ public class GeneralCategory { .build()) .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.changeTimerColor")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.changeTimerColor.@Tooltip"))) .binding(defaults.general.fishing.changeTimerColor, () -> config.general.fishing.changeTimerColor, newValue -> config.general.fishing.changeTimerColor = newValue) @@ -242,11 +244,20 @@ public class GeneralCategory { .build()) .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale.@Tooltip"))) .binding(defaults.general.fishing.fishingTimerScale, () -> config.general.fishing.fishingTimerScale, newValue -> config.general.fishing.fishingTimerScale = newValue) .controller(FloatFieldControllerBuilder::create) .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers")) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers.@Tooltip"))) + .binding(defaults.general.fishing.hideOtherPlayers, + () -> config.general.fishing.hideOtherPlayers, + newValue -> config.general.fishing.hideOtherPlayers = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) .build()) //Fairy Souls Helper diff --git a/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java b/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java new file mode 100644 index 00000000..7c840bc9 --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java @@ -0,0 +1,31 @@ +package de.hysky.skyblocker.mixin; + + +import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.utils.Utils; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.entity.FishingBobberEntityRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.entity.projectile.FishingBobberEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(FishingBobberEntityRenderer.class) +public abstract class RenderFishMixin { + + @Inject(method = "render", at = @At("HEAD"), cancellable = true) + private void skyblocker$render(FishingBobberEntity fishingBobberEntity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) { + //if not the players and option to hide is enabled hid the rod + if (Utils.isOnSkyblock() && fishingBobberEntity.getPlayerOwner() != MinecraftClient.getInstance().player && SkyblockerConfigManager.get().general.fishing.hideOtherPlayers) { + ci.cancel(); + } + + + + } + +} diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index d1b28471..64d940ba 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -37,10 +37,12 @@ "text.autoconfig.skyblocker.option.general.fishing.enableFishingHelper": "Enable Fishing Helper", "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer": "Enable Timer", "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer.@Tooltip": "Display fishing time above bobber", - "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor": "Change timer color at 20s", + "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor": "Change Timer Color At 20s", "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor.@Tooltip": "Changes the color of the timer to green after 20 seconds has passed", "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale": "Fishing Timer Scale", "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale.@Tooltip": "How big to display the fishing timer", + "text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers": "Hide Other Players Rods", + "text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers.@Tooltip": "Hide other players fishing rods from showing for you", "text.autoconfig.skyblocker.option.general.fairySouls": "Fairy Souls Helper", "text.autoconfig.skyblocker.option.general.fairySouls.enableFairySoulsHelper": "Enable Fairy Souls Helper", "text.autoconfig.skyblocker.option.general.fairySouls.highlightFoundSouls": "Highlight found fairy souls", diff --git a/src/main/resources/skyblocker.mixins.json b/src/main/resources/skyblocker.mixins.json index 11002372..1c0b07bb 100644 --- a/src/main/resources/skyblocker.mixins.json +++ b/src/main/resources/skyblocker.mixins.json @@ -30,6 +30,7 @@ "PlayerListHudMixin", "PlayerSkinProviderMixin", "PlayerSkinTextureMixin", + "RenderFishMixin", "ScoreboardMixin", "SocialInteractionsPlayerListWidgetMixin", "WorldRendererMixin", -- cgit From 0bd00eb842fe3f5f3ebe5c55bc06eef339f014f4 Mon Sep 17 00:00:00 2001 From: olim Date: Thu, 11 Apr 2024 10:59:00 +0100 Subject: fix formatting hopefully make sure that the code in the pull request is formatted properly --- src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java | 4 ++-- .../de/hysky/skyblocker/config/categories/GeneralCategory.java | 6 +++--- src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java | 9 ++------- src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java | 1 - src/main/resources/assets/skyblocker/lang/en_us.json | 4 ++-- 5 files changed, 9 insertions(+), 15 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 9ee1dabe..dc3fea10 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -355,7 +355,7 @@ public class SkyblockerConfig { public boolean enableFishingHelper = true; @SerialEntry - public boolean enableFishingTimer = true; + public boolean enableFishingTimer = false; @SerialEntry public boolean changeTimerColor = true; @@ -364,7 +364,7 @@ public class SkyblockerConfig { public float fishingTimerScale = 1f; @SerialEntry - public boolean hideOtherPlayers = true; + public boolean hideOtherPlayersRods = false; } public static class FairySouls { 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 830c67fd..2a171a14 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -253,9 +253,9 @@ public class GeneralCategory { .option(Option.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers")) .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers.@Tooltip"))) - .binding(defaults.general.fishing.hideOtherPlayers, - () -> config.general.fishing.hideOtherPlayers, - newValue -> config.general.fishing.hideOtherPlayers = newValue) + .binding(defaults.general.fishing.hideOtherPlayersRods, + () -> config.general.fishing.hideOtherPlayersRods, + newValue -> config.general.fishing.hideOtherPlayersRods = newValue) .controller(ConfigUtils::createBooleanController) .build()) .build()) diff --git a/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java b/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java index 7c840bc9..e74bbaea 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/RenderFishMixin.java @@ -5,7 +5,6 @@ import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.utils.Utils; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.entity.FishingBobberEntityRenderer; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.projectile.FishingBobberEntity; @@ -19,13 +18,9 @@ public abstract class RenderFishMixin { @Inject(method = "render", at = @At("HEAD"), cancellable = true) private void skyblocker$render(FishingBobberEntity fishingBobberEntity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) { - //if not the players and option to hide is enabled hid the rod - if (Utils.isOnSkyblock() && fishingBobberEntity.getPlayerOwner() != MinecraftClient.getInstance().player && SkyblockerConfigManager.get().general.fishing.hideOtherPlayers) { + //if rendered bobber is not the players and option to hide others is enabled do not render the bobber + if (Utils.isOnSkyblock() && fishingBobberEntity.getPlayerOwner() != MinecraftClient.getInstance().player && SkyblockerConfigManager.get().general.fishing.hideOtherPlayersRods) { ci.cancel(); } - - - } - } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java b/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java index 121921b3..b235f7f7 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java @@ -96,6 +96,5 @@ public class FishingHelper { RenderHelper.renderText(context, text, pos, scale, true); } } - } } diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index b43845e6..2563e51e 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -37,8 +37,8 @@ "text.autoconfig.skyblocker.option.general.fishing.enableFishingHelper": "Enable Fishing Helper", "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer": "Enable Timer", "text.autoconfig.skyblocker.option.general.fishing.enableFishingTimer.@Tooltip": "Display fishing time above bobber", - "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor": "Change Timer Color At 20s", - "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor.@Tooltip": "Changes the color of the timer to green after 20 seconds has passed", + "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor": "Change Timer At 20s", + "text.autoconfig.skyblocker.option.general.fishing.changeTimerColor.@Tooltip": "Changes timer to green after 20 seconds has passed", "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale": "Fishing Timer Scale", "text.autoconfig.skyblocker.option.general.fishing.fishingTimerScale.@Tooltip": "How big to display the fishing timer", "text.autoconfig.skyblocker.option.general.fishing.hideOtherPlayers": "Hide Other Players Rods", -- cgit From a505ac7f096e6a669536452c918458cae5a8a224 Mon Sep 17 00:00:00 2001 From: Kevin <92656833+kevinthegreat1@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:42:38 -0400 Subject: Allow drop in dungeon option for locked slots (#624) --- .../hysky/skyblocker/mixin/ClientPlayerEntityMixin.java | 15 ++++++--------- .../de/hysky/skyblocker/skyblock/item/HotbarSlotLock.java | 5 ----- src/main/resources/assets/skyblocker/lang/en_us.json | 4 ++-- 3 files changed, 8 insertions(+), 16 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java index 049443f7..8fb2fda4 100644 --- a/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixin/ClientPlayerEntityMixin.java @@ -27,7 +27,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(ClientPlayerEntity.class) public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity { - @Shadow @Final protected MinecraftClient client; + @Shadow + @Final + protected MinecraftClient client; public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) { super(world, profile); @@ -35,14 +37,9 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity @Inject(method = "dropSelectedItem", at = @At("HEAD"), cancellable = true) public void skyblocker$dropSelectedItem(CallbackInfoReturnable cir) { - if (Utils.isOnSkyblock()) { - if (ItemProtection.isItemProtected(this.getInventory().getMainHandStack())) { - if (!SkyblockerConfigManager.get().locations.dungeons.allowDroppingProtectedItems - || (SkyblockerConfigManager.get().locations.dungeons.allowDroppingProtectedItems && !Utils.isInDungeons())) { - cir.setReturnValue(false); - } - } - HotbarSlotLock.handleDropSelectedItem(this.getInventory().selectedSlot, cir); + if (Utils.isOnSkyblock() && (ItemProtection.isItemProtected(this.getInventory().getMainHandStack()) || HotbarSlotLock.isLocked(this.getInventory().selectedSlot)) + && (!SkyblockerConfigManager.get().locations.dungeons.allowDroppingProtectedItems || !Utils.isInDungeons())) { + cir.setReturnValue(false); } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/HotbarSlotLock.java b/src/main/java/de/hysky/skyblocker/skyblock/item/HotbarSlotLock.java index 069a030d..0fda3ef4 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/HotbarSlotLock.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/HotbarSlotLock.java @@ -5,7 +5,6 @@ import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; import org.lwjgl.glfw.GLFW; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.util.List; @@ -24,10 +23,6 @@ public class HotbarSlotLock { return SkyblockerConfigManager.get().general.lockedSlots.contains(slot); } - public static void handleDropSelectedItem(int slot, CallbackInfoReturnable cir) { - if (isLocked(slot)) cir.setReturnValue(false); - } - public static void handleInputEvents(ClientPlayerEntity player) { while (hotbarSlotLock.wasPressed()) { List lockedSlots = SkyblockerConfigManager.get().general.lockedSlots; diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index bda6a909..3696ab67 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -326,8 +326,8 @@ "text.autoconfig.skyblocker.option.locations.dungeons.fireFreezeStaffTimer.@Tooltip": "Display a timer when to use a Fire Freeze Staff in the F3/M3 boss fight.", "text.autoconfig.skyblocker.option.locations.dungeons.floor3GuardianHealthDisplay": "Guardian Health Display (F3/M3)", "text.autoconfig.skyblocker.option.locations.dungeons.floor3GuardianHealthDisplay.@Tooltip": "Displays guardian's health below them in the F3/M3 boss fight.", - "text.autoconfig.skyblocker.option.locations.dungeons.allowDroppingProtectedItems": "Enabled Dropping Protected Items", - "text.autoconfig.skyblocker.option.locations.dungeons.allowDroppingProtectedItems.@Tooltip": "Allows the use of class abilities in Dungeons while holding an item which has been protected using /skyblocker protectItem.", + "text.autoconfig.skyblocker.option.locations.dungeons.allowDroppingProtectedItems": "Enabled Dropping Protected Items & on Locked Slots", + "text.autoconfig.skyblocker.option.locations.dungeons.allowDroppingProtectedItems.@Tooltip": "Allows the use of class abilities in Dungeons on a locked slot or while holding an item which has been protected using /skyblocker protectItem.", "text.autoconfig.skyblocker.option.locations.dwarvenMines": "Dwarven Mines", "text.autoconfig.skyblocker.option.locations.dwarvenMines.enableDrillFuel": "Enable Drill Fuel", -- cgit