public final class UnsafeChunk extends Object implements org.cloudburstmc.api.level.chunk.Chunk, Closeable
| Constructor and Description |
|---|
UnsafeChunk(int x,
int z,
org.cloudburstmc.api.level.Level level) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity blockEntity) |
void |
addEntity(org.cloudburstmc.api.entity.Entity entity) |
void |
clear()
Clear chunk to a state as if it was not generated.
|
boolean |
clearDirty() |
void |
close() |
org.cloudburstmc.api.block.BlockState |
getAndSetBlock(int x,
int y,
int z,
int layer,
org.cloudburstmc.api.block.BlockState blockState) |
int |
getBiome(int x,
int z) |
byte[] |
getBiomeArray() |
org.cloudburstmc.api.block.BlockState |
getBlock(int x,
int y,
int z,
int layer) |
Set<BaseBlockEntity> |
getBlockEntities()
Gets an immutable copy of all block entities within the current chunk.
|
org.cloudburstmc.api.blockentity.BlockEntity |
getBlockEntity(int x,
int y,
int z) |
byte |
getBlockLight(int x,
int y,
int z) |
Set<BaseEntity> |
getEntities()
Gets an immutable copy of entities currently in this chunk
|
int[] |
getHeightMapArray() |
int |
getHighestBlock(int x,
int z) |
org.cloudburstmc.api.level.Level |
getLevel() |
Set<CloudPlayer> |
getLoaders() |
CloudChunkSection |
getOrCreateSection(int y) |
Set<CloudPlayer> |
getPlayerLoaders() |
Set<CloudPlayer> |
getPlayers()
Gets an immutable copy of players currently in this chunk
|
CloudChunkSection |
getSection(int y) |
CloudChunkSection[] |
getSections() |
byte |
getSkyLight(int x,
int y,
int z) |
int |
getState() |
int |
getX() |
int |
getZ() |
boolean |
init() |
boolean |
isDirty()
Whether the chunk has changed since it was last loaded or saved.
|
long |
key() |
org.cloudburstmc.api.level.chunk.LockableChunk |
readLockable() |
void |
removeBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity blockEntity) |
void |
removeEntity(org.cloudburstmc.api.entity.Entity entity) |
void |
setBiome(int x,
int z,
int biome) |
void |
setBlock(int x,
int y,
int z,
int layer,
org.cloudburstmc.api.block.BlockState blockState) |
void |
setBlockLight(int x,
int y,
int z,
int level) |
void |
setDirty(boolean dirty)
Sets the chunk's dirty status.
|
void |
setSkyLight(int x,
int y,
int z,
int level) |
int |
setState(int nextIn) |
org.cloudburstmc.api.level.chunk.LockableChunk |
writeLockable() |
public UnsafeChunk(int x,
int z,
org.cloudburstmc.api.level.Level level)
public boolean init()
@Nonnull public CloudChunkSection getOrCreateSection(int y)
getOrCreateSection in interface org.cloudburstmc.api.level.chunk.Chunk@Nullable public CloudChunkSection getSection(int y)
getSection in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public CloudChunkSection[] getSections()
getSections in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public org.cloudburstmc.api.block.BlockState getBlock(int x, int y, int z, int layer)
getBlock in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public org.cloudburstmc.api.block.BlockState getAndSetBlock(int x, int y, int z, int layer, org.cloudburstmc.api.block.BlockState blockState)
getAndSetBlock in interface org.cloudburstmc.api.level.chunk.Chunkpublic void setBlock(int x,
int y,
int z,
int layer,
org.cloudburstmc.api.block.BlockState blockState)
setBlock in interface org.cloudburstmc.api.level.chunk.Chunkpublic int getBiome(int x,
int z)
getBiome in interface org.cloudburstmc.api.level.chunk.Chunkpublic void setBiome(int x,
int z,
int biome)
setBiome in interface org.cloudburstmc.api.level.chunk.Chunkpublic byte getSkyLight(int x,
int y,
int z)
getSkyLight in interface org.cloudburstmc.api.level.chunk.Chunkpublic void setSkyLight(int x,
int y,
int z,
int level)
setSkyLight in interface org.cloudburstmc.api.level.chunk.Chunkpublic byte getBlockLight(int x,
int y,
int z)
getBlockLight in interface org.cloudburstmc.api.level.chunk.Chunkpublic void setBlockLight(int x,
int y,
int z,
int level)
setBlockLight in interface org.cloudburstmc.api.level.chunk.Chunkpublic int getHighestBlock(int x,
int z)
getHighestBlock in interface org.cloudburstmc.api.level.chunk.Chunkpublic void addEntity(@Nonnull org.cloudburstmc.api.entity.Entity entity)
addEntity in interface org.cloudburstmc.api.level.chunk.Chunkpublic void removeEntity(org.cloudburstmc.api.entity.Entity entity)
removeEntity in interface org.cloudburstmc.api.level.chunk.Chunkpublic void addBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity blockEntity)
addBlockEntity in interface org.cloudburstmc.api.level.chunk.Chunkpublic void removeBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity blockEntity)
removeBlockEntity in interface org.cloudburstmc.api.level.chunk.Chunk@Nullable public org.cloudburstmc.api.blockentity.BlockEntity getBlockEntity(int x, int y, int z)
getBlockEntity in interface org.cloudburstmc.api.level.chunk.Chunkpublic int getX()
getX in interface org.cloudburstmc.api.level.chunk.Chunkpublic int getZ()
getZ in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public org.cloudburstmc.api.level.Level getLevel()
getLevel in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public byte[] getBiomeArray()
getBiomeArray in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public int[] getHeightMapArray()
getHeightMapArray in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public Set<CloudPlayer> getPlayers()
getPlayers in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public Set<BaseEntity> getEntities()
getEntities in interface org.cloudburstmc.api.level.chunk.Chunk@Nonnull public Set<BaseBlockEntity> getBlockEntities()
getBlockEntities in interface org.cloudburstmc.api.level.chunk.Chunkpublic int getState()
getState in interface org.cloudburstmc.api.level.chunk.Chunkpublic int setState(int nextIn)
setState in interface org.cloudburstmc.api.level.chunk.Chunkpublic boolean isDirty()
isDirty in interface org.cloudburstmc.api.level.chunk.Chunkpublic void setDirty(boolean dirty)
setDirty in interface org.cloudburstmc.api.level.chunk.Chunkpublic boolean clearDirty()
clearDirty in interface org.cloudburstmc.api.level.chunk.Chunkpublic void clear()
clear in interface org.cloudburstmc.api.level.chunk.Chunkpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.cloudburstmc.api.level.chunk.Chunkpublic Set<CloudPlayer> getLoaders()
getLoaders in interface org.cloudburstmc.api.level.chunk.Chunkpublic Set<CloudPlayer> getPlayerLoaders()
getPlayerLoaders in interface org.cloudburstmc.api.level.chunk.Chunkpublic long key()
key in interface org.cloudburstmc.api.level.chunk.Chunkpublic org.cloudburstmc.api.level.chunk.LockableChunk readLockable()
readLockable in interface org.cloudburstmc.api.level.chunk.Chunkpublic org.cloudburstmc.api.level.chunk.LockableChunk writeLockable()
writeLockable in interface org.cloudburstmc.api.level.chunk.ChunkCopyright © 2021. All rights reserved.