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.
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.
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"));
}
}
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.
Why would someone want you to play their game for them? The whole point is to mine yourself. And if they didn't want to mine themselves, that's what inventory editors are for.
In a few hours, Notch is releasing Minecraft beta. Why would someone do this right now? Their work would be toast in a few hours. If they could even finish before the update.
Plus, in a few releases there will be an official modding API. It might make more sense to ask then.
Cartograph probably just draws the map how it's stored, which is east up. You should have set the signs up using common sense in-game. Sun rises in the east, sets in the west, clouds always move north.
Why are you mad at Zombuster? You should have just used your head.
I don't know what to tell you. Dropbox is up and running. I just checked the link in the first post and everything is fine. Try again? Check with your ISP and make sure dropbox isn't blocked?
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
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.
0
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.
0
0
0
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.
0
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.
0
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.
0
0
It's back up. I accidentally moved the file out of the folder on the server instead of copying it while making a backup.
0
0
Plus, in a few releases there will be an official modding API. It might make more sense to ask then.
0
And yes, I saw that this post used to be something like:
"I had 5 Ogres and 7 wraths chasing me!!!"
To which I say: this is not a map or a mod or a texture pack (or anything relating to the three), so please quit shitposting.
0
Why are you mad at Zombuster? You should have just used your head.
0
0
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
0