From 69dddd605a411704e9947e6c604ab4c0e8f24caf Mon Sep 17 00:00:00 2001 From: RappyTV Date: Mon, 1 May 2023 15:55:33 +0200 Subject: [PATCH 1/3] for mixins (i'm dumb) --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index f394f04..614b242 100644 --- a/.gitignore +++ b/.gitignore @@ -77,6 +77,4 @@ build-data.txt !libs/*.jar # Ignore the test client -game-runner - .assetsroot \ No newline at end of file From d4b71ed73deb610a4f41e35205043a9e4ff4d796 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Mon, 1 May 2023 16:11:49 +0200 Subject: [PATCH 2/3] fixed closing GUIs directly when holding item with warning --- .../java/com/rappytv/toolwarn/listener/GameTickListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java b/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java index 4c0c5d3..892acf9 100644 --- a/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java +++ b/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java @@ -7,12 +7,14 @@ import net.labymod.api.Laby; import net.labymod.api.client.entity.player.ClientPlayer; import net.labymod.api.client.entity.player.GameMode; +import net.labymod.api.client.gui.screen.widget.overlay.ScreenOverlay; import net.labymod.api.client.world.item.ItemStack; import net.labymod.api.event.Subscribe; import net.labymod.api.event.client.lifecycle.GameTickEvent; import net.labymod.api.util.I18n; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; public class GameTickListener { @@ -41,6 +43,8 @@ public void onTick(GameTickEvent event) { public void toolUsed(ItemStack itemStack, ToolType toolType) { if(toolType == ToolType.None) return; + if(Laby.labyAPI().minecraft().minecraftWindow().isScreenOpened()) return; + int itemWarnInt = (toolType.getWarnPercentage(config) * itemStack.getMaximumDamage()) / 100; int itemUsedInt = itemStack.getMaximumDamage() - itemStack.getCurrentDamageValue(); if(config.debug().get()) From 359685d575fba1f85e42ccea4216092a51d82794 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Mon, 1 May 2023 16:13:46 +0200 Subject: [PATCH 3/3] removed some unused imports --- .../java/com/rappytv/toolwarn/listener/GameTickListener.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java b/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java index 892acf9..8e18bdd 100644 --- a/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java +++ b/core/src/main/java/com/rappytv/toolwarn/listener/GameTickListener.java @@ -7,14 +7,12 @@ import net.labymod.api.Laby; import net.labymod.api.client.entity.player.ClientPlayer; import net.labymod.api.client.entity.player.GameMode; -import net.labymod.api.client.gui.screen.widget.overlay.ScreenOverlay; import net.labymod.api.client.world.item.ItemStack; import net.labymod.api.event.Subscribe; import net.labymod.api.event.client.lifecycle.GameTickEvent; import net.labymod.api.util.I18n; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; public class GameTickListener {