Class BlockChunk

java.lang.Object
com.hypixel.hytale.server.core.universe.world.chunk.BlockChunk
All Implemented Interfaces:
Component<ChunkStore>, Cloneable

public class BlockChunk extends Object implements Component<ChunkStore>
Since:
22.02.2016
  • Field Details

    • VERSION

      public static final int VERSION
      Version 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

      public static final BuilderCodec<BlockChunk> CODEC
  • Constructor Details

  • Method Details

    • getComponentType

      public static ComponentType<ChunkStore, BlockChunk> getComponentType()
    • clone

      public Component<ChunkStore> clone()
      Specified by:
      clone in interface Component<ChunkStore>
      Returns:
      a clone instance of the original component instance.

    • cloneSerializable

      @Nonnull public Component<ChunkStore> cloneSerializable()
      Specified by:
      cloneSerializable in interface Component<ChunkStore>
      Returns:
      a clone instance of the original component instance.

    • hasLegacyHeightmap

      public boolean hasLegacyHeightmap()
    • takeLegacyHeightmap

      @Nullable public ShortBytePalette takeLegacyHeightmap()
    • getTint

      public int getTint(int x, int z)
    • setTint

      public void setTint(@Nonnull WorldChunk column, int x, int z, int tint)
    • 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 cached SetColumn embeds serializeToInts(), 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

      @Nonnull public CompletableFuture<CachedPacket<SetChunkTintmap>> getCachedTintsPacket(int x, int z)