|
6 | 6 | import io.github.notstirred.chunkyeditor.minecraft.WorldLock; |
7 | 7 | import io.github.notstirred.chunkyeditor.state.State; |
8 | 8 | import javafx.application.Platform; |
9 | | -import se.llbit.chunky.world.Chunk; |
10 | | -import se.llbit.chunky.world.ChunkPosition; |
11 | | -import se.llbit.chunky.world.EmptyChunk; |
12 | | -import se.llbit.chunky.world.World; |
| 9 | +import se.llbit.chunky.world.*; |
13 | 10 | import se.llbit.chunky.world.region.MCRegion; |
14 | 11 | import se.llbit.chunky.world.region.Region; |
15 | 12 | import se.llbit.log.Log; |
@@ -129,16 +126,17 @@ private CompletableFuture<Void> deleteChunks(Executor taskExecutor, Map<VanillaR |
129 | 126 | }, taskExecutor); |
130 | 127 |
|
131 | 128 | // update the map view with the newly deleted chunks |
132 | | - deletionFuture.whenCompleteAsync((v, throwable) -> |
| 129 | + deletionFuture.whenCompleteAsync((_, throwable) -> |
133 | 130 | regionSelection.forEach((regionPos, chunkPositions) -> { |
134 | | - Region region = world.getRegion(new ChunkPosition(regionPos.x(), regionPos.z())); |
| 131 | + Dimension dimension = world.currentDimension(); |
| 132 | + Region region = dimension.getRegion(new ChunkPosition(regionPos.x(), regionPos.z())); |
135 | 133 | for (ChunkPosition chunkPos : chunkPositions) { |
136 | | - Chunk chunk = world.getChunk(chunkPos); |
| 134 | + Chunk chunk = dimension.getChunk(chunkPos); |
137 | 135 | if (!chunk.isEmpty()) { |
138 | 136 | chunk.reset(); |
139 | 137 | Accessor.invoke_MCRegion$setChunk((MCRegion) region, chunkPos, EmptyChunk.INSTANCE); |
140 | | - world.chunkUpdated(chunkPos); |
141 | | - world.chunkDeleted(chunkPos); |
| 138 | + dimension.chunkUpdated(chunkPos); |
| 139 | + dimension.chunkDeleted(chunkPos); |
142 | 140 | } |
143 | 141 | } |
144 | 142 | }), Platform::runLater |
|
0 commit comments