Class BlockChunk
java.lang.Object
com.hypixel.hytale.server.core.universe.world.chunk.BlockChunk
- All Implemented Interfaces:
Component<ChunkStore>,Cloneable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[]Deprecated, for removal: This API element is subject to removal in a future version.static final BuilderCodec<BlockChunk> private EnvironmentChunkprivate final ShortBytePaletteprivate longprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[]Deprecated, for removal: This API element is subject to removal in a future version.private booleanprivate booleanstatic booleanstatic booleanprivate final IntBytePalettestatic final intprivate intprivate intFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBlockChunk(int x, int z) BlockChunk(int x, int z, ShortBytePalette height, IntBytePalette tint, EnvironmentChunk environments) BlockChunk(ShortBytePalette height, IntBytePalette tint, EnvironmentChunk environments, com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] chunkSections) -
Method Summary
Modifier and TypeMethodDescriptionintit.unimi.dsi.fastutil.ints.Int2IntMapit.unimi.dsi.fastutil.ints.IntSetblocks()clone()booleanbooleanbooleancontains(int blockId) intcount(int blockId) private voiddeserialize(byte[] bytes, ExtraInfo extraInfo) <T,V> int forEachTicking(T t, V v, ObjectPositionBlockFunction<T, V, BlockTickStrategy> acceptor) intgetBlock(int x, int y, int z) shortgetBlockLight(int x, int y, int z) bytegetBlockLightIntensity(int x, int y, int z) bytegetBlueBlockLight(int x, int y, int z) private CompletableFuture<CachedPacket<SetChunkHeightmap>> private CompletableFuture<CachedPacket<SetChunkTintmap>> com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[]Deprecated.static ComponentType<ChunkStore, BlockChunk> intgetEnvironment(int x, int y, int z) intgetEnvironment(Vector3d position) intgetEnvironment(Vector3i position) getEnvironmentColumn(int x, int z) bytegetGreenBlockLight(int x, int y, int z) shortgetHeight(int index) shortgetHeight(int x, int z) longgetIndex()com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[]Deprecated, for removal: This API element is subject to removal in a future version.booleanbytegetRedBlockLight(int x, int y, int z) com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSectiongetSectionAtBlockY(int y) Deprecated.com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSectiongetSectionAtIndex(int index) Deprecated.intbytegetSkyLight(int x, int y, int z) intintgetTint(int x, int z) intgetX()intgetZ()voidinvalidateChunkSection(int sectionIndex) booleanisTicking(int x, int y, int z) voidload(int x, int z) voidloadFromHolder(Holder<ChunkStore> holder) Deprecated, for removal: This API element is subject to removal in a future version.voidvoidvoidvoidprivate byte[]booleansetBlock(int x, int y, int z, int blockId, int rotation, int filler) voidsetEnvironment(int x, int y, int z, int environment) voidsetEnvironmentChunk(EnvironmentChunk environmentChunk) voidsetHeight(int x, int z, short height) booleansetNeighbourBlocksTicking(int x, int y, int z) booleansetTicking(int x, int y, int z, boolean ticking) voidsetTint(int x, int z, int tint) com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[]Deprecated, for removal: This API element is subject to removal in a future version.shortupdateHeight(int x, int z) shortupdateHeight(int x, int z, short startY) void
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
CODEC
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
SEND_LOCAL_LIGHTING_DATA
public static boolean SEND_LOCAL_LIGHTING_DATA -
SEND_GLOBAL_LIGHTING_DATA
public static boolean SEND_GLOBAL_LIGHTING_DATA -
index
private long index -
x
private int x -
z
private int z -
height
-
tint
-
chunkSections
@Deprecated(forRemoval=true) private com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] chunkSectionsDeprecated, for removal: This API element is subject to removal in a future version. -
migratedChunkSections
@Nullable @Deprecated(forRemoval=true) private com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] migratedChunkSectionsDeprecated, for removal: This API element is subject to removal in a future version. -
environments
-
needsPhysics
private boolean needsPhysics -
needsSaving
private boolean needsSaving -
cachedHeightmapPacket
@Nullable private transient SoftReference<CompletableFuture<CachedPacket<SetChunkHeightmap>>> cachedHeightmapPacket -
cachedTintmapPacket
@Nullable private transient SoftReference<CompletableFuture<CachedPacket<SetChunkTintmap>>> cachedTintmapPacket -
cachedEnvironmentsPacket
@Nullable private transient SoftReference<CompletableFuture<CachedPacket<SetChunkEnvironments>>> cachedEnvironmentsPacket
-
-
Constructor Details
-
BlockChunk
private BlockChunk() -
BlockChunk
public BlockChunk(int x, int z) -
BlockChunk
public BlockChunk(int x, int z, ShortBytePalette height, IntBytePalette tint, EnvironmentChunk environments) -
BlockChunk
public BlockChunk(ShortBytePalette height, IntBytePalette tint, EnvironmentChunk environments, com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] chunkSections)
-
-
Method Details
-
getComponentType
-
load
public void load(int x, int z) -
clone
- Specified by:
clonein interfaceComponent<ChunkStore>- Overrides:
clonein classObject
-
cloneSerializable
- Specified by:
cloneSerializablein interfaceComponent<ChunkStore>
-
getIndex
public long getIndex() -
getX
public int getX() -
getZ
public int getZ() -
getEnvironmentChunk
-
setEnvironmentChunk
-
getHeight
public short getHeight(int x, int z) -
getHeight
public short getHeight(int index) -
setHeight
public void setHeight(int x, int z, short height) -
updateHeightmap
public void updateHeightmap() -
updateHeight
public short updateHeight(int x, int z) -
updateHeight
public short updateHeight(int x, int z, short startY) -
loadFromHolder
Deprecated, for removal: This API element is subject to removal in a future version. -
getSectionAtIndex
@Deprecated(forRemoval=false) public com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection getSectionAtIndex(int index) Deprecated. -
getSectionAtBlockY
@Deprecated(forRemoval=false) public com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection getSectionAtBlockY(int y) Deprecated. -
getChunkSections
@Deprecated(forRemoval=false) public com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] getChunkSections()Deprecated. -
getSectionCount
public int getSectionCount() -
getTint
public int getTint(int x, int z) -
setTint
public void setTint(int x, int z, int tint) -
getEnvironment
-
getEnvironment
-
getEnvironment
public int getEnvironment(int x, int y, int z) -
getEnvironmentColumn
-
setEnvironment
public void setEnvironment(int x, int y, int z, int environment) -
getRedBlockLight
public byte getRedBlockLight(int x, int y, int z) -
getGreenBlockLight
public byte getGreenBlockLight(int x, int y, int z) -
getBlueBlockLight
public byte getBlueBlockLight(int x, int y, int z) -
getBlockLight
public short getBlockLight(int x, int y, int z) -
getSkyLight
public byte getSkyLight(int x, int y, int z) -
getBlockLightIntensity
public byte getBlockLightIntensity(int x, int y, int z) -
getBlock
public int getBlock(int x, int y, int z) -
setBlock
public boolean setBlock(int x, int y, int z, int blockId, int rotation, int filler) -
contains
public boolean contains(int blockId) -
count
public int count(int blockId) -
blockCounts
@Nonnull public it.unimi.dsi.fastutil.ints.Int2IntMap blockCounts() -
blocks
@Nonnull public it.unimi.dsi.fastutil.ints.IntSet blocks() -
blockCount
public int blockCount() -
preTick
-
forEachTicking
public <T,V> int forEachTicking(T t, V v, ObjectPositionBlockFunction<T, V, BlockTickStrategy> acceptor) -
mergeTickingBlocks
public void mergeTickingBlocks() -
setTicking
public boolean setTicking(int x, int y, int z, boolean ticking) -
isTicking
public boolean isTicking(int x, int y, int z) -
getTickingBlocksCount
public int getTickingBlocksCount() -
setNeighbourBlocksTicking
public boolean setNeighbourBlocksTicking(int x, int y, int z) -
markNeedsSaving
public void markNeedsSaving() -
getNeedsSaving
public boolean getNeedsSaving() -
consumeNeedsSaving
public boolean consumeNeedsSaving() -
markNeedsPhysics
public void markNeedsPhysics() -
consumeNeedsPhysics
public boolean consumeNeedsPhysics() -
invalidateChunkSection
public void invalidateChunkSection(int sectionIndex) -
takeMigratedSections
@Nullable @Deprecated(forRemoval=true) public com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] takeMigratedSections()Deprecated, for removal: This API element is subject to removal in a future version. -
getMigratedSections
@Nullable @Deprecated(forRemoval=true) public com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection[] getMigratedSections()Deprecated, for removal: This API element is subject to removal in a future version. -
serialize
-
deserialize
-
getCachedHeightmapPacket
-
getCachedTintsPacket
-
getCachedEnvironmentsPacket
@Nonnull private CompletableFuture<CachedPacket<SetChunkEnvironments>> getCachedEnvironmentsPacket()
-