Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getComponentType()
- load(int, int)
- clone()
- cloneSerializable()
- getIndex()
- getX()
- getZ()
- setHeightmapColumn(HeightmapColumn)
- hasLegacyHeightmap()
- takeLegacyHeightmap()
- loadFromHolder(Holder)
- refreshSectionRefs(Holder[])
- getTint(int, int)
- setTint(int, int, int)
- readEnvironmentRuns(int, int, BlockChunk.EnvironmentRunCursor)
- markNeedsSaving()
- getNeedsSaving()
- consumeNeedsSaving()
- invalidateColumnPacket()
- getCachedTintsPacket()
Class BlockChunk
java.lang.Object
com.hypixel.hytale.server.core.universe.world.chunk.BlockChunk
- All Implemented Interfaces:
Component<ChunkStore>, Cloneable
- Since:
- 22.02.2016
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWalks the environment runs of one block column, bottom to top, merging runs that continue across section borders.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<BlockChunk> static booleanstatic booleanstatic final intVersion history: == Pre launch, removed == * Version 0: Initial version * Version 1: Fluids are no longer blocks.Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanstatic ComponentType<ChunkStore, BlockChunk> longgetIndex()booleanintgetTint(int x, int z) intgetX()intgetZ()booleanvoidDrops the cached column packet so the next send rebuilds it from current state.voidload(int x, int z) voidloadFromHolder(Holder<ChunkStore> holder) Deprecated, for removal: This API element is subject to removal in a future version.voidvoidreadEnvironmentRuns(int x, int z, BlockChunk.EnvironmentRunCursor cursor) Deprecated, for removal: This API element is subject to removal in a future version.voidrefreshSectionRefs(Holder<ChunkStore>[] sectionHolders) Deprecated, for removal: This API element is subject to removal in a future version.voidsetHeightmapColumn(HeightmapColumn heightmapColumn) voidsetTint(int x, int z, int tint)
-
Field Details
-
VERSION
public static final int VERSIONVersion history: == Pre launch, removed == * Version 0: Initial version * Version 1: Fluids are no longer blocks. Extracted from PaletteChunkSection into FluidSection * Version 2: Deco blocks and support blocks removed and placed in BlockPhysics. * Version 3: Moved most data into a chunk section instead of column == Post launch == * Version 4: Moved heightmap to dedicated component- See Also:
-
CODEC
-
SEND_LOCAL_LIGHTING_DATA
public static boolean SEND_LOCAL_LIGHTING_DATA -
SEND_GLOBAL_LIGHTING_DATA
public static boolean SEND_GLOBAL_LIGHTING_DATA
-
-
Constructor Details
-
BlockChunk
public BlockChunk(int x, int z) -
BlockChunk
-
-
Method Details
-
getComponentType
-
load
public void load(int x, int z) -
clone
- Specified by:
clonein interfaceComponent<ChunkStore>- Returns:
- a clone instance of the original component instance.
-
cloneSerializable
- Specified by:
cloneSerializablein interfaceComponent<ChunkStore>- Returns:
- a clone instance of the original component instance.
-
getIndex
public long getIndex() -
getX
public int getX() -
getZ
public int getZ() -
setHeightmapColumn
-
hasLegacyHeightmap
public boolean hasLegacyHeightmap() -
takeLegacyHeightmap
-
loadFromHolder
Deprecated, for removal: This API element is subject to removal in a future version. -
refreshSectionRefs
@Deprecated(forRemoval=true) public void refreshSectionRefs(@Nonnull Holder<ChunkStore>[] sectionHolders) Deprecated, for removal: This API element is subject to removal in a future version.Refresh the cachedEnvironmentSectionreferences from the given section holders.The initial cache is populated during pre-load via
loadFromHolder(Holder). Cubic-chunk loads may leave slots empty during pre-load, and those slots are populated here from the now-installed components. -
getTint
public int getTint(int x, int z) -
setTint
public void setTint(int x, int z, int tint) -
readEnvironmentRuns
@Deprecated(forRemoval=true) public void readEnvironmentRuns(int x, int z, @Nonnull BlockChunk.EnvironmentRunCursor cursor) Deprecated, for removal: This API element is subject to removal in a future version.environments belong toEnvironmentSection. Read the runs of a resolved section withEnvironmentSection.readColumnRuns(int, int, EnvironmentSection.ColumnRuns)instead. This walks only the legacy 0..ChunkUtil.HEIGHTband.Binds the given cursor to the environment runs of one block column, bottom to top, with world y coordinates (0..ChunkUtil.HEIGHT- 1). Runs that continue across section borders are merged into one run.Reuse one cursor across many columns to keep the walk allocation free.
-
markNeedsSaving
public void markNeedsSaving() -
getNeedsSaving
public boolean getNeedsSaving() -
consumeNeedsSaving
public boolean consumeNeedsSaving() -
invalidateColumnPacket
public void invalidateColumnPacket()Drops the cached column packet so the next send rebuilds it from current state. Must be called when the column heightmap changes, because the cachedSetColumnembedsserializeToInts(), so without this a (re)tracking client is served a stale heightmap (e.g. an out-of-view island's true top reverting to the ground prediction). Tint edits invalidate inline. -
getCachedTintsPacket
-
EnvironmentSection.