maybe fix

This commit is contained in:
Leijurv 2019-01-16 17:42:43 -08:00
parent db24822d2f
commit 2daedecf92
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -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) {