Skip to content

Commit

Permalink
Reset state after landing
Browse files Browse the repository at this point in the history
  • Loading branch information
zomabies committed Mar 17, 2024
1 parent 02e8aa0 commit 63decde
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -73,6 +80,7 @@ public void reset() {
lastDiffMS = 0f;
lastEncounteredMS = 0f;
offsetMS = 0f;
changesPending = false;
}

public boolean shouldCorrectTerrain() {
Expand Down

0 comments on commit 63decde

Please sign in to comment.