From 63decde3187d9398ee3312a142267fd25eefb89c Mon Sep 17 00:00:00 2001 From: Zomabies Date: Mon, 18 Mar 2024 04:11:27 +0800 Subject: [PATCH] Reset state after landing --- .../computers/safety/ChunkStatusComputer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/ru/octol1ttle/flightassistant/computers/safety/ChunkStatusComputer.java b/src/main/java/ru/octol1ttle/flightassistant/computers/safety/ChunkStatusComputer.java index e9f4e897..4b2167b7 100644 --- a/src/main/java/ru/octol1ttle/flightassistant/computers/safety/ChunkStatusComputer.java +++ b/src/main/java/ru/octol1ttle/flightassistant/computers/safety/ChunkStatusComputer.java @@ -36,9 +36,16 @@ public ChunkStatusComputer(ComputerHost host, MinecraftClient mc, AirDataCompute @Override public void tick() { if (!data.isFlying()) { + if (changesPending) { + reset(); + } return; } + if (!changesPending) { + changesPending = true; + } + isLoaded = data.isCurrentChunkLoaded; if (isLoaded) { @@ -73,6 +80,7 @@ public void reset() { lastDiffMS = 0f; lastEncounteredMS = 0f; offsetMS = 0f; + changesPending = false; } public boolean shouldCorrectTerrain() {