Class EntityStorage
java.lang.Object
net.minecraft.world.level.chunk.storage.EntityStorage
- All Implemented Interfaces:
AutoCloseable,EntityPersistentStorage<Entity>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.LongSetprivate static final Stringprivate final ProcessorMailbox<Runnable> private final ServerLevelprivate static final org.slf4j.Loggerprivate static final Stringprivate final SimpleRegionStorage -
Constructor Summary
ConstructorsConstructorDescriptionEntityStorage(SimpleRegionStorage simpleRegionStorage, ServerLevel level, Executor executor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static ChunkEntities<Entity> emptyChunk(ChunkPos pos) voidflush(boolean synchronize) loadEntities(ChunkPos pos) private static ChunkPosreadChunkPos(CompoundTag tag) private voidreportLoadFailureIfPresent(CompletableFuture<?> future, ChunkPos pos) private voidreportSaveFailureIfPresent(CompletableFuture<?> future, ChunkPos pos) voidstoreEntities(ChunkEntities<Entity> entities) private static voidwriteChunkPos(CompoundTag tag, ChunkPos pos)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ENTITIES_TAG
- See Also:
-
POSITION_TAG
- See Also:
-
level
-
simpleRegionStorage
-
emptyChunks
private final it.unimi.dsi.fastutil.longs.LongSet emptyChunks -
entityDeserializerQueue
-
-
Constructor Details
-
EntityStorage
-
-
Method Details
-
loadEntities
- Specified by:
loadEntitiesin interfaceEntityPersistentStorage<Entity>
-
readChunkPos
-
writeChunkPos
-
emptyChunk
-
storeEntities
- Specified by:
storeEntitiesin interfaceEntityPersistentStorage<Entity>
-
reportSaveFailureIfPresent
-
reportLoadFailureIfPresent
-
flush
public void flush(boolean synchronize) - Specified by:
flushin interfaceEntityPersistentStorage<Entity>
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceEntityPersistentStorage<Entity>- Throws:
IOException
-