MCPcopy Create free account
hub / github.com/boxbeam/RedLib / unload

Method unload

src/redempt/redlib/blockdata/BlockDataManager.java:182–190  ·  view source on GitHub ↗
(ChunkPosition pos)

Source from the content-addressed store, hash-verified

180 }
181
182 private CompletableFuture<Void> unload(ChunkPosition pos) {
183 CompletableFuture<Void> load = loading.remove(pos);
184 if (load != null) {
185 load.cancel(true);
186 dataBlocks.remove(pos);
187 return CompletableFuture.completedFuture(null);
188 }
189 return save(pos, false).thenRun(() -> dataBlocks.remove(pos));
190 }
191
192 /**
193 * Removes a DataBlock and its data from this BlockDataManager

Callers 2

BlockDataManagerMethod · 0.95
unloadAsyncMethod · 0.95

Calls 5

saveMethod · 0.95
unwrapMethod · 0.95
unloadAsyncMethod · 0.95
removeMethod · 0.65
cancelMethod · 0.45

Tested by

no test coverage detected