Skip to content

Commit

Permalink
Fix fishing timer appearing outside Skyblock. (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaluub committed Jan 20, 2024
1 parent 301c827 commit 08444dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/de/hysky/skyblocker/skyblock/FishingHelper.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.hysky.skyblocker.skyblock;

import de.hysky.skyblocker.config.SkyblockerConfigManager;
import de.hysky.skyblocker.utils.Utils;
import de.hysky.skyblocker.utils.render.RenderHelper;
import de.hysky.skyblocker.utils.render.title.Title;
import net.fabricmc.fabric.api.event.player.UseItemCallback;
Expand All @@ -23,6 +24,9 @@ public class FishingHelper {
public static void init() {
UseItemCallback.EVENT.register((player, world, hand) -> {
ItemStack stack = player.getStackInHand(hand);
if (!Utils.isOnSkyblock()) {
return TypedActionResult.pass(stack);
}
if (stack.getItem() instanceof FishingRodItem) {
if (player.fishHook == null) {
start(player);
Expand Down

0 comments on commit 08444dc

Please sign in to comment.