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 intprotected 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 TypeMethodDescriptionvoidprotected booleancreateFullBrightLightData(LightUpdateData lightData, int sectionCount) booleanget(int x, int z) it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<Chunk> getCache()intintgetChunkSection(int x, int y, int z) @Nullable DimensionDataintlongintintintvoidgetPackets(@NonNull Consumer<Packet> consumer, @NonNull TcpSession session) floatintintbyte[]byte @Nullable []intintfloatnet.kyori.adventure.key.KeyList<net.kyori.adventure.key.Key> booleanbooleaninthashCode()booleanisChunkLoaded(int x, int z) booleanisDebug()booleanisFlat()booleanbooleanvoidremove(int x, int z) voidreset(CacheResetType type) setCenterX(int centerX) setCenterZ(int centerZ) setCurrentDimension(@Nullable DimensionData currentDimension) voidsetCurrentWorld(int dimensionId, net.kyori.adventure.key.Key worldName, long hashedSeed, boolean debug, boolean flat) setDebug(boolean debug) setDimensionType(int dimensionType) setFlat(boolean flat) setHashedSeed(long hashedSeed) setRaining(boolean isRaining) setRainStrength(float rainStrength) setSeaLevel(int seaLevel) setServerBrand(byte[] serverBrand) setServerSimulationDistance(int serverSimulationDistance) setServerViewDistance(int serverViewDistance) setThunderStrength(float thunderStrength) setWorldBorderData(WorldBorderData worldBorderData) setWorldName(net.kyori.adventure.key.Key worldName) setWorldNames(List<net.kyori.adventure.key.Key> worldNames) setWorldTimeData(WorldTimeData worldTimeData) static voidsync()toString()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 -
seaLevel
protected int seaLevel -
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
-
isRaining
public boolean isRaining() -
getRainStrength
public float getRainStrength() -
getThunderStrength
public float getThunderStrength() -
getCache
-
getCurrentDimension
-
getWorldNames
-
getServerViewDistance
public int getServerViewDistance() -
getServerSimulationDistance
public int getServerSimulationDistance() -
getCenterX
public int getCenterX() -
getCenterZ
public int getCenterZ() -
getDimensionType
public int getDimensionType() -
getWorldName
public net.kyori.adventure.key.Key getWorldName() -
getHashedSeed
public long getHashedSeed() -
isDebug
public boolean isDebug() -
isFlat
public boolean isFlat() -
getSeaLevel
public int getSeaLevel() -
getWorldBorderData
-
getWorldTimeData
-
setRaining
- Returns:
this.
-
setRainStrength
- Returns:
this.
-
setThunderStrength
- Returns:
this.
-
setCurrentDimension
- Returns:
this.
-
setWorldNames
- Returns:
this.
-
setServerViewDistance
- Returns:
this.
-
setServerSimulationDistance
- Returns:
this.
-
setCenterX
- Returns:
this.
-
setCenterZ
- Returns:
this.
-
setDimensionType
- Returns:
this.
-
setWorldName
- Returns:
this.
-
setHashedSeed
- Returns:
this.
-
setDebug
- Returns:
this.
-
setFlat
- Returns:
this.
-
setSeaLevel
- Returns:
this.
-
setWorldBorderData
- Returns:
this.
-
setWorldTimeData
- Returns:
this.
-
setServerBrand
- Returns:
this.
-
equals
-
canEqual
-
hashCode
-
toString
-