Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Is it possible to get some form of world data from *.bcr files?

hamburgars opened this issue ยท 1 comments

commented

Hey, I had a friend who passed away a couple of years ago. I was playing on a server with him using Baritone and a few other mods (i still have all the mods) and I found some ".bcr" files that are dated just before his death, and we were playing together just before. Is it possible to get some kind of data from it, even a seed, or some block data or anything? Don't have the original world as it was hosted on a friends computer who reset his PC. Greatly appreciate your responses thanks. sorry if this is formatted poorly never have used this site much as a poster

commented

".bcr" files are the cache used to improve long distance pathing, so yes, there is some world data in them. Each of them contains the data for one region of 32 by 32 cached chunks, just like Minecraft stores world data in regions of 32 by 32 chunks. For each contained chunk they store

  1. The terrain broken down into AIR, SOLID, WATER and AVOID "blocks". If you interpret SOLID as stone, AVOID as lava and AIR and WATER as air and water respectively this gives a good approximation of the terrain.
  2. The topmost block of every xz column. Looking at the terrain from above this covers almost everything you can see, unless the terrain is/was covered by some transparent block.
  3. A list of locations of "special blocks" and what those blocks are. What's considered special has changed so I can't tell you exactly what's in there for your files. The current list for 1.12.2 is here.
    Unlike the other stored data this isn't entirely for pathfinding and includes a bunch of non-natural blocks like furnaces, crafting tables, chests etc.
  4. A timestamp when each chunk was last saved.

In case it is of use to you, here's the deserialization code. The serialization method is right above it in the same file.