New Minecraft world format

This forum is for anything that doesn't specifically have to do with Better Than Wolves
Post Reply
User avatar
Urian
Posts: 1691
Joined: Tue Jul 05, 2011 3:11 am
Location: Finland

New Minecraft world format

Post by Urian »

http://www.mojang.com/2012/02/14/new-mi ... mat-anvil/
The full post:

Hello!

Jon and I have been working on a new map format for Minecraft that we’ve dubbed “Anvil” (it’s just a name). The purpose of the new format is to prepare for modding, especially to allow for more block types, but also to improve other areas of the game (such as map height). The changes are:

Maximum build height has been increased to 256 (was 128)
Empty sections of the world are not loaded into memory
Block ids have been increased to 4096 (was 256) by adding a 4 bit data layer (similar to how meta data is stored)
Block ordering have been changed from x/z/y to y/z/x in order to improve compression
Packets for sending chunks have been updated (a full 128-high chunk is smaller than the old format, and a chunk with lots of empty space is much smaller)
Biomes are saved per x/z column, which means they can be altered by tools

The next snapshot, and Minecraft 1.2, will automatically convert worlds to the new format. The files of the current format (“McRegion”) will remain in your save folder, if you need to restore them for some reason.

I’ve prepared a converter (with source code) for tool makers that wants to be prepared. You do not need to use this to convert your maps! It’s only for reference!

Download the converter+source here

Some info:

The 16x128x16 “Blocks”, “Data”, “SkyLight” and “BlockLight” tags are removed
A “Sections” tag has been added with up to 16 compound tags
Each section has 16x16x16 “Blocks”, “Data”, “SkyLight” and “BlockLight” tags
Each section has a “Y” integer tag saying which section it is (note that some Y positions can be skipped). 0 is at the bottom of the world and 15 is the topmost section
Each section also has a “AddBlocks” tag, which is a DataLayer byte array just like “Data”. The “AddBlocks” tag is not included in the converter since the old format never had block ids above 255. This extra tag is created whenever a block requires it, so the getTile() method needs to check if the array exists and then combine it with the default block data. In other words, blockId = (addBlock << 8) + baseId.
Each chunk has a 16×16 byte array with biome ids called “Biomes”. If this array is missing it will be filled when the game starts. The converter doesn’t include any biome sources, though (it had too many dependencies to be included).
Note that the old format is XZY and the new format is YZX (see the difference between DataLayer and OldDataLayer).
The new format uses the extension “.mca” instead of “.mcr” (the old format is kept for safety, with the level.dat backed up as “level.dat_mcr”)

Finally, a shoutout to Robinton’s hard work on his mods: http://www.minecraftforum.net/topic/310 ... tons-mods/

Cheers,

// jeb_
Looks like there will be some major changes. A vastly increased blockID section might sound good at first but combined with the doubling of the height I'm kinda worried how it will affect performance. Perhaps some of the other changes will make it run smoother or offset some of the changes but my knowledge of such things is quite lacking. :)
FlowerChild: Ice in deserts is a good idea
bmanfoley
Posts: 170
Joined: Thu Aug 04, 2011 10:10 pm

Re: New Minecraft world format

Post by bmanfoley »

Dear god... 4096 block IDs... This is wonderful
DaWhiskers
Posts: 66
Joined: Fri Jul 29, 2011 5:39 am

Re: New Minecraft world format

Post by DaWhiskers »

Although the additional block space may be welcome, as well as the vertical limit increase, its concerning to see that the mods these changes are based upon are currently using the Forge.
User avatar
Mac
Posts: 251
Joined: Thu Sep 29, 2011 7:18 pm
Location: Northwest Germany

Re: New Minecraft world format

Post by Mac »

I agree, lets wait and see what someone who knows how these changes might play out and effect each other and the overall performance.
DaWhiskers wrote:Although the additional block space may be welcome, as well as the vertical limit increase, its concerning to see that the mods these changes are based upon are currently using the Forge.
Didn't knew bit of info. But could maybe someone provide some sort of source, so one can check
and see for himself.
My Youtube channel.

Image
SilvasRuin
Posts: 68
Joined: Thu Feb 02, 2012 1:13 pm

Re: New Minecraft world format

Post by SilvasRuin »

DaWhiskers wrote:Although the additional block space may be welcome, as well as the vertical limit increase, its concerning to see that the mods these changes are based upon are currently using the Forge.
Keywords there are "based upon." 1. It's nonsensical to think that Minecraft will in any way require Forge use. 2. Forge (and things similar to it) is NOT inherently bad and from what I've gathered, FlowerChild would tell you that as well. He didn't part with Forge because a compatibility API is a bad thing. He parted with it, if I understand it correctly, because it was more concerned with enhancing the use of one or more of its collective mods than it was with timely updates and more generalized usefulness; that it was playing favorites at the expense of the modding community as a whole.
User avatar
Flesh_Engine
Posts: 348
Joined: Tue Jul 05, 2011 2:35 am
Location: Belgium (teh horror)

Re: New Minecraft world format

Post by Flesh_Engine »

DaWhiskers wrote:Although the additional block space may be welcome, as well as the vertical limit increase, its concerning to see that the mods these changes are based upon are currently using the Forge.
Yes, the fact that the new format is called "Anvil" made me chuckle a bit then a tad sad.
"An engine of flesh can do that..." // "Man feed Machine. Machine feed Man..."
DaWhiskers
Posts: 66
Joined: Fri Jul 29, 2011 5:39 am

Re: New Minecraft world format

Post by DaWhiskers »

Mac wrote:I agree, lets wait and see what someone who knows how these changes might play out and effect each other and the overall performance.
DaWhiskers wrote:Although the additional block space may be welcome, as well as the vertical limit increase, its concerning to see that the mods these changes are based upon are currently using the Forge.
Didn't knew bit of info. But could maybe someone provide some sort of source, so one can check
and see for himself.
The link in the OP has the original mods the expansion is based upon, which are forge based (look at their required mods)

SilvasRuin wrote:
DaWhiskers wrote:Although the additional block space may be welcome, as well as the vertical limit increase, its concerning to see that the mods these changes are based upon are currently using the Forge.
Keywords there are "based upon." 1. It's nonsensical to think that Minecraft will in any way require Forge use. 2. Forge (and things similar to it) is NOT inherently bad and from what I've gathered, FlowerChild would tell you that as well. He didn't part with Forge because a compatibility API is a bad thing. He parted with it, if I understand it correctly, because it was more concerned with enhancing the use of one or more of its collective mods than it was with timely updates and more generalized usefulness; that it was playing favorites at the expense of the modding community as a whole.
Just to put my thoughts into responding to your comments

1: The speed of the development for both the height extension and the block expansion are more alligned to the "modification" of the Forge components than a complete re-write from scratch, and as such may require alot more work for mods to 'Play nicely'. The general speed of development from Mojang, and the quantity of bugs (both fixed and still open) dont really highlight the current dev team being of FC's caliber or industry experience when it comes down to programing, again highlighting I believe its going to be more of a 'borrowing and adapting of source code' than a new method.

2: I agree, feature rich API's make any development/mods/add-ins a hell of alot easier to use, but seeing as the mod has been partially focussed on removing those particular dependancies, its only going to promote the "But Mojang use forge, make your mod compatible nao" crap. As well as the mod re-writing to put back in functionality, previously removed after being previously put in (that kind of yo-yo programing can soon lead to despondency from any programmer, which is the last thing I personally would like to see happen to this great mod).
SilvasRuin
Posts: 68
Joined: Thu Feb 02, 2012 1:13 pm

Re: New Minecraft world format

Post by SilvasRuin »

Whatever Mojang does, it still avoids mod updates being delayed by waiting on an API to update after a Minecraft update... because it outright skips the middle step. It simply cannot, by its nature, have one of the problems FlowerChild had with Forge, and that is causing the gap between Minecraft updates and mod updates to become wider than necessary.

Additionally using Forge tricks that are legitimately effective or good is... well, not a bad thing. Would you rather they not implement such things at all? Yes, people might look at this and say "Mojang likes the Forge, why don't you?" but somehow I don't think FlowerChild is the kind of person who is bothered or swayed by that kind of talk. And let's be honest here, that statement attempts to make a connection that is irrelevant. I'm a bit tired right now and have a hard time articulating, but right now I'd describe someone who would actually attempt to make that argument as short-sighted and missing the point. (To be clear, talking about someone who'd try using that hypothetical argument, not talking about you.)

What this really does is free FlowerChild up to use however Mojang decided to implement these features and thus reap their benefits without having to use anything from the Forge at all, at least for those specific purposes. He's already noted this in another thread. This allows him to further divorce himself from the Forge while still being able to use modding tools/foundations that previously had only been available through the Forge itself. That Mojang is implementing these specific modding tools/foundations without any of the fat or crap the rest of the Forge may be made up of also means that it winds up truer to FlowerChild's original vision for the Forge.

In other words, the only harm I see coming from this is an association that shouldn't be considered significant beyond the inspiration or creation of a small amount of very specific features. An insignificant association that pales in comparison to the benefits it provides. Just brush aside people who insist the association means that the Forge as a whole should be universally excepted. Such people are reading too far into things and jumping to conclusions that they aught not jump to, as well as stuffing words into Mojang's mouths. Such people should be merely brushed aside and not be considered a concern.
User avatar
Camerinthus
Posts: 294
Joined: Wed Jul 20, 2011 4:06 pm
Location: New York (Not the city)

Re: New Minecraft world format

Post by Camerinthus »

I'm very worried about this. It sounds really cool, but for many people (myself included), the drop in performance might be too great to be able to play well. I'm going to have to upgrade my computer... for real. Eww.

But this does sound very exciting. One can be a lot more lenient about using up block IDs now that we have (or will have) 4096 of them. Hopefully performance won't drop that badly..
IGN: Camerinthus
SilvasRuin
Posts: 68
Joined: Thu Feb 02, 2012 1:13 pm

Re: New Minecraft world format

Post by SilvasRuin »

I'm hoping the other improvements manage to counterbalance the block ID's and increased height. Only way to find out is to wait for the snapshot...
Thieme
Posts: 116
Joined: Tue Jul 05, 2011 1:55 am

Re: New Minecraft world format

Post by Thieme »

I am very excited about this change. I also agree with SilvasRuin that this isn't a bad thing. At least i don't think Jeb is going to add in any redpower hooks into vanilla MC.
It also seems Jeb is going to or already has implemented more texture sheets to accomodate the higher blockId's.
@MatthewJamesSwe I need to make it possible to have more than one texture sheet first. Eloraam is helping
http://twitter.com/#!/jeb_/status/169168956714782722
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: New Minecraft world format

Post by Stormweaver »

Looking through the twitter (when the hell did twitter become weird? Looked normal yesterday) It's saying that it'll be saving performance by not loading any empty spaces; my guess is that they mean the 16x16x16 cubes of air above ground level. Either way, Jeb actually thinks we'll have better performance, so...

I guess we'll see. This is a good move on mojang's part guys, or at least it can be assumed as one until testing the snapshot tomorrow.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
User avatar
lostone1993
Posts: 206
Joined: Thu Oct 06, 2011 9:06 pm
Location: NSW, Australia

Re: New Minecraft world format

Post by lostone1993 »

I am abit worried about higher memory usage but I will wait and see with that, but I see one problem with the increased block id that may result is with modding could become lazy (not sure if correct word) as in how modders like Flower Child for example try to use minimal Block ID's for most functionality, well with the increase of id's it might mean that most modders start using alot more block ids for things that could be done with less

Assuming you still understand what I mean or if you don’t a sentence to sum it up minecraft mods might become bloated with blocks with little functionally

also The config will be a pain in the rear end

but I will wait and see I think
Under many names
lost-one
Spoiler
Show
Image
My Youtube
My WIP Fan Mission for SS2(youtube)
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: New Minecraft world format

Post by FlowerChild »

He seems to be doing this hand in hand with optimization to avoid it causing performance problems guys. I think "wait and see" is the best policy there.

As for Forge in MC or whatever, I really wouldn't have a problem with the entire Forge being duplicated into the MC code-base. I have no problem with the Forge, just with collaborating with one of its members. The "bloated" aspect of what it is becoming is also not of a concern to me if it is integrated into the code-base, as the "bloat" involves the number of changes made to that code-base. If they become part of the code-base itself, that bloat disappears.

I can't speak for it now, but up until the point I left, the code was always of a rather high quality in the Forge. Again, I never had a problem with that.
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: New Minecraft world format

Post by dawnraider »

lostone1993 wrote:I am abit worried about higher memory usage...
I used Robinton's cubic chunks (which this is based off of I assume by the link to it in jeb's post) back in 1.7, and I didn't have any problems with speed. Although, speed has been going down every vMC update, so I'm not sure how this will turn out.

I'm not so sure about how the new biome storage system will work out, though. I'm hoping it doesn't have a major impact.
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: New Minecraft world format

Post by finite8 »

*strolls into thread with head down, shamed by his previous topic re-posting actions*

Any action Mojang makes to properly support modding is a good thing. It means they are recognizing that they should just keep hiding behind the "Mod at your own risk" and properly embrace a large part of the community that has added a lot of love for the game. I know that having solely relied on Vanilla MC, i would have abandoned it long ago.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
Poppycocks
Posts: 825
Joined: Thu Dec 22, 2011 2:11 pm

Re: New Minecraft world format

Post by Poppycocks »

Yeah, I hope all of the forge hooks ('cept the coverplates bloat(seriously though, she should make RP base a base class mod, would be better for everyone)) make it into vanila.

I'd probably do a victory dance or something. (You see, I had my eye on a couple of forge mods for quite some time...)

As far as the Cubic Chunk goes, I love the idea. Never tried it, BUT I do believe worlds should be higher than 128. Technical difficulties aside, I believe that this has the potential to really push Minecraft further.
User avatar
Blueblade11
Posts: 347
Joined: Tue Sep 27, 2011 9:03 pm

Re: New Minecraft world format

Post by Blueblade11 »

4096 Blocks, 4096 Blocks, 4096 Blocks...

Mind == Blown.
255 Characters Limit? D:
Image
http://www.minecraftforum.net/topic/941586- viewtopic.php?f=11&t=3117
I don't want to go back to MCF! Even if I do stupid things here 90% of the time!
User avatar
Poppycocks
Posts: 825
Joined: Thu Dec 22, 2011 2:11 pm

Re: New Minecraft world format

Post by Poppycocks »

Blueblade11 wrote:4096 Blocks, 4096 Blocks, 4096 Blocks...

Mind == Blown.
Meh.

I'd rather have a new block system which would allow for variations. So that you could have coal in dirt, coal in grass, gold in gravel.... Increasing the limit will only serve to have it filled up faster.
Post Reply