Skip to content

Commit

Permalink
Improve performance for clearAllBlockInfoAtChunk
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev committed Jul 11, 2023
1 parent 0d2c24f commit e00cac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/me/mrCookieSlime/Slimefun/api/BlockStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,8 @@ public static void clearAllBlockInfoAtChunk(World world, int chunkX, int chunkZ,
return;
}
Map<Location, Boolean> toClear = new HashMap<>();
Map<Location, Config> storage = blockStorage.getRawStorage();
for (Location location : storage.keySet()) {
// Unsafe: get raw storage for this world
for (Location location : blockStorage.storage.keySet()) {
if (location.getBlockX() >> 4 == chunkX && location.getBlockZ() >> 4 == chunkZ) {
toClear.put(location, destroy);
}
Expand Down

0 comments on commit e00cac4

Please sign in to comment.