Skip to content

mpuig/minecraft_terrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Terrain

This is a Sunday test to create some real terrain into the great game Minecraft. The idea was to use DEM files (Digital Elevation Model) to get the real elevations of a known place. DEM files can be found around internet. The next step was to be able to send the information to Minecraft. To solve this, I choose to install the Canarymod Minecraft Server with a plugin that allows to send commands via python.

Setup

These are the main steps:

  1. Python virtual environment
  2. Canarymod
  3. Raspberry Juice Plugin
  4. DEM files
  5. Run script
  6. Play

Step 1. Create the Python virtual environment and install needed packages

mkvirtualenv minecraft_terrain
pip install -r requirements.txt

Step 2. Download and install Canarymod Minecraft Server

Step 3. Download and Install Raspberry Juice Plugin

This is necessary to run your Minecraft with an API.

Step4. Download DEM files

For example, in Barcelona Area, the ICGC has 5x5 Elevation Models http://www.icgc.cat/appdownloads/

alt dem_selector

  • build a VRT from all downloaded datasets
gdalbuildvrt -te 395000 4603000 405500 4607180 montserrat.vrt dems/*.txt

Step 5. Run everything together

  • Start up Canarymod (with the Raspberry Juice Plugin)
  • Run the terrain.py script to read the DEM file and create the terrain
  • Start minecraft
  • Fly and enjoy the tour (/gamemode 1 )

Step6. Run Minecraft and fly

alt flying

alt flying