-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement biomes #44
Comments
Hello, thanks for the update. I was looking into also adding the new kinds of stone as found in the recent snapshots, but I'm not sure where to add it. Can you give me some pointers? Thanks. |
I don't know what stone has been added in the recent snapshots, but whatever you do want to add has to be added to pymclevel first, and then the pymclevel submodule in the TopoMC repository has to be updated. Here's a different example: let's say you wish to create a Minecraft world where all the water is transformed into packed ice as if ice-9 from Kurt Vonnegut's "Cat's Cradle" was released. The first problem is that TopoMC's version of pymclevel doesn't know what packed ice is -- but the master branch of pymclevel does. So after reading a bunch of web pages about how git submodules suck and calling me names in your head, you figure out how to update the pymclevel checkout, something like this:
Once you're done with that, you open up terrain.py and look it over. You will eventually come across the method Terrain.placewater: @staticmethod
def placewater(x, y, z, crustval, bathyval):
# NB: no longer valid for 12!
newcrustval = int(max(0, crustval-(bathyval/2)))
return (y, [(newcrustval, 'Sand'), (bathyval, 'Water')], None) I no longer remember what that comment's about. Oops. Anyway. All you need to do is replace 'Water' with 'Packed Ice'. Now when water is placed on the map, packed ice will be placed instead. The same technique can be used for placing new types of stone. Were it me, I'd look at these lines and replace individual references to 'Stone' with the new types of stone: # schematic defaults
# 21: 10%, 22: 35%, 23: 65%, 24: 90%, 25: 95%
layout21 = [[[(1, 'Stone' if random() < 0.1 else 'Grass')] for x in xrange(10)] for x in xrange(10)]
layout22 = [[[(1, 'Stone' if random() < 0.35 else 'Grass')] for x in xrange(10)] for x in xrange(10)]
layout23 = [[[(1, 'Stone' if random() < 0.65 else 'Grass')] for x in xrange(10)] for x in xrange(10)]
layout24 = [[[(1, 'Stone' if random() < 0.90 else 'Grass')] for x in xrange(10)] for x in xrange(10)]
layout25 = [[[(1, 'Stone' if random() < 0.95 else 'Grass')] for x in xrange(10)] for x in xrange(10)] Just make sure you really like whatever you put in layout24 and layout25. :-) This effort will collide with the changes I will be making -- I may use a different pymclevel checkout and the changes in the Terrain class I mention above may interfere as well -- but you should be good to go! Jack. |
The latest version of pymclevel supports biomes and has nearly twice as many types of blocks as the previous version I was using. References #44.
Ubuntu's packages of GDAL are a little wacky, but I found and documented a workaround. Added virtualenv to the instructions. Roses are out, poppies are in. Crops are out, wheat is in. Leaves and wood are no longer generic. There are other significant changes internal to pymclevel, and it may be necessary or prudent to rewrite TopoMC due to the magnitude of these changes. References #44
This is part of the virtualenv stuff, but I forgot. References #44
This will be harder than I expected. A lot more changed in pymclevel than I thought. |
Ok. thanks a lot for checking it out. I'll see what I can do, but this is Keith Dart [email protected]On Sun, Jun 1, 2014 at 9:00 PM, Jack Twilley [email protected]
|
Minecraft added biomes in 1.7.2. Looks like I should do the same.
Short-term fix: update the pymclevel checkout, that should at least provide placeholder values.
Long-term fix: separate the Terrain class into two classes, one that deals with file data and one that actually populates the Minecraft world. Call the latter class Biome. Start with ocean and plains. See what happens.
Future possibilities: Use additional data: specifically, temperature and/or climate data would really help. May need additional geek knobs for month and/or year. Shame Minecraft won't let you change biomes in realtime so you can have seasons. Bravo can, at least...
The text was updated successfully, but these errors were encountered: