Assorted Geekery

A World Corrupted

It was all going so well. As Rich described, we’d rolled a new world and spawned in a grassy, fertile plain: the ideal building site for the large walled town we envisioned. We even had a large open ravine right on the fringes for extracting the neccessary resources. A week later we’d flattened the ground, built our homes and sown large fields of wheat, sugar and pumpkins. We’d even embarked on several community projects, such as an Ancient-Greece-styled temple to house our nether portal and enchanting table, a park, walls, towers and redstone powered city gates. The area was almost unrecognizable.


The Blank Canvas


A Week Later

 

View from the Town Walls towards Rich’s House and the Temple. Watchtower on the Mountain in the distance.


Another nice shot from the Town Walls. My House is to the left nesxt the Sugar Farm. Jo’s house is on the the right, behind the Corn/Pumpkin Field and next to the Animal Pen. The wooded area in the distance on the left is the Park I built on the default spawn.

With everything going well Jo started work on the canal system we had planned. Our city was between two rivers and we’d decided to link the two via a lake that would eventually be bought within the city boundary. This is when things started to go wrong. One day we logged in and noticed that as we were playing this lake was suddenly starting to freeze over. We also noticed that the grass colour had subtley changed.

Huh? This made no sense to us. When a Minecraft map is generated it divides it up into areas with different climates and terrain types called Biomes. Frozen water should only occur within areas that are part of a Taiga or Tundra biome. Our town was located in a Plains biome, and for our water to be freezing where it previously wasn’t suggested that the biome boundaries had somehow shifted. As the snow begun to fall on our previously cosy settlement I hit Google for an answer. 

It didn’t take long to find. The problem turned out to be that our world’s “seed” had somehow either changed or become corrupted. The seed is a long digit that Minecraft throws into its terrain generating algorithms when it creates the initial world, or any new terrain as your explore. It also uses this every time it reloads the level to determine where the biome boundaries are. The seed is what makes each world unique. Because our world’s seed was now incorrect, it was using the terrain it had generated previously but with the wrong biome “overlay”. Apparently this is a fairly common glitch, especially in multiplayer.

However the implications were more severe than incorrect climates. One of the best things about Minecraft is that the world size is almost infinite. As soon as you move off the edge of the initially created world, it generates new terrain on the fly. However because this generating process is based on the world seed, this would now mean that any newly explored areas wouldn’t “join” correctly with our existing boundaries. We had been so focused on building our town that we hadn’t explored very far so, I decided to go see how bad it was. Perhaps we could tolerate a few rough edges? (It seems ridiculous now, but we were quite fond of our little town by now)

Ick! An example of what I found. This is a boundary between old and new terrain. The terrain heights clearly don’t match and you can see where the newly generated desert cuts through an old swamp. Despite the fact that the tree is clearly originally from a swamp (note the vines) both it and the grass now use the vegetation colourings from the adjacent desert, because the same biome overlay is being cast over both. The water is also now clear instead of murky.

So how can we fix it? The short answer is you cant unless you know what your old seed was. By opening up our level.dat file and manually inputting the correct seed we could theoretically restore the old biome boundaries. We would now also need to use a level editor to delete any chunks generated off the bad seed. Unfortunately the server had automatically saved the level.dat file and overwritten the old seed with the bad one. Since the server was a week old we hadn’t taken a back-up, and we’d used a randomly generated seed so no one knew what is was. In short, our world (the imaginatively titled “Tom1”) was screwed and we had to reroll.

If there is a positive side to this story its that we learnt this lesson after only a week. As great as our town was, it hadnt taken anywhere near as long to put together as we’d thought it might. Having fallen afoul of this glitch I made sure the second time around that it couldn’t happen again. There are actually quite a few ways to safeguard against it  once you are aware of the danger:

  • I chose the seed for our new world myself, and made it something memorable: “SpecialFriedDice”.
  • I took an immediate backup of the world after I created it and stored in a separate folder.
  • As soon as I spawned in the new world I hit F3 to bring up the HUD and took a screenshot.
  • In the server properties file I set the level-seed parameter to the same as  our level.dat file to force the correct seed even if the world seed changes.

 

And that is the end of this sorry little tale.

 

RIP Tom1

Viva SpecialFriedDice!