Skip to content

Commit a9e66a9

Browse files
committed
fix(folia): async chunk access
1 parent be6aa6a commit a9e66a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • minecraft/Wrapper/src/main/java/me/outspending/biomesapi/unsafe

minecraft/Wrapper/src/main/java/me/outspending/biomesapi/unsafe/UnsafeNMS.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ private boolean inChunkViewDistance(@NotNull Player player, @NotNull Chunk chunk
2727
Location playerLocation = player.getLocation();
2828

2929
int viewDistance = Bukkit.getViewDistance();
30-
int playerChunkX = playerLocation.getChunk().getX();
31-
int playerChunkZ = playerLocation.getChunk().getZ();
30+
int playerChunkX = playerLocation.getBlockX() >> 4;
31+
int playerChunkZ = playerLocation.getBlockZ() >> 4;
3232

3333
int targetChunkX = chunk.getX();
3434
int targetChunkZ = chunk.getZ();

0 commit comments

Comments
 (0)