Staff posts regarding server development go here. Progress updates, ramblings, and more!
  • User avatar
  • User avatar
  • User avatar
  • User avatar
User avatar
By Intelli
#161032
Hey folks! In this post, I'll be adding Nether Quartz Ore to the Nether.

I'll be doing this based on my own suggestion, located here: http://minerealm.com/community/viewtopi ... 10&t=12606

So, let's get started.

May 15, 2013 - 9:20PM

The first thing that needs to be done is compare the terrain in the current Nether map, to a newly generated Nether using the same seed.

After throwing up the Dev server with the current MineRealm Nether, I'll be getting started by teleporting to x500/y100/z500, and taking a look.
Image

Time to compare a newly generated Nether at the same location...
Image

We're in luck! It's the same.

9:30PM

Now, the first thing I need to do is develop a plugin that will scan/generate a new Nether, map out the location of Nether Quartz Ore in that Nether, and then spawn the blocks in the existing Nether world.

Of course, we won't do that on the live map. Rather, we'll take down the MineRealm server, copy the Nether world to the development server, run the script, and if successful, copy the modified Nether back to the main server.

For developing the script though, we'll just be testing on an older copy of the Nether.

Starting Development

Now, although we're writing this in Java as a Bukkit plugin, it won't be used as a traditional plugin. Rather, we'll be having it so that when the server starts up, the plugin takes over the startup, does the Nether stuff, and then lets the server resume starting up. Basically, it'll lock up the server for however long it takes to complete.

First thing is setting up the workspace. I'll just copy an existing project, and rename the files as appropriate.
Image

Then, I'll throw in some initial code...
Image

After running a quick test, the code appears to be working properly.
Image

Pulling the Nether Quartz Ore...
Image

And spawn it in...
Image

That seemed easy. Time to test it.
Image

Completed in less than a minute :)

Let's login and take a look...
Image

Success! 10:15PM.

Well, that took less than an hour, and I was hardly rushing. The next step is, of course, putting this live on the server.

Putting it live.

First thing I'll do is delete the test worlds from the development server.
Image

Then, I'll enable a whitelist on MineRealm, shut down the server, copy the Nether, and start it back up. This will prevent people from making any changes in the map while we're doing the quartz import (although, in this situation, it won't take very long)

Time to give some warning...
Image

Next, I'll restart the server, and then run the conversion on the development server. Then, I'll back up the current Nether, and copy over the new Nether with Nether Quartz Ore.

I won't outline this with pictures, as you already saw it on the development server in the previous screenshots. So, jumping ahead...

Time to check the Nether on the main server...
Image

Everything seems to be working perfectly. Time to disable the whitelist, and restart the server.

Success!

Well, that was fairly easy, and only took about an hour, including writing this post while developing (although, I tried to keep the post fairly short).

Who knows though, maybe there's some crazy bug, such as half the Nether missing quartz ;)

Hopefully you guys enjoyed this look into the development of the server. In general, for these development posts, I'll be tracking development of things that haven't yet been pushed live to the server.

However, in this case, I saw no reason to make you guys wait any longer for Nether Quartz Ore, and put the change live before this post was published.

Thanks for supporting MineRealm!
User avatar
By dlgn
#161033
So that's what you've been up to, mad genius ours. Thanks for all the work you've (presumably) been putting in :D
By Prodigy9
#161036
This was exactly the kind of post I was hoping to see in this new "development" section. Thanks for sharing the process behind the new feature... and thanks again for the quartz :)
User avatar
By cobaya18
#161055
Lies.

just to protect the quartz...
By General Grievous
#189895
Wow... dear Master, would it be possible to provide us the full code, so that we, your followers, are able to write little programs that modify our single player worlds?

Many thanks,
A.
By General Grievous
#189916
OrigamiElephant wrote:You should be flogged for this...

Just PM him if you want to talk about coding. Don't necro a year old thread.
Dear OrigamiBullInAChinaShop,

The reason to write here in this forum is that there is the expectation that it could interest other players as well. Thus, under the assumption that you (now) understand the basic idea behind this forum, please stop trolling.

Regards,
A.

Please note: If you write something that nobody else might interest (like your posting), please use PM. Thanks for your cooperation. :)
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]