Git Product home page Git Product logo

maprend's Introduction

MapRend

MapRend is a tool to render top down maps of Minecraft worlds saved in the MCAnvil format. It can use all ressource packs, render day and night maps, shows biomes, height, height under oceans and is easy to update and customize!

Example, rendered by MapRend

To render a world some files are required:

  • colors.json

    Contains which color a block has, if it is visible and if it is modified by the biome green. With the argument textures MapRend generates this file based on a ressource pack and textures.json.

  • biomes.json

    Contains the modifiers for leaves, grass, etc. per biome.

Textures

MapRend can create a set of used colors from a ressource pack. This is done by using the argument textures. It needs the file textures.json, which contains the texture name for all blocks, if they are visible and if the biome green affects them.

Compiling

MapRend is written in Java. The repository contains an Ant build file (build.xml), to compile it use:

ant

Installation and Usage - Windows

See issue #1 for an explanation.

Installation and Usage - Mac OSX

Clone the repository using git and cd into it using Terminal (don't copy the $, it's just there to show you the default prompt):

$ git clone https://github.com/YSelfTool/MapRend.git
$ cd MapRend

Install ant (using Homebrew it's just brew install ant) and run it:

$ brew install ant
$ ant

Locate your resource pack and extract it. Here's a magic command to do it (make sure to run it from within your MapRend folder). Replace the two 1.8.1 folders with whatever your version of Minecraft is.

$ jar xf ~/Library/Application\ Support/minecraft/versions/1.8.1/1.8.1.jar assets/minecraft/textures/blocks && mv assets/minecraft/textures/blocks raw && rm -rf assets

Generate your colors.json:

$ java -jar MapRend.jar textures . .

Make a folder to put all your images in:

$ mkdir images

Now, run the command to generate your map. Change MyWorld to whatever your world name is.

$ java -jar MapRend.jar map ~/Library/Application\ Support/minecraft/saves/MyWorld . images
$ open images

Finder will pop up and you should see your map!

Contributed by Jamon Holmgren

Frontends

Frontends for easier use are found in frontends. Currently there are:

Reference

MapRend uses Code by MojangAB for reading NBT files. MapRend uses Code by Douglas Crockford for reading and writing JSON files.

maprend's People

Contributors

dertod2 avatar jamonholmgren avatar jfbarras avatar lpmi-13 avatar yselftool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

maprend's Issues

all-white png on 2nd run

When choosing to let the application render clusters, ie
map . . day 50 rect cluster ./maps .
the 2nd of two sequential executions will produce an all-white overall png.
The application will report
Succesfully read updates.json file with 4 elements!
Saved updates.json file (4 elements) !
Successfully written image to
Needed 530
Updated 0 of 4 regions!
But will overwrite outputfile will all-white data.

should use default biome on null biome

It happens that the biomColors array is hollow, ie has holes. So, as much as it is interesting to use the default biome on ArrayIndexOutOfBoundsException, it should also do that on null, as follows:

    try {
        color = biomColors[biome];
        if (color == null) {
            System.out.println("Null biome: " + biome + ", copying default: 1.");
            biomColors[biome] = biomColors[1];
            color = biomColors[1];
        }
    } catch (...)

What

Very nice... but how do i use it? i've downloaded the files... where do i start the program?

Program dependencies in utilities

I would like to discuss removing Program dependencies from the different utilities, eg Block.

public int getLight() {
    if(Program.renderNight) {
        return blockLight;
    }
    else {
        return blockLight > skyLight ? blockLight : skyLight; 
    }
}

would become

public int getLight(boolean renderNight) {
    if (renderNight) {
        return blockLight;
    }
    else {
        return blockLight > skyLight ? blockLight : skyLight; 
    }
}

I do not know how to create a pull request that will touch on multiple files. In the case above, I would need to modify Program.renderRegion.

Cannot find textures.json

Windows 7, Java 1.8, using the precompiled JAR

I have copied the block texture assets to the ressource\raw subdirectory and I try to generate the colors.json but get the following error:

D:\Games\MapRend>java -jar MapRend.jar textures ressource
MapRend Texture Rendering startup messages
Ressource folder: ressource
Stopping: Cannot find textures.json!

However, there is a textures.json in the same folder as my MapRend.jar - it is the one that comes with the precompiled JAR?
Do I need to relocate it somewhere?

should assume not visible when block not listed

The level will sometimes have block types that weren't planned for, ie not listed in the json files. Instead of letting those popup as NullPointerExceptions, one should maybe assume they are not visible, as follows:

private boolean isBlockSolid(int block) {
    try {   
        return Program.blockVisibility[block];
    } catch (ArrayIndexOutOfBoundsException aioobe) {
        //XXX assumes that block is invisible if not listed
        return false;
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.