Skip to content

Commit

Permalink
Merge pull request #1789 from ManInMyVan/folia
Browse files Browse the repository at this point in the history
fix folia error
  • Loading branch information
SamB440 authored Nov 14, 2024
2 parents 8faa0db + 9028135 commit d70e778
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void resyncPositions(GrimPlayer player, int minBlockX, int mY, int

// Takes 0.15ms or so to complete. Not bad IMO. Unsure how I could improve this other than sending packets async.
// But that's on PacketEvents.
FoliaScheduler.getEntityScheduler().execute(player.bukkitPlayer, GrimAPI.INSTANCE.getPlugin(), () -> {
FoliaScheduler.getGlobalRegionScheduler().execute(GrimAPI.INSTANCE.getPlugin(), () -> {
boolean flat = PacketEvents.getAPI().getServerManager().getVersion().isNewerThanOrEquals(ServerVersion.V_1_13);

if (player.bukkitPlayer == null) return;
Expand Down Expand Up @@ -111,6 +111,6 @@ public static void resyncPositions(GrimPlayer player, int minBlockX, int mY, int
}
}
}
}, null, 0);
});
}
}

0 comments on commit d70e778

Please sign in to comment.