Interface Chunk

All Superinterfaces:
BlockView, StructureHolder
All Known Implementing Classes:
EmptyChunk, ProtoChunk, ReadOnlyChunk, WorldChunk

public interface Chunk
extends BlockView, StructureHolder
Represents a scoped, modifiable view of biomes, block states, fluid states and block entities.
  • Method Details

    • setBlockState

      @Nullable BlockState setBlockState​(BlockPos pos, BlockState state, boolean moved)
    • setBlockEntity

      void setBlockEntity​(BlockPos pos, BlockEntity blockEntity)
    • addEntity

      void addEntity​(Entity entity)
    • getHighestNonEmptySection

      @Nullable default ChunkSection getHighestNonEmptySection()
    • getHighestNonEmptySectionYOffset

      default int getHighestNonEmptySectionYOffset()
    • getBlockEntityPositions

      Set<BlockPos> getBlockEntityPositions()
    • getSectionArray

      ChunkSection[] getSectionArray()
    • getHeightmaps

    • setHeightmap

      void setHeightmap​(Heightmap.Type type, long[] heightmap)
    • getHeightmap

      Heightmap getHeightmap​(Heightmap.Type type)
    • sampleHeightmap

      int sampleHeightmap​(Heightmap.Type type, int x, int z)
    • getPos

      ChunkPos getPos()
    • setLastSaveTime

      void setLastSaveTime​(long lastSaveTime)
    • getStructureStarts

      Map<StructureFeature<?>,​StructureStart<?>> getStructureStarts()
    • setStructureStarts

      void setStructureStarts​(Map<StructureFeature<?>,​StructureStart<?>> structureStarts)
    • areSectionsEmptyBetween

      default boolean areSectionsEmptyBetween​(int lowerHeight, int upperHeight)
    • getBiomeArray

      @Nullable BiomeArray getBiomeArray()
    • setShouldSave

      void setShouldSave​(boolean shouldSave)
    • needsSaving

      boolean needsSaving()
    • getStatus

      ChunkStatus getStatus()
    • removeBlockEntity

      void removeBlockEntity​(BlockPos pos)
    • markBlockForPostProcessing

      default void markBlockForPostProcessing​(BlockPos pos)
    • getPostProcessingLists

      ShortList[] getPostProcessingLists()
    • markBlockForPostProcessing

      default void markBlockForPostProcessing​(short short2, int int2)
    • addPendingBlockEntityTag

      default void addPendingBlockEntityTag​(CompoundTag tag)
    • getBlockEntityTag

      @Nullable CompoundTag getBlockEntityTag​(BlockPos pos)
    • getPackedBlockEntityTag

      @Nullable CompoundTag getPackedBlockEntityTag​(BlockPos pos)
    • getLightSourcesStream

      Stream<BlockPos> getLightSourcesStream()
    • getBlockTickScheduler

      TickScheduler<Block> getBlockTickScheduler()
    • getFluidTickScheduler

      TickScheduler<Fluid> getFluidTickScheduler()
    • getUpgradeData

      UpgradeData getUpgradeData()
    • setInhabitedTime

      void setInhabitedTime​(long inhabitedTime)
    • getInhabitedTime

      long getInhabitedTime()
    • getList

      static ShortList getList​(ShortList[] lists, int index)
    • isLightOn

      boolean isLightOn()
    • setLightOn

      void setLightOn​(boolean lightOn)