Class ChunkCache
java.lang.Object
com.zenith.cache.data.chunk.ChunkCache
- All Implemented Interfaces:
CachedData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<Chunk> protected intprotected intprotected @Nullable DimensionDataprotected booleanprotected intprotected booleanprotected longprotected byte[]protected intprotected intprotected WorldBorderDataprotected net.kyori.adventure.key.Keyprotected List<net.kyori.adventure.key.Key> protected WorldTimeData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateFullBrightLightData(LightUpdateData lightData, int sectionCount) get(int x, int z) getChunkSection(int x, int y, int z) intintintvoidgetPackets(@NonNull Consumer<Packet> consumer, @NonNull TcpSession session) intbyte[]byte @Nullable []booleanbooleanbooleanisChunkLoaded(int x, int z) booleanvoidremove(int x, int z) voidreset(CacheResetType type) voidsetCurrentWorld(int dimensionId, net.kyori.adventure.key.Key worldName, long hashedSeed, boolean debug, boolean flat) static voidsync()booleanupdateBlock(@NonNull BlockChangeEntry record) booleanupdateBlock(@NonNull ClientboundBlockUpdatePacket packet) booleanvoidvoid
-
Field Details
-
cache
-
currentDimension
-
worldNames
-
serverViewDistance
protected int serverViewDistance -
serverSimulationDistance
protected int serverSimulationDistance -
centerX
protected int centerX -
centerZ
protected int centerZ -
dimensionType
protected int dimensionType -
worldName
protected net.kyori.adventure.key.Key worldName -
hashedSeed
protected long hashedSeed -
debug
protected boolean debug -
flat
protected boolean flat -
worldBorderData
-
worldTimeData
-
serverBrand
protected byte[] serverBrand
-
-
Constructor Details
-
ChunkCache
public ChunkCache()
-
-
Method Details
-
setCurrentWorld
public void setCurrentWorld(int dimensionId, net.kyori.adventure.key.Key worldName, long hashedSeed, boolean debug, boolean flat) -
sync
public static void sync() -
isChunkLoaded
public boolean isChunkLoaded(int x, int z) -
updateBlock
-
handleChunkBiomes
-
handleLightUpdate
-
multiBlockUpdate
-
updateBlock
-
updateBlockEntity
-
getServerBrandRaw
public byte @Nullable [] getServerBrandRaw() -
getServerBrand
public byte[] getServerBrand() -
createFullBrightLightData
-
getPackets
- Specified by:
getPacketsin interfaceCachedData
-
reset
- Specified by:
resetin interfaceCachedData
-
getSendingMessage
- Specified by:
getSendingMessagein interfaceCachedData
-
add
-
getSectionsCount
public int getSectionsCount() -
getMaxSection
public int getMaxSection() -
getMinSection
public int getMinSection() -
getMaxBuildHeight
public int getMaxBuildHeight() -
get
-
getChunkSection
-
remove
public void remove(int x, int z) -
updateCurrentDimension
-
updateWorldTime
-