'Repairing' the region chunk files

Discussion in 'Plugin Development' started by bergerkiller, Sep 6, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    bergerkiller

    I figured it would be useful to add this feature to MyWorlds, since most damaged-related errors are a single (small) chunk file being damaged. You can still read data from it, till the point of blank data.

    Where is the MCRegion loader located in (Craft)Bukkit? I could go and develop my own through lots of testing and the WIKI page, but it would be more reliable to use the actual (modified) loader to do this.
     
  2. Offline

    zhuowei

  3. Offline

    bergerkiller

    Mhh thanks, lost the link to that repositry a while ago...only problem...what class file is it in. It could be in the World, WolrdServer, ChunkLoader, WorldChunkmanager etc and not even sure where to look...kinda where I ended up stuck.

    EDIT

    Aaah think I got it, RegionFile.java

    EDIT2

    Ok I now know how to use it, figures I don't even need to load anything myself. All I have to do is load the region file and try to access all datastreams returned by a(chunkX, chunkZ); (ranging from 0 to 31). I'll only have to check if it's null and rewrite it back to file again.
     
Thread Status:
Not open for further replies.

Share This Page