Where is chest data stored?

Discussion in 'Plugin Development' started by Rprrr, Nov 19, 2012.

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

    Rprrr

    Hi,

    I was wondering where chest data is stored in a world's map.

    Is it in the level.data? Or is it stored in the region files? Or in some other file?

    Thanks in advance. :D

    Rprrr

    (This is not really a coding question but I do need this for a plugin.)
     
  2. Offline

    leiger

    Does this help?

    Code:
    Inventory inv = chest.getInventory();
    
     
  3. Offline

    Sushi

    Yeah, I think it's level.dat.
     
  4. Offline

    Rprrr

    No not really. :p Because I want to copy the chest files from a certain folder to replace the old chest files.
    I appreciate your help, though. :)

    Sushi
    Okay. :p I will test that. :D Thanks.

    Sushi Anyone

    Nope, it didn't work. I stored some stuff in the chests. Stopped the server, put those files somewhere. Then I turned on the server, looted the chests. Then I deleted the newest files (after I looted the chests) and put back the old files (before I looted the chests) and it didn't work. :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  5. Offline

    Comphenix

    It's stored in the region files. You can navigate the raw content of these files by using an NBT editor such as NBTExplorer.

    The chest inventories should be stored in Your World -> region -> r.(region x).(region z).mca -> Chunk -> Level -> TileEntities.

    So - it's probably easier to use a plugin, instead of working with the region files directly.
     
  6. Offline

    Rprrr

    Comphenix
    Hmm so it would be very hard to just copy those files and then paste them in the world.. right?
    You'd probably have write a code that can open such files if you'd only want to have the chests copied. :l

    Well, thanks for your help. :)
     
Thread Status:
Not open for further replies.

Share This Page