Class ChunkProviderServer

java.lang.Object
net.minecraft.src.ChunkProviderServer
All Implemented Interfaces:
IChunkProvider

public class ChunkProviderServer extends Object implements IChunkProvider
  • Field Details

    • loadChunkOnProvideRequest

      public boolean loadChunkOnProvideRequest
      if this is false, the defaultEmptyChunk will be returned by the provider
  • Constructor Details

  • Method Details

    • chunkExists

      public boolean chunkExists(int par1, int par2)
      Checks to see if a chunk exists at x, y
      Specified by:
      chunkExists in interface IChunkProvider
    • unloadChunksIfNotNearSpawn

      public void unloadChunksIfNotNearSpawn(int par1, int par2)
      marks chunk for unload by "unload100OldestChunks" if there is no spawn point, or if the center of the chunk is outside 200 blocks (x or z) of the spawn
    • unloadAllChunks

      public void unloadAllChunks()
      marks all chunks for unload, ignoring those near the spawn
    • loadChunk

      public Chunk loadChunk(int par1, int par2)
      loads or generates the chunk at the chunk location specified
      Specified by:
      loadChunk in interface IChunkProvider
    • provideChunk

      public Chunk provideChunk(int par1, int par2)
      Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the specified chunk from the map seed and chunk seed
      Specified by:
      provideChunk in interface IChunkProvider
    • populate

      public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
      Populates chunk with ores etc etc
      Specified by:
      populate in interface IChunkProvider
    • saveChunks

      public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
      Two modes of operation: if passed true, save all Chunks in one go. If passed false, save up to two chunks. Return true if all chunks have been saved.
      Specified by:
      saveChunks in interface IChunkProvider
    • saveExtraData

      public void saveExtraData()
      Save extra data not associated with any Chunk. Not saved during autosave, only during world unload. Currently unimplemented.
      Specified by:
      saveExtraData in interface IChunkProvider
    • unloadQueuedChunks

      public boolean unloadQueuedChunks()
      Unloads chunks that are marked to be unloaded. This is not guaranteed to unload every such chunk.
      Specified by:
      unloadQueuedChunks in interface IChunkProvider
    • canSave

      public boolean canSave()
      Returns if the IChunkProvider supports saving.
      Specified by:
      canSave in interface IChunkProvider
    • makeString

      public String makeString()
      Converts the instance data to a readable string.
      Specified by:
      makeString in interface IChunkProvider
    • getPossibleCreatures

      public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
      Returns a list of creatures of the specified type that can spawn at the given location.
      Specified by:
      getPossibleCreatures in interface IChunkProvider
    • findClosestStructure

      public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5)
      Returns the location of the closest structure of the specified type. If not found returns null.
      Specified by:
      findClosestStructure in interface IChunkProvider
    • getLoadedChunkCount

      public int getLoadedChunkCount()
      Specified by:
      getLoadedChunkCount in interface IChunkProvider
    • getCurrentChunkProvider

      public IChunkProvider getCurrentChunkProvider()
    • recreateStructures

      public void recreateStructures(int par1, int par2)
      Specified by:
      recreateStructures in interface IChunkProvider
    • getCurrentProvider

      public IChunkProvider getCurrentProvider()
    • isSpawnChunk

      protected boolean isSpawnChunk(int iChunkX, int iChunkZ)
    • forceAddToChunksToUnload

      public void forceAddToChunksToUnload(int iChunkX, int iChunkZ)