Class EntityStorage
java.lang.Object
net.minecraft.world.level.chunk.storage.EntityStorage
- All Implemented Interfaces:
AutoCloseable
,EntityPersistentStorage<Entity>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.LongSet
private static final String
private final ProcessorMailbox<Runnable>
protected final com.mojang.datafixers.DataFixer
private final ServerLevel
private static final org.slf4j.Logger
private static final String
private final IOWorker
-
Constructor Summary
ConstructorDescriptionEntityStorage
(ServerLevel p_196924_, Path p_196925_, com.mojang.datafixers.DataFixer p_196926_, boolean p_196927_, Executor p_196928_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private static ChunkEntities<Entity>
emptyChunk
(ChunkPos p_156569_) void
flush
(boolean p_182487_) static int
getVersion
(CompoundTag p_156561_) loadEntities
(ChunkPos p_156551_) private static ChunkPos
readChunkPos
(CompoundTag p_156571_) void
storeEntities
(ChunkEntities<Entity> p_156559_) private CompoundTag
upgradeChunkTag
(CompoundTag p_156573_) private static void
writeChunkPos
(CompoundTag p_156563_, ChunkPos p_156564_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ENTITIES_TAG
- See Also:
-
POSITION_TAG
- See Also:
-
level
-
worker
-
emptyChunks
private final it.unimi.dsi.fastutil.longs.LongSet emptyChunks -
entityDeserializerQueue
-
fixerUpper
protected final com.mojang.datafixers.DataFixer fixerUpper
-
-
Constructor Details
-
EntityStorage
public EntityStorage(ServerLevel p_196924_, Path p_196925_, com.mojang.datafixers.DataFixer p_196926_, boolean p_196927_, Executor p_196928_)
-
-
Method Details
-
loadEntities
- Specified by:
loadEntities
in interfaceEntityPersistentStorage<Entity>
-
readChunkPos
-
writeChunkPos
-
emptyChunk
-
storeEntities
- Specified by:
storeEntities
in interfaceEntityPersistentStorage<Entity>
-
flush
public void flush(boolean p_182487_) - Specified by:
flush
in interfaceEntityPersistentStorage<Entity>
-
upgradeChunkTag
-
getVersion
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceEntityPersistentStorage<Entity>
- Throws:
IOException
-