From 044ca6ddee0513614bc92422501dcca0be30fd57 Mon Sep 17 00:00:00 2001 From: Tayy0s Date: Tue, 27 Jan 2026 17:58:09 +0800 Subject: [PATCH] AutoSprayonator fixes --- .../jelly/farmhelperv2/feature/impl/AutoSprayonator.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jelly/farmhelperv2/feature/impl/AutoSprayonator.java b/src/main/java/com/jelly/farmhelperv2/feature/impl/AutoSprayonator.java index 2f7b200b5..2d4a95512 100644 --- a/src/main/java/com/jelly/farmhelperv2/feature/impl/AutoSprayonator.java +++ b/src/main/java/com/jelly/farmhelperv2/feature/impl/AutoSprayonator.java @@ -12,6 +12,7 @@ import com.jelly.farmhelperv2.util.KeyBindUtils; import com.jelly.farmhelperv2.util.LogUtils; import com.jelly.farmhelperv2.util.helper.Clock; +import com.jelly.farmhelperv2.util.PlayerUtils; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -201,7 +202,13 @@ public void onTickSpray(ClientTickEvent event) { this.swapState(State.WAITING, 5000); break; case BUYING_MATERIAL: - if (this.isTimerRunning()) { + if (this.isTimerRunning()) { + break; + } + if (PlayerUtils.isInventoryFull(mc.thePlayer)) { + LogUtils.sendError("AutoBazaar could not buy " + this.getSprayMaterial() + " because inventory is full. Pausing until restart"); + this.pause = true; + this.stop(); break; } AutoBazaar.getInstance().buy(this.getSprayMaterial(), FarmHelperConfig.autoSprayonatorAutoBuyAmount);