Skip to content

Commit

Permalink
chore: use BlockSnapshot instead of Block in FlatteningRegion
Browse files Browse the repository at this point in the history
  • Loading branch information
Misat11 committed Aug 18, 2024
1 parent bec9f34 commit 86fe777
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

public class FlatteningRegion implements BWRegion {
private final List<Location> builtBlocks = new ArrayList<>();
private final Map<Location, Block> brokenOriginalBlocks = new HashMap<>();
private final Map<Location, BlockSnapshot> brokenOriginalBlocks = new HashMap<>();

@Override
public boolean isLocationModifiedDuringGame(Location loc) {
Expand All @@ -42,7 +42,7 @@ public boolean isLocationModifiedDuringGame(Location loc) {

@Override
public void putOriginalBlock(Location loc, BlockSnapshot block) {
brokenOriginalBlocks.put(loc, block.block());
brokenOriginalBlocks.put(loc, block);
}

@Override
Expand Down Expand Up @@ -80,7 +80,7 @@ public void regen() {
if (!chunk.isLoaded()) {
chunk.load();
}
block.getKey().getBlock().block(block.getValue());
block.getValue().updateBlock(true, false);
}
brokenOriginalBlocks.clear();
}
Expand Down

0 comments on commit 86fe777

Please sign in to comment.