When biomes were officially added to Minecraft, the first thing most people in the modding community realized is that they're not stored anywhere. Adding biome-specific coloration seemed to be a non-starter. No longer!
About
Introducing Minecraft Biome Extractor! MBE is a cross-platform java program that taps into the biome generation code of Minecraft and outputs the color location on the "grasscolor.png" or "foliagecolor.png" for each block of a given map. Thus allowing mapping programs to paint their maps with biome-specific colors.
Usage
The JAR works both as a graphical interface and as a command line tool, making it suitable for scripts and end users.
Interface:
1.) Double-click the jar (or run it from the command line with no arguments)
2.) Select the world you want to extract biomes for
3.) Press Go and wait for "Done!"
4.) Use a supported mapper to create maps with biome colors!
Command Line Typical Usage:
java -jar MinecraftBiomeExtractor.jar -nogui world_folder [-flush]
You can map over and over without rerunning the program unless your world boundaries expand. Then you will need to rerun. MBE will skip over previously extracted chunks, so it'll be much faster.
The "Clear Cache" option in the GUI and the "-flush" optional flag on the command line delete any existing extracted biome data before starting. Use this if you suspect the extracted data has become corrupted, your random seed has changed, or Notch has changed the biome generation code and you wish to fully regenerate the map's biomes.
Supported Mappers mcmap by Zahl MCMap Live (wrapper for mcmap) by Donkey Kong (MBE is integrated, no need to download this)
Minecraft Overviewer by Andrew Brown
Requirements
Minecraft Client installed (will process server maps just fine)
Java Runtime Environment v1.5 (if you can run Minecraft, you have this)
Tested and working under Windows, Mac OS X (10.5+). Should work fine under Linux.
Link Removed
Older versions: Link Removed Link Removed Link Removed Link Removed Link Removed
After a user has run Minecraft Biome Extractor, the folder "biomes" appears inside the world folder, alongside the level.dat and the "region" folders. Minecraft leaves the folder alone. Any sane mapper should ignore the files inside as they look nothing like chunk files. All biome values are located in files inside.
Each file contains an 32x32 square of chunks, just like a region. Name follows a scheme similar to regions: "b.x.z.biome". These files contain 32x32=512 chunks.
Inside the files, the data is stored in a straightforward binary format. Every 16 bits represents the 1D color index of a block. Blocks are listed in rowmajor order across the entire 32x32 chunk area.
What do I mean by a 1D color index? Well, if you were to load grasscolor.png into a 1D array of 32bit values in rowmajor format, then this 16 bit number will indicate the index of that array containing the color to use for the given block. It's pretty simple.
Any ambiguities in the format should be cleared up by just running MBE and inspecting the resulting folder.
For convenience, the grasscolor.png and foliagecolor.png from minecraft.jar are copied to the "biomes" folder each time MBE is run. You can use these or get the color values elsewhere if you wish. I just figured it's easier than forcing you to bundle a png with your mapper or extract it yourself.
Gonna be honest, I'm just posting in here to brag. My deobfuscation code is operating correctly!
I didn't update the biome extractor for today's new version of minecraft and it located the proper classes and methods all on its own. It still works! I am a proud father.
Hi, what license is this tool released under? Can we directly include it in mapping programs (specifically ths one)?
Also, it appears you can't run this tool on a server that's currently active. When I tried, the server crashed with:
Exception in thread "Server thread" fw: The save is being accessed from another location, aborting
at em.h(SourceFile:1759)
at em.i(SourceFile:294)
at em.a(SourceFile:287)
at net.minecraft.server.MinecraftServer.f(SourceFile:170)
at net.minecraft.server.MinecraftServer.g(SourceFile:179)
at net.minecraft.server.MinecraftServer.run(SourceFile:235)
at bw.run(SourceFile:482)
If you run the /save-off command before and the /save-on command after, does that still happen?
I wouldn't advise using this on a running server anyway. I don't think that will be changing because the biome extractor basically starts up a headless instance of minecraft, loads your save, and generates biome values. So the part where it causes the server to lose session lock is out of my control. It's basically another instance of minecraft taking over your save for a minute.
I don't know anything about open source licenses. As long as you aren't locking me out of vast fortunes earned on the back of my work, do whatever. Obviously Minecraft Overviewer is open source and on github, so that should be perfectly fine.
Great! One other request, please do some basic filename hashing to avoid storing all .biome files in the same directory. My world has 7k .biome files in the EXTRACTEDBIOMES directory which is a little slow. Maybe something like `x/x.y.biome` would be appropriate? That's 83 per directory then.
doesn't work on ubuntu 10.04LTS x64, using sun java 1.6.
Exception in thread "main" java.lang.NullPointerException
at genbiomes.bindToMinecraft(genbiomes.java:330)
at genbiomes.<init>(genbiomes.java:664)
at genbiomes.main(genbiomes.java:805)
You need to have singleplayer minecraft installed and up to date. If the line number on that error is correct, it's dying when it tries to extract the grasscolor.png from minecraft.jar. Since minecraft.jar exists, it doesn't throw an error but when it tries to get the entry from the zip file, it returns null, which I naively assume is a real ZipEntry.
I've added error handling for this case but I'm not going to put out a fix yet. Make sure minecraft is up to date and let me know if it still happens.
Discovering minecraft.jar interface...
Removed MOJANG signatures.
Match strength: 0.6369426751592356% Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Failed to bind to Minecraft, cannot generate biomes.
Review the above messages to see if there's anything you can do about it.
If not, check online for a new version.
Setup failed, cannot extract biomes. See above for more details.
I get "Setup failed, cannot extract biomes. See above for more details." when I select anything from the ComboBox, including Open World Folder...
Discovering minecraft.jar interface...
Removed MOJANG signatures.
Match strength: 0.6369426751592356% Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Failed to bind to Minecraft, cannot generate biomes.
Review the above messages to see if there's anything you can do about it.
If not, check online for a new version.
Setup failed, cannot extract biomes. See above for more details.
I get "Setup failed, cannot extract biomes. See above for more details." when I select anything from the ComboBox, including Open World Folder...
How to fix?
Yes, I am getting the same response from my copy of the Biome Extractor:
Discovering minecraft.jar interface...
Match strength: 0.6369426751592356% Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Failed to bind to Minecraft, cannot generate biomes.
Review the above messages to see if there's anything you can do about it.
If not, check online for a new version.
I am using a personal mod, and this is making trying to map it in all its glory a real pain in the behind!
First of all, make certain you are using v0.4. That's the newest version.
Minecraft client updated today, I forgot to check if the deobfuscation was still working stock, let alone with mods...
Ok, yeah, it's still working like it should without mods installed. I'll need to know what mod you're using. If you recompiled with the mod creator pack, I have no idea what that would do. One thing you can try is drag your modded jar to the desktop, run the client to get a fresh copy, run the extractor, then put your custom one back.
Output should look like this:
Minecraft Biome Extractor (v0.4 beta)
By Donkey Kong
Discovering minecraft.jar interface...
Removed MOJANG signatures.
Match strength: 87.26114649681529% Save class is: cx
Match strength: 76.47058823529412% Biome Gen class is: pm
Ready!
Edit:
Ok, I looked into it a little more. What I thought was weird is that it reports a match percentage but no match class name! What's happening exactly is that the function to match class signatures is literally doing nothing. Its class listing is empty. That means your minecraft.jar has a different package layout than the original. I don't know what would cause that. Apparently something with whatever mod thing you guys are using. With more details, I can probably just tweak how it discovers classes no problem.
Yes I'm using 0.4, I just downloaded and tried to use it. I've never used any mods, only texture packs.
Well, if I can't reproduce the problem, I can't help. OS? Java version? What texture pack? Did you use a special texture pack loader? I need every detail you can think of that might differ from my test systems (stock minecraft, mac os x 10.6, Windows XP, Windows 7 pro, all US versions.
Minecraft Biome Extractor (v0.4 beta)
By Donkey Kong
Discovering minecraft.jar interface...
Removed MOJANG signatures.
Match strength: 0.6369426751592356% Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Failed to bind to Minecraft, cannot generate biomes.
Review the above messages to see if there's anything you can do about it.
If not, check online for a new version.
Setup failed, cannot extract biomes. See above for more details.
Setup failed, cannot extract biomes. See above for more details.
The text log only tells me that it didn't discover any minecraft classes in the minecraft.jar file.
If I can't reproduce the problem, I can't help. OS? Java version? What texture pack? Did you use a special texture pack loader? I need every detail you can think of that might differ from my test systems (stock minecraft, mac os x 10.6, Windows XP, Windows 7 pro, all US versions.
About
Introducing Minecraft Biome Extractor! MBE is a cross-platform java program that taps into the biome generation code of Minecraft and outputs the color location on the "grasscolor.png" or "foliagecolor.png" for each block of a given map. Thus allowing mapping programs to paint their maps with biome-specific colors.
Usage
The JAR works both as a graphical interface and as a command line tool, making it suitable for scripts and end users.
Interface:
1.) Double-click the jar (or run it from the command line with no arguments)
2.) Select the world you want to extract biomes for
3.) Press Go and wait for "Done!"
4.) Use a supported mapper to create maps with biome colors!
Command Line Typical Usage:
java -jar MinecraftBiomeExtractor.jar -nogui world_folder [-flush]
You can map over and over without rerunning the program unless your world boundaries expand. Then you will need to rerun. MBE will skip over previously extracted chunks, so it'll be much faster.
The "Clear Cache" option in the GUI and the "-flush" optional flag on the command line delete any existing extracted biome data before starting. Use this if you suspect the extracted data has become corrupted, your random seed has changed, or Notch has changed the biome generation code and you wish to fully regenerate the map's biomes.
Supported Mappers
mcmap by Zahl
MCMap Live (wrapper for mcmap) by Donkey Kong (MBE is integrated, no need to download this)
Minecraft Overviewer by Andrew Brown
Requirements
Minecraft Client installed (will process server maps just fine)
Java Runtime Environment v1.5 (if you can run Minecraft, you have this)
Tested and working under Windows, Mac OS X (10.5+). Should work fine under Linux.
Link Removed
Older versions:
Link Removed
Link Removed
Link Removed
Link Removed
Link Removed
UPDATED 3/2/2011
After a user has run Minecraft Biome Extractor, the folder "biomes" appears inside the world folder, alongside the level.dat and the "region" folders. Minecraft leaves the folder alone. Any sane mapper should ignore the files inside as they look nothing like chunk files. All biome values are located in files inside.
Each file contains an 32x32 square of chunks, just like a region. Name follows a scheme similar to regions: "b.x.z.biome". These files contain 32x32=512 chunks.
Inside the files, the data is stored in a straightforward binary format. Every 16 bits represents the 1D color index of a block. Blocks are listed in rowmajor order across the entire 32x32 chunk area.
What do I mean by a 1D color index? Well, if you were to load grasscolor.png into a 1D array of 32bit values in rowmajor format, then this 16 bit number will indicate the index of that array containing the color to use for the given block. It's pretty simple.
Any ambiguities in the format should be cleared up by just running MBE and inspecting the resulting folder.
For convenience, the grasscolor.png and foliagecolor.png from minecraft.jar are copied to the "biomes" folder each time MBE is run. You can use these or get the color values elsewhere if you wish. I just figured it's easier than forcing you to bundle a png with your mapper or extract it yourself.
I didn't update the biome extractor for today's new version of minecraft and it located the proper classes and methods all on its own. It still works! I am a proud father.
Map 2
Map 3
Map 4
Map 5
Works good!
Also, it appears you can't run this tool on a server that's currently active. When I tried, the server crashed with:
Could this be changed please?
I wouldn't advise using this on a running server anyway. I don't think that will be changing because the biome extractor basically starts up a headless instance of minecraft, loads your save, and generates biome values. So the part where it causes the server to lose session lock is out of my control. It's basically another instance of minecraft taking over your save for a minute.
I don't know anything about open source licenses. As long as you aren't locking me out of vast fortunes earned on the back of my work, do whatever. Obviously Minecraft Overviewer is open source and on github, so that should be perfectly fine.
Exception in thread "main" java.lang.NullPointerException
at genbiomes.bindToMinecraft(genbiomes.java:330)
at genbiomes.<init>(genbiomes.java:664)
at genbiomes.main(genbiomes.java:805)
I've added error handling for this case but I'm not going to put out a fix yet. Make sure minecraft is up to date and let me know if it still happens.
http://www.opensource.org/licenses/mit-license.php
Easiest way to explain it is "no warranty for the software, you can do whatever with it - just provide credit, k?"
It's extremely short, read it for yourself.
I get "Setup failed, cannot extract biomes. See above for more details." when I select anything from the ComboBox, including Open World Folder...
How to fix?
Yes, I am getting the same response from my copy of the Biome Extractor:
Discovering minecraft.jar interface...
Match strength: 0.6369426751592356% Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Failed to bind to Minecraft, cannot generate biomes.
Review the above messages to see if there's anything you can do about it.
If not, check online for a new version.
I am using a personal mod, and this is making trying to map it in all its glory a real pain in the behind!
Minecraft client updated today, I forgot to check if the deobfuscation was still working stock, let alone with mods...
Ok, yeah, it's still working like it should without mods installed. I'll need to know what mod you're using. If you recompiled with the mod creator pack, I have no idea what that would do. One thing you can try is drag your modded jar to the desktop, run the client to get a fresh copy, run the extractor, then put your custom one back.
Output should look like this:
Edit:
Ok, I looked into it a little more. What I thought was weird is that it reports a match percentage but no match class name! What's happening exactly is that the function to match class signatures is literally doing nothing. Its class listing is empty. That means your minecraft.jar has a different package layout than the original. I don't know what would cause that. Apparently something with whatever mod thing you guys are using. With more details, I can probably just tweak how it discovers classes no problem.
Well, if I can't reproduce the problem, I can't help. OS? Java version? What texture pack? Did you use a special texture pack loader? I need every detail you can think of that might differ from my test systems (stock minecraft, mac os x 10.6, Windows XP, Windows 7 pro, all US versions.
Why do this happen??
viewtopic.php?f=1020&t=138722&p=2004768#p2004768
The text log only tells me that it didn't discover any minecraft classes in the minecraft.jar file.
If I can't reproduce the problem, I can't help. OS? Java version? What texture pack? Did you use a special texture pack loader? I need every detail you can think of that might differ from my test systems (stock minecraft, mac os x 10.6, Windows XP, Windows 7 pro, all US versions.