client icon indicating copy to clipboard operation
client copied to clipboard

Avoid - Prevent going into unloaded chunks

Open 5HT2 opened this issue 4 years ago • 0 comments

This is useful for elytraflight (#616) and afk travelling. Iirc baritone has this built in and as it's LGPL you can use that as reference for how it works.

    @EventHandler
    public Listener<ChunkEvent> listener = new Listener<>(event -> {
        if (event.getPacket().isFullChunk()) {
            chunks.add(event.getChunk());
            dirty = true;
            if (saveNewChunks.getValue()) {
                saveNewChunk(event.getChunk());
            }
        }
    });

5HT2 avatar Apr 09 '20 17:04 5HT2