diff --git a/content/maps/minecraft/_index.md b/content/maps/minecraft/_index.md index 77e4e72..def70e7 100644 --- a/content/maps/minecraft/_index.md +++ b/content/maps/minecraft/_index.md @@ -4,5 +4,9 @@ title: Minecraft World Maps I generally archive the maps of notable Minecraft servers I play on. The following are snapshots of various (usually private) Minecraft servers I've played on: -- [Rsninja MC](/maps/minecraft/rsninja-2020) *(2020-2021)* -- [SDF](/maps/minecraft/mc-sdf-org) \ No newline at end of file +- Nerds With no Direction + - [2024: World 1](/maps/minecraft/nwnd-2024-world1) *(vanilla)* +- Super Dimension Fortress + - [Overworld](/maps/minecraft/mc-sdf-org) +- Rsninja MC + - [Overworld](/maps/minecraft/rsninja-2020) *(2020-2021)* \ No newline at end of file diff --git a/content/maps/minecraft/nwnd-2024-world1.md b/content/maps/minecraft/nwnd-2024-world1.md new file mode 100644 index 0000000..489921e --- /dev/null +++ b/content/maps/minecraft/nwnd-2024-world1.md @@ -0,0 +1,8 @@ +--- +title: "Minecraft Map Archive: NWnD 2024 World 1" +template: map.html +extra: + bg_color: black +--- + + \ No newline at end of file diff --git a/static/map-data/minecraft/mc-sdf-org/map.js b/static/map-data/minecraft/mc-sdf-org/map.js index f196f13..0e6baa9 100644 --- a/static/map-data/minecraft/mc-sdf-org/map.js +++ b/static/map-data/minecraft/mc-sdf-org/map.js @@ -40,15 +40,9 @@ TILES.forEach(tile => { var image = L.imageOverlay(`/map-data/minecraft/mc-sdf-org/tiles/${tile.image}`, bounds).addTo(map); }); -// Find the top left and bottom right of the map -var min_x = Math.min.apply(null, TILES.map(tile => tile.x)); -var max_x = Math.max.apply(null, TILES.map(tile => tile.x)); -var min_z = Math.min.apply(null, TILES.map(tile => tile.z)); -var max_z = Math.max.apply(null, TILES.map(tile => tile.z)); - map.fitBounds([ - [min_z, min_x], - [max_z + TILE_SIZE, max_x + TILE_SIZE] + [-1024, -1024], + [1024, 1024] ]); // Add a CSS rule to pixelate the image only when zoomed in diff --git a/static/map-data/minecraft/nwnd-2024-world1/generate_tile_list.py b/static/map-data/minecraft/nwnd-2024-world1/generate_tile_list.py new file mode 100644 index 0000000..2c6da94 --- /dev/null +++ b/static/map-data/minecraft/nwnd-2024-world1/generate_tile_list.py @@ -0,0 +1,27 @@ +import re +import json +from pathlib import Path + +TILES_DIR = Path(__file__).parent / "tiles" +tiles = list(TILES_DIR.glob("*.png")) + +TILE_PARTS_RE = re.compile(r"([\d\-]+)_([\d\-]+)_x([\d\-]+)_z([\d\-]+).png") + +for tile in tiles: + tile_name = tile.name + match = TILE_PARTS_RE.match(tile_name) + + if match: + chunk_x, chunk_z, x, z = match.groups() + + print( + json.dumps( + { + "chunk_x": int(chunk_x), + "chunk_z": int(chunk_z), + "x": int(x), + "z": int(z), + "image": tile_name + } + ) + "," + ) \ No newline at end of file diff --git a/static/map-data/minecraft/nwnd-2024-world1/map.js b/static/map-data/minecraft/nwnd-2024-world1/map.js new file mode 100644 index 0000000..20dbcb2 --- /dev/null +++ b/static/map-data/minecraft/nwnd-2024-world1/map.js @@ -0,0 +1,57 @@ + +const TILE_SIZE = 1024; +const TILES = [ + { "chunk_x": 0, "chunk_z": 1, "x": -1024, "z": -4096, "image": "0_1_x-1024_z-4096.png" }, + { "chunk_x": 0, "chunk_z": 2, "x": -1024, "z": -3072, "image": "0_2_x-1024_z-3072.png" }, + { "chunk_x": 0, "chunk_z": 3, "x": -1024, "z": -2048, "image": "0_3_x-1024_z-2048.png" }, + { "chunk_x": 0, "chunk_z": 4, "x": -1024, "z": -1024, "image": "0_4_x-1024_z-1024.png" }, + { "chunk_x": 0, "chunk_z": 5, "x": -1024, "z": 0, "image": "0_5_x-1024_z0.png" }, + { "chunk_x": 1, "chunk_z": 0, "x": 0, "z": -5120, "image": "1_0_x0_z-5120.png" }, + { "chunk_x": 1, "chunk_z": 1, "x": 0, "z": -4096, "image": "1_1_x0_z-4096.png" }, + { "chunk_x": 1, "chunk_z": 2, "x": 0, "z": -3072, "image": "1_2_x0_z-3072.png" }, + { "chunk_x": 1, "chunk_z": 3, "x": 0, "z": -2048, "image": "1_3_x0_z-2048.png" }, + { "chunk_x": 1, "chunk_z": 4, "x": 0, "z": -1024, "image": "1_4_x0_z-1024.png" }, + { "chunk_x": 1, "chunk_z": 5, "x": 0, "z": 0, "image": "1_5_x0_z0.png" }, + { "chunk_x": 1, "chunk_z": 6, "x": 0, "z": 1024, "image": "1_6_x0_z1024.png" }, + { "chunk_x": 2, "chunk_z": 0, "x": 1024, "z": -5120, "image": "2_0_x1024_z-5120.png" }, + { "chunk_x": 2, "chunk_z": 1, "x": 1024, "z": -4096, "image": "2_1_x1024_z-4096.png" }, + { "chunk_x": 2, "chunk_z": 2, "x": 1024, "z": -3072, "image": "2_2_x1024_z-3072.png" }, + { "chunk_x": 2, "chunk_z": 3, "x": 1024, "z": -2048, "image": "2_3_x1024_z-2048.png" }, + { "chunk_x": 2, "chunk_z": 4, "x": 1024, "z": -1024, "image": "2_4_x1024_z-1024.png" }, + { "chunk_x": 2, "chunk_z": 5, "x": 1024, "z": 0, "image": "2_5_x1024_z0.png" }, + { "chunk_x": 2, "chunk_z": 6, "x": 1024, "z": 1024, "image": "2_6_x1024_z1024.png" }, + { "chunk_x": 3, "chunk_z": 2, "x": 2048, "z": -3072, "image": "3_2_x2048_z-3072.png" }, + { "chunk_x": 3, "chunk_z": 3, "x": 2048, "z": -2048, "image": "3_3_x2048_z-2048.png" }, + { "chunk_x": 3, "chunk_z": 4, "x": 2048, "z": -1024, "image": "3_4_x2048_z-1024.png" }, + { "chunk_x": 3, "chunk_z": 5, "x": 2048, "z": 0, "image": "3_5_x2048_z0.png" }, + { "chunk_x": 4, "chunk_z": 4, "x": 3072, "z": -1024, "image": "4_4_x3072_z-1024.png" } +] + +// Set up the map +var map = L.map('map', { + crs: L.CRS.Simple, + minZoom: -3, + maxZoom: 3, + backgroundColor: '#000000', +}); + +// Add each tile to the map +TILES.forEach(tile => { + var bounds = [[tile.z * -1, tile.x], [(tile.z + TILE_SIZE) * -1, tile.x + TILE_SIZE]]; + var image = L.imageOverlay(`/map-data/minecraft/nwnd-2024-world1/tiles/${tile.image}`, bounds).addTo(map); +}); + +map.fitBounds([ + [512,1024], + [1500, 1024] +]); + +// Add a CSS rule to pixelate the image only when zoomed in +map.on('zoomend', function (e) { + if (map.getZoom() >= 2) { + if (document.querySelector('#leaflet-pixelator')) return; + document.head.insertAdjacentHTML('beforeend', ''); + } else { + document.querySelector('#leaflet-pixelator').remove(); + } +}); \ No newline at end of file diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/0_1_x-1024_z-4096.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_1_x-1024_z-4096.png new file mode 100644 index 0000000..88de645 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_1_x-1024_z-4096.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/0_2_x-1024_z-3072.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_2_x-1024_z-3072.png new file mode 100644 index 0000000..a38cbe9 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_2_x-1024_z-3072.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/0_3_x-1024_z-2048.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_3_x-1024_z-2048.png new file mode 100644 index 0000000..90fe759 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_3_x-1024_z-2048.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/0_4_x-1024_z-1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_4_x-1024_z-1024.png new file mode 100644 index 0000000..adb28e9 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_4_x-1024_z-1024.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/0_5_x-1024_z0.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_5_x-1024_z0.png new file mode 100644 index 0000000..95058ec Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/0_5_x-1024_z0.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_0_x0_z-5120.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_0_x0_z-5120.png new file mode 100644 index 0000000..aa48bcb Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_0_x0_z-5120.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_1_x0_z-4096.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_1_x0_z-4096.png new file mode 100644 index 0000000..2f46d8d Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_1_x0_z-4096.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_2_x0_z-3072.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_2_x0_z-3072.png new file mode 100644 index 0000000..09c6207 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_2_x0_z-3072.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_3_x0_z-2048.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_3_x0_z-2048.png new file mode 100644 index 0000000..859e195 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_3_x0_z-2048.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_4_x0_z-1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_4_x0_z-1024.png new file mode 100644 index 0000000..771eabb Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_4_x0_z-1024.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_5_x0_z0.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_5_x0_z0.png new file mode 100644 index 0000000..cb2ef90 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_5_x0_z0.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/1_6_x0_z1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_6_x0_z1024.png new file mode 100644 index 0000000..bb886d0 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/1_6_x0_z1024.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_0_x1024_z-5120.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_0_x1024_z-5120.png new file mode 100644 index 0000000..3e16f89 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_0_x1024_z-5120.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_1_x1024_z-4096.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_1_x1024_z-4096.png new file mode 100644 index 0000000..881fbde Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_1_x1024_z-4096.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_2_x1024_z-3072.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_2_x1024_z-3072.png new file mode 100644 index 0000000..492a7ec Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_2_x1024_z-3072.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_3_x1024_z-2048.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_3_x1024_z-2048.png new file mode 100644 index 0000000..662600a Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_3_x1024_z-2048.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_4_x1024_z-1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_4_x1024_z-1024.png new file mode 100644 index 0000000..430dded Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_4_x1024_z-1024.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_5_x1024_z0.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_5_x1024_z0.png new file mode 100644 index 0000000..e6e55d2 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_5_x1024_z0.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/2_6_x1024_z1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_6_x1024_z1024.png new file mode 100644 index 0000000..1f3000d Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/2_6_x1024_z1024.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/3_2_x2048_z-3072.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_2_x2048_z-3072.png new file mode 100644 index 0000000..dffd25a Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_2_x2048_z-3072.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/3_3_x2048_z-2048.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_3_x2048_z-2048.png new file mode 100644 index 0000000..b871241 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_3_x2048_z-2048.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/3_4_x2048_z-1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_4_x2048_z-1024.png new file mode 100644 index 0000000..69ea7b9 Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_4_x2048_z-1024.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/3_5_x2048_z0.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_5_x2048_z0.png new file mode 100644 index 0000000..8f2091b Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/3_5_x2048_z0.png differ diff --git a/static/map-data/minecraft/nwnd-2024-world1/tiles/4_4_x3072_z-1024.png b/static/map-data/minecraft/nwnd-2024-world1/tiles/4_4_x3072_z-1024.png new file mode 100644 index 0000000..bebfdde Binary files /dev/null and b/static/map-data/minecraft/nwnd-2024-world1/tiles/4_4_x3072_z-1024.png differ