missed a spot

This commit is contained in:
leijurv 2018-08-13 20:19:27 -07:00
parent ebee78b035
commit e4d6d6ff64

View File

@ -108,10 +108,12 @@ public final class GameEventHandler implements IGameEventListener, Helper {
&& type == ChunkEvent.Type.UNLOAD && type == ChunkEvent.Type.UNLOAD
&& mc.world.getChunkProvider().isChunkGeneratedAt(event.getX(), event.getZ()); && mc.world.getChunkProvider().isChunkGeneratedAt(event.getX(), event.getZ());
if (isPostPopulate || isPreUnload) { if (Baritone.settings().chuckCaching) {
CachedWorldProvider.INSTANCE.ifWorldLoaded(world -> if (isPostPopulate || isPreUnload) {
world.updateCachedChunk(event.getX(), event.getZ(), CachedWorldProvider.INSTANCE.ifWorldLoaded(world ->
ChunkPacker.createPackedChunk(mc.world.getChunk(event.getX(), event.getZ())))); world.updateCachedChunk(event.getX(), event.getZ(),
ChunkPacker.createPackedChunk(mc.world.getChunk(event.getX(), event.getZ()))));
}
} }
dispatch(behavior -> behavior.onChunkEvent(event)); dispatch(behavior -> behavior.onChunkEvent(event));