Skip to content

Commit fc905d6

Browse files
Kobataasiekierka
authored andcommitted
Add lower bound check to auto refill. Fixes Inventory-Tweaks#250
1 parent 88f016b commit fc905d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/invtweaks/InvTweaksHandlerAutoRefill.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ public void run() {
186186
log.warn("Autoreplace timout");
187187
}*/
188188

189+
if(i < 0 || targetedSlot < 0) {
190+
return;
191+
}
192+
189193
// TODO: Look for better update detection now that this runs tick-based. It'll probably fail a bit if latency is > 50ms (1 tick)
190194
// Since last tick, things might have changed
191195
ItemStack stack = containerMgr.getItemStack(i);

0 commit comments

Comments
 (0)