From 2daedecf9233c07d3dcf415b9ecbe2a8559ac3c4 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 16 Jan 2019 17:42:43 -0800 Subject: [PATCH] maybe fix --- src/main/java/baritone/behavior/MemoryBehavior.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/baritone/behavior/MemoryBehavior.java b/src/main/java/baritone/behavior/MemoryBehavior.java index 49986018..696e107d 100644 --- a/src/main/java/baritone/behavior/MemoryBehavior.java +++ b/src/main/java/baritone/behavior/MemoryBehavior.java @@ -21,6 +21,7 @@ import baritone.Baritone; import baritone.api.event.events.BlockInteractEvent; import baritone.api.event.events.PacketEvent; import baritone.api.event.events.PlayerUpdateEvent; +import baritone.api.event.events.TickEvent; import baritone.api.event.events.type.EventState; import baritone.cache.ContainerMemory; import baritone.cache.Waypoint; @@ -60,6 +61,14 @@ public final class MemoryBehavior extends Behavior { super(baritone); } + @Override + public synchronized void onTick(TickEvent event) { + if (event.getType() == TickEvent.Type.OUT) { + enderChestWindowId = null; + futureInventories.clear(); + } + } + @Override public synchronized void onPlayerUpdate(PlayerUpdateEvent event) { if (event.getState() == EventState.PRE) {