Or maybe an input file.) Soonish I want to be able to get, put or delete keys from command line or API.Press question mark to learn the rest of the keyboard shortcuts Log In Sign Up User account menu 10 Reading.mcworld files with Go.I tweaked and used a Go implementation of LevelDB to read a few raw keyvalue pairs from the db folder of an.mcworld file exported from MCPE (Win10 edition).I see that there is an MCEdit fork that can readwrite.mcworld files, but I was thinking of something more basic (and faster).
Are there other viable world editors for MCPE worlds I dont really expect to get anywhere with this idea, but I wanted to at least see if I could read some world data. For some reason, MS used LevelDB but with a different type of compression inside the DB. Instead of trying to get their modified LevelDB library to work I wanted to see if this Go LevelDB implementation could work. It didnt out of the box, but I made a relatively minor tweak to the code, and to my happy surprise it worked Interpreting the data should now be a matter of reading the specs. I havent looked into writing changes or generating new worlds yet. Mcworld File Converter Zip The McworldAlso, at this point you have to manually unzip the mcworld db files. But its a start. Here is the code that reads some keys: package main. Now to figure out what I want to do with this.some ideas include getting stats on how much ore is in the area, perhaps displaying a world map of some sort, perhaps some programmatic world editing like placing spheres or rectangles of blocks in the map, etc., etc. Update edit: The goleveldb fork now works without having to move, pull or rename anything, and the McpeTool project is a command-line tool that can print out all the db keys ( McpeTool keys pathtodb ) and has some issues outlining future enhancement targets. Update edit 2: The goleveldb fork can now write, and it works Here is a screenshot of a diamond block column written into a survival mode game. There is a long way to go to make this useful to anyone else, but I have now proved the basic building blocks I need of reading data and writing data in such a way that is playable in the game. Upvoted This thread is archived New comments cannot be posted and votes cannot be cast Sort by best. It looks like someone already has a Go Anvil reader including a documented nbt readerwriter which may help me immediately as I was trying to use another library to read the nbt-coded player data and failing. The project has no stars, but the author seems to have other highly-starred projects, so its worth trying to use. ![]() So here it is: McpeTool. This is simply the same code as in OP; I just made this GitHub repo, and thats where any future changes will go.) 1 Share Report Save level 2 Original Poster 4 years ago I updated OP to show my latest progress: writing a diamond block column into a survival game (it goes all the way from the bottom void to the top void). Problem 1: Anvil chunks are 256 blocks high and MCPE chunks are 128 blocks high. ![]() Share Report Save level 1 Original Poster 4 years ago Ive made a lot of progress I want to share. The code is available, but its not quite ready for everyone to use yet. Soon youll be able to McpeTool api pathtoworld and then use any web clients to access localhost:8080 and read or write world data. That way anybody in any language can read and write world data in whatever manner they please. Currently the tool can list keys in command line or API, and get or delete keys in command line. Put key in command line is tricky because of parameter size limits.Ill have to use stdin I think.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |