Class BaseRegionLoader

java.lang.Object
cn.nukkit.level.format.generic.BaseRegionLoader
Direct Known Subclasses:
RegionLoader

public abstract class BaseRegionLoader extends Object
Author:
MagicDroidX (Nukkit Project)
  • Field Details

  • Constructor Details

    • BaseRegionLoader

      public BaseRegionLoader(LevelProvider level, int regionX, int regionZ, String ext)
  • Method Details

    • compress

      public void compress()
    • getRandomAccessFile

      public RandomAccessFile getRandomAccessFile()
    • isChunkGenerated

      protected abstract boolean isChunkGenerated(int index)
    • readChunk

      public abstract BaseFullChunk readChunk(int x, int z) throws IOException
      Throws:
      IOException
    • unserializeChunk

      protected abstract BaseFullChunk unserializeChunk(byte[] data)
    • chunkExists

      public abstract boolean chunkExists(int x, int z)
    • saveChunk

      protected abstract void saveChunk(int x, int z, byte[] chunkData) throws IOException
      Throws:
      IOException
    • removeChunk

      public abstract void removeChunk(int x, int z)
    • writeChunk

      public abstract void writeChunk(FullChunk chunk) throws Exception
      Throws:
      Exception
    • close

      public void close() throws IOException
      Throws:
      IOException
    • loadLocationTable

      protected abstract void loadLocationTable() throws IOException
      Throws:
      IOException
    • doSlowCleanUp

      public abstract int doSlowCleanUp() throws Exception
      Throws:
      Exception
    • writeLocationIndex

      protected abstract void writeLocationIndex(int index) throws IOException
      Throws:
      IOException
    • createBlank

      protected abstract void createBlank() throws IOException
      Throws:
      IOException
    • getX

      public abstract int getX()
    • getZ

      public abstract int getZ()
    • getLocationIndexes

      @Deprecated @DeprecationDetails(since="1.4.0.0-PN", by="PowerNukkit", reason="Unnecessary int-boxing causing heap pollution", replaceWith="getIntLocationIndexes()") public Integer[] getLocationIndexes()
      Deprecated.
    • getIntLocationIndexes

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int[] getIntLocationIndexes()