So I've had a look over the source, and although it's a bit messy I can see what it's up to. However the gui/frontend stuff is kinda tangled around the actual biome extraction stuff.
I'd like to restructure it so that it can be used as an API as well as a standalone app - what's your approach to people submitting code changes?
I could just fork your stuff, alter it and use that version, but then i'd end up with my own version to maintain and no-one else gets to benefit. What's the best way forward for this do you think?
Yeah, it's a messy source since it was hacked together in a day and I was learning as I went (so there's a lot of needless code that was pasted in pre-made, the GUI is really adhoc), but you should have no problem separating out the strict biome code. It started as a single-threaded command line tool afterall.
Just make whatever changes you want to make it into a library, post the source here and next release I'll merge the two and give you credit. I don't really have time to work on it now.
An exception was thrown while trying to run via the command line under linux. The server is CentOS and has no xserver. Looks like MBE is still trying to load swing resources even when -nogui is specified.
$ uname -a
Linux minecraft 2.6.32.16 #1 SMP Sun Jul 25 21:32:42 UTC 2010 i686 i686 i386 GNU/Linux
$ java -jar MinecraftBiomeExtractor.jar -nogui world
Exception in thread "main" java.lang.Error: Probable fatal error:No fonts found.
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1088)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.findFont2D(FontManager.java:1865)
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:967)
at sun.font.CompositeFont.doDeferredInitialisation(CompositeFont.java:254)
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:334)
at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:77)
at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:358)
at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:349)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:301)
at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:999)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1599)
at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(BasicLabelUI.java:229)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1356)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1304)
at javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2613)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
at javax.swing.JList.setSelectedIndex(JList.java:2196)
at javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1144)
at javax.swing.plaf.basic.BasicComboPopup.access$300(BasicComboPopup.java:63)
at javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(BasicComboPopup.java:982)
at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1224)
at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1281)
at javax.swing.JComboBox.contentsChanged(JComboBox.java:1328)
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:117)
at javax.swing.plaf.metal.MetalFileChooserUI$FilterComboBoxModel.propertyChange(MetalFileChooserUI.java:1099)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:298)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:291)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:229)
at java.awt.Component.firePropertyChange(Component.java:8023)
at javax.swing.JFileChooser.setFileFilter(JFileChooser.java:1432)
at javax.swing.JFileChooser.addChoosableFileFilter(JFileChooser.java:1127)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1785)
at javax.swing.JFileChooser.setup(JFileChooser.java:374)
at javax.swing.JFileChooser.<init>(JFileChooser.java:347)
at javax.swing.JFileChooser.<init>(JFileChooser.java:300)
at genbiomes.<init>(genbiomes.java:697)
at genbiomes.main(genbiomes.java:868)
Looks like I missed an error check. You've got a stray .dat file sitting with the chunks that isn't a chunk file. You could find and delete it or when I get a minute, I'll fix that error.
Changes
Added error checking to world scanning to prevent stray files from breaking the program
Totally divorced the GUI and biome processing, should work on totally headless systems
Cleaned up code SIGNIFICANTLY (OrangyTang, you will appreciate this)
Edit: Been working on making MinecraftBiomeExtractor into a runnable jar and a library since everything's compartmentalized now. What features would be good for the interface? I'm thinking:
// "Manual" usage
WorldProcessor() - Constructor
bindToMinecraft() - Scan the minecraft jar and get the classpath ready
setWorldFolder(File world_folder) - Pick a savegame folder
loadWorld() - Instantiate a few Minecraft classes and load the set world Run these 4 in order (or just the last two if it's already setup and you want to change worlds)
-----
getTemperatureAtBlock(int,int) - Returns the temperature (double)
getMoistureAtBlock(int,int) - Returns the moisture (double)
getCoordsAtBlock(int,int) - Returns the location of the biome color in the 256x256 biome PNG (an int)
getColorAtBlock(int,int) - Returns a Color (or an int for efficiency) of the biome color at a given block Run these as desired
// "Automatic" usage
WorldProcessor() - Constructor
bindToMinecraft() - Scan the minecraft jar and get the classpath ready
setWorldFolder(File world_folder) - Pick a savegame folder
run() - Assuming setWorldFolder has been called, this does what the GUI does. Makes the EXTRACTEDBIOMES folder, etc.
// Options
setFlush(bool) - sets if the run function flushes the biome cache
setBiomeImages(File grasscolor, File foliagecolor) - Optionally specify the path to some pngs which will be loaded and used for getColor... instead of the default images
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.
I've done extensive testing and have not been able to get past the save crash short of killing PIDs to ensure no more saving is taking place. This appears to work if you just use a copy of the world like a few are already doing. It's already integrated into the source of the shell script I've been up-keeping... but in case any need a solution for their scripting needs. May be useful if ppl come at you bitching about the crash too... You will really only need this if you are attempting to pull biomes from a Multiplayer Server.
You are going to want to change the paths as these are just vars. It recursively copies your world, so watch out of you have larger worlds as the size does double until the temp folder is removed. Then you run the extractor, recursively update the data into the correct folder, and then drop the temp world folder.
OrangyTang, you might want to consider github instead; git and github have better support for project forking, and have free repos for open source as well.
I fixed one issue with I am certian it is an issue from the code.
I first kept getting this error message:
Failed to locate minecraft.jar
Path: /root/.minecraft/bin/minecraft.jar
Minecraft doesn't appear to be installed!
Failed to bind to Minecraft, cannot generate biomes.
what I figured out is that the file in the directory was labled Minecraft.jar, not minecraft.jar. In windows that doesn't matter but the linux file system is case sensitive, so because of that it wasn't able to find the file.
Once I placed a minecraft.jar file in that directory matching the name, I got this error:
Discovering minecraft.jar interface...
WARNING: Could not extract grasscolor.png or foliagecolor.png
Either Minecraft or this program are out of date!
Match strength: 1%
Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Class listing (27entires)
GameUpdater$1.class
GameUpdater$2.class
GameUpdater$3.class
GameUpdater$4.class
GameUpdater.class
Launcher$1.class
Launcher$2.class
Launcher.class
LauncherFrame$1$1.class
LauncherFrame$1.class
LauncherFrame.class
LoginForm$1.class
LoginForm$2.class
LoginForm$3.class
LoginForm$4.class
LoginForm$5.class
LoginForm$6.class
LoginForm$7.class
LoginForm$8.class
LoginForm$9.class
LoginForm.class
MinecraftLauncher.class
Util$OS.class
Util.class
CRangeDecoder.class
LzmaException.class
LzmaInputStream.class
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.
what I figured out is that the file in the directory was labled Minecraft.jar, not minecraft.jar. In windows that doesn't matter but the linux file system is case sensitive, so because of that it wasn't able to find the file.
Once I placed a minecraft.jar file in that directory matching the name, I got this error:
Discovering minecraft.jar interface...
WARNING: Could not extract grasscolor.png or foliagecolor.png
Either Minecraft or this program are out of date!
Match strength: 1%
Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Class listing (27entires)
GameUpdater$1.class
GameUpdater$2.class
GameUpdater$3.class
GameUpdater$4.class
GameUpdater.class
Launcher$1.class
Launcher$2.class
Launcher.class
LauncherFrame$1$1.class
LauncherFrame$1.class
LauncherFrame.class
LoginForm$1.class
LoginForm$2.class
LoginForm$3.class
LoginForm$4.class
LoginForm$5.class
LoginForm$6.class
LoginForm$7.class
LoginForm$8.class
LoginForm$9.class
LoginForm.class
MinecraftLauncher.class
Util$OS.class
Util.class
CRangeDecoder.class
LzmaException.class
LzmaInputStream.class
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.
any ideas?
That's what you get when you run against Minecraft.jar (what you download from the website), and not minecraft.jar (what minecraft.jar download automagically for you).
what I figured out is that the file in the directory was labled Minecraft.jar, not minecraft.jar. In windows that doesn't matter but the linux file system is case sensitive, so because of that it wasn't able to find the file.
Once I placed a minecraft.jar file in that directory matching the name, I got this error:
Discovering minecraft.jar interface...
WARNING: Could not extract grasscolor.png or foliagecolor.png
Either Minecraft or this program are out of date!
Match strength: 1%
Deobfuscation of minecraft.jar failed.
Signature match for save class not found.
Class listing (27entires)
GameUpdater$1.class
GameUpdater$2.class
GameUpdater$3.class
GameUpdater$4.class
GameUpdater.class
Launcher$1.class
Launcher$2.class
Launcher.class
LauncherFrame$1$1.class
LauncherFrame$1.class
LauncherFrame.class
LoginForm$1.class
LoginForm$2.class
LoginForm$3.class
LoginForm$4.class
LoginForm$5.class
LoginForm$6.class
LoginForm$7.class
LoginForm$8.class
LoginForm$9.class
LoginForm.class
MinecraftLauncher.class
Util$OS.class
Util.class
CRangeDecoder.class
LzmaException.class
LzmaInputStream.class
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.
any ideas?
Well damn. I don't understand, because I am running the client to ensure that the files are placed correctly, and I I've gone as far as entering a game, so those files should be there by all means...
Well I guess I'll just copy the correct file off of my windows system.
Are you running the biome extractor as root but you played minecraft as some other user? Because for some reason it's looking in the root user's home for the minecraft files, which seems wrong to me.
That makes perfect sense to me now.
I had been getting some issues with some of the commands I was using for the map generation script I made which I had to elevate to root, and I decided to just go crazy and elevate the entire script to root. And that's what happened there.
Fixed that right up and it's working now.
public class WorldProcessor implements Runnable {
// Constructor and setup (run once to create and setup a processor)
public WorldProcessor()
public boolean bindToMinecraft()
// Mandatory Configuration (once for each world)
public boolean setWorldFolder(File world_folder)
public boolean loadWorld()
// Optional Configuration (in needed)
public void setFlush(boolean flush)
public boolean setBiomeImages(File grasscolor, File foliagecolor)
// Automated generation of EXTRACTED BIOMES folders
public void run()
public void stopRunning() // If WorldProcessor is running in another thread, this causes it to stop early
// Manual generation of biome values
public double getTemperatureAtBlock(int x, int z) // Returns the temperature (double)
public double getMoistureAtBlock(int x, int z) // Returns the moisture (double)
public byte[] getCoordsAtBlock(int x, int z) // Returns the location of the biome color in the 256x256 biome PNG (unsigned bytes)
public int getRGBAtBlock(int x, int z, int type) // Returns a Color (or an int for efficiency) of the biome color at a given block
public Color getColorAtBlock(int x, int z, int type) // Returns a Color (or an int for efficiency) of the biome color at a given block
}
Here's an example of how to use MBE as a library.
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import net.oe.MinecraftBiomeExtractor.WorldProcessor;
public class biomemap {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// Create a new world processor and bind it to minecraft
WorldProcessor world_processor = new WorldProcessor();
boolean bound = world_processor.bindToMinecraft();
// Check if the processor was able to bind to Minecraft properly
if (!bound)
return;
// Indicate where the world folder is you will be using and load it.
world_processor.setWorldFolder(new File("/Users/dk/Library/Application Support/minecraft/saves/World1"));
world_processor.loadWorld();
// Let's make an image with the biome colors for blocks 0,0 through 1023,1023
BufferedImage biomeimage = new BufferedImage(1024,1024,BufferedImage.TYPE_INT_RGB);
for (int x=0;x<1024;x++)
{
for (int z=0;z<1024;z++)
{
// getRGBAtBlock takes three arguments: X,Z,type
// for type: 0=grass color, 1=foliage color.
biomeimage.setRGB(x,z,world_processor.getRGBAtBlock(x,z,0));
}
}
// Save the compiled image
ImageIO.write(biomeimage, "png", new File("/Users/dk/Desktop/biome.png"));
}
}
1.) You need a space between java and -jar
2.) There are spaces between the parts of your path. Don't do that.
3.) The path "/root/minecraft/bin..." doesn't look right. Get rid of the spaces and try again but I'm pretty sure that's not a real path.
5.) Flush is in square brackets because it is optional. You need to either include it without brackets or leave it out.
For you, I'd suggest just double clicking the jar and using the interface because it doesn't look like you're familiar with the command line.
Cumbersome. We don't need to match the thing up with the project URL or anything. And actually, com.google... sort of implies that the project belongs to google. It just needs to be unique.
I think net.something.MBE.WorldProcessor seem nicer. I just don't know what the something should be.
Yeah, it's a messy source since it was hacked together in a day and I was learning as I went (so there's a lot of needless code that was pasted in pre-made, the GUI is really adhoc), but you should have no problem separating out the strict biome code. It started as a single-threaded command line tool afterall.
Just make whatever changes you want to make it into a library, post the source here and next release I'll merge the two and give you credit. I don't really have time to work on it now.
Thanks.
Changes
Added error checking to world scanning to prevent stray files from breaking the program
Totally divorced the GUI and biome processing, should work on totally headless systems
Cleaned up code SIGNIFICANTLY (OrangyTang, you will appreciate this)
Edit: Been working on making MinecraftBiomeExtractor into a runnable jar and a library since everything's compartmentalized now. What features would be good for the interface? I'm thinking:
// "Manual" usage
WorldProcessor() - Constructor
bindToMinecraft() - Scan the minecraft jar and get the classpath ready
setWorldFolder(File world_folder) - Pick a savegame folder
loadWorld() - Instantiate a few Minecraft classes and load the set world
Run these 4 in order (or just the last two if it's already setup and you want to change worlds)
-----
getTemperatureAtBlock(int,int) - Returns the temperature (double)
getMoistureAtBlock(int,int) - Returns the moisture (double)
getCoordsAtBlock(int,int) - Returns the location of the biome color in the 256x256 biome PNG (an int)
getColorAtBlock(int,int) - Returns a Color (or an int for efficiency) of the biome color at a given block
Run these as desired
// "Automatic" usage
WorldProcessor() - Constructor
bindToMinecraft() - Scan the minecraft jar and get the classpath ready
setWorldFolder(File world_folder) - Pick a savegame folder
run() - Assuming setWorldFolder has been called, this does what the GUI does. Makes the EXTRACTEDBIOMES folder, etc.
// Options
setFlush(bool) - sets if the run function flushes the biome cache
setBiomeImages(File grasscolor, File foliagecolor) - Optionally specify the path to some pngs which will be loaded and used for getColor... instead of the default images
I've done extensive testing and have not been able to get past the save crash short of killing PIDs to ensure no more saving is taking place. This appears to work if you just use a copy of the world like a few are already doing. It's already integrated into the source of the shell script I've been up-keeping... but in case any need a solution for their scripting needs. May be useful if ppl come at you bitching about the crash too... You will really only need this if you are attempting to pull biomes from a Multiplayer Server.
You are going to want to change the paths as these are just vars. It recursively copies your world, so watch out of you have larger worlds as the size does double until the temp folder is removed. Then you run the extractor, recursively update the data into the correct folder, and then drop the temp world folder.
Lulz
I fixed one issue with I am certian it is an issue from the code.
I first kept getting this error message:
what I figured out is that the file in the directory was labled Minecraft.jar, not minecraft.jar. In windows that doesn't matter but the linux file system is case sensitive, so because of that it wasn't able to find the file.
Once I placed a minecraft.jar file in that directory matching the name, I got this error:
any ideas?
That's what you get when you run against Minecraft.jar (what you download from the website), and not minecraft.jar (what minecraft.jar download automagically for you).
It's back up. I accidentally moved the file out of the folder on the server instead of copying it while making a backup.
Well damn. I don't understand, because I am running the client to ensure that the files are placed correctly, and I I've gone as far as entering a game, so those files should be there by all means...
Well I guess I'll just copy the correct file off of my windows system.
That makes perfect sense to me now.
I had been getting some issues with some of the commands I was using for the map generation script I made which I had to elevate to root, and I decided to just go crazy and elevate the entire script to root. And that's what happened there.
Fixed that right up and it's working now.
There's the google code project.
Here's the basic API function listing:
Here's an example of how to use MBE as a library.
There are a few things wrong here:
1.) You need a space between java and -jar
2.) There are spaces between the parts of your path. Don't do that.
3.) The path "/root/minecraft/bin..." doesn't look right. Get rid of the spaces and try again but I'm pretty sure that's not a real path.
5.) Flush is in square brackets because it is optional. You need to either include it without brackets or leave it out.
For you, I'd suggest just double clicking the jar and using the interface because it doesn't look like you're familiar with the command line.
The problem with your command is that the path to the world folder does not exist. It is checking if the input is a directory and it's not.
Thanks!
Now you just need to resolve the apparent "running the Minecraft server as root" issues you're having.
import com.google.code.minecraftbiomeextractor.WorldProcessor
Cumbersome. We don't need to match the thing up with the project URL or anything. And actually, com.google... sort of implies that the project belongs to google. It just needs to be unique.
I think net.something.MBE.WorldProcessor seem nicer. I just don't know what the something should be.