SHARE
TWEET

Untitled

a guest Sep 23rd, 2014 214 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. set -x
  4.  
  5. pushd .
  6.  
  7. cd ~/work
  8. rm -rf ~/work/*
  9.  
  10. cp /home/minetest/.minetest/worlds/Survival_World/map.sqlite  survival_map.sqlite
  11.  
  12. cp /home/minetest/.minetest/worlds/Creative_World/map.sqlite  creative_map.sqlite
  13.  
  14. # the offset value is calculated as X + (Y*4*4096*4096), measured
  15. # in mapblocks.  This is X=399, Y=24. 399 + (24*4*16777216) = 1610613135
  16.  
  17. echo "UPDATE blocks SET pos = pos + 1610613135;" | sqlite3 survival_map.sqlite
  18.  
  19. echo ".dump" | sqlite3 survival_map.sqlite | grep -v "CREATE TABLE" >survival_insert.sql
  20.  
  21. cat survival_insert.sql | sqlite3 creative_map.sqlite
  22.  
  23. # These lines re-center the combined result to where the survival map ended up.
  24. # Values used were calculated by:
  25. #
  26. # abs(lowest_pos) + abs (highest_pos) + 1
  27. # abs(lowest_pos) + abs (highest_pos) + offset_from_above + 1
  28. #
  29. # At the time this script was last run,
  30. # lowest was -11881149124 and highest was 32430370609
  31.  
  32. echo "UPDATE blocks SET pos = pos + 44311519734;" | sqlite3 creative_map.sqlite
  33. echo "UPDATE blocks SET pos = pos - 45922132869;" | sqlite3 creative_map.sqlite
  34.  
  35. cp creative_map.sqlite ~/.minetest/worlds/mapgen_testing/map.sqlite
  36.  
  37. cd ~/Minetest-related/minetest-mapper-cpp/
  38.  
  39. ./minetest_mapper \
  40.         --drawscale \
  41.         --geometry -9500:-5500+15500+11000 \
  42.         -i /home/vanessa/.minetest/worlds/mapgen_testing/ \
  43.         -o ~/Digital-Audio-Concepts-Website/vanessa/hobbies/minetest/images/combined_map.png
  44. popd
  45.  
  46. #gimp ~/Digital-Audio-Concepts-Website/vanessa/hobbies/minetest/images/combined_map.png
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top