Skip to content

Commit

Permalink
Fixed block counts being saved when structure grow, bypassing the thr…
Browse files Browse the repository at this point in the history
…eshold (#1675)
  • Loading branch information
OmerBenGera committed May 6, 2023
1 parent f5c91cf commit 8564457
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -2039,13 +2039,13 @@ public void handleBlocksPlace(Map<Key, Integer> blocks) {
if (blocks.isEmpty())
return;

BigDecimal oldWorth = getWorth();
BigDecimal oldLevel = getIslandLevel();

blocks.forEach((blockKey, amount) ->
handleBlockPlace(blockKey, BigInteger.valueOf(amount), false, false));

this.lastSavedBlockCounts = this.currentTotalBlockCounts.get();

IslandsDatabaseBridge.saveBlockCounts(this);
IslandsDatabaseBridge.saveDirtyChunks(this.dirtyChunksContainer);
saveBlockCounts(this.currentTotalBlockCounts.get(), oldWorth, oldLevel);

updateLastTime();
}
Expand Down

0 comments on commit 8564457

Please sign in to comment.