Skip to content

Visualize minecraft player coordinates generated from the coordinates cmap-paper sent using Leaflet.js for rendering the image tiles on the website.

Notifications You must be signed in to change notification settings

yuan-miranda/cmap

Repository files navigation

Coordinate Mapper (cmap) - OUTDATED README

Visualize minecraft player coordinates generated from the coordinates cmap-paper sent using Leaflet.js for rendering the image tiles on the website. This is similar to 2b2t Nocom heatmap, but with each coordinate represented as a dot and not being a heatmap.

realtimeChunkImage.py main script.
app.js backend of the page.

image Example map taken from here

This repository has 2 main folders:

  1. cmap_minecraft: Source code for the cmap plugin. See the repository.
  2. cmap_scripts: Cmap related python scripts.

Usage (realtimeChunkImage.py)

Generates blank white images. Each zoom_level the quality of the image doesnt increase, the number of tiles does.

py realtimeChunkImage.py init [<type=OVERWORLD | nether | end> <zoom_level=1>]

Updates the image with the coordinates. The coordinates are black pixels on the image.

py realtimeChunkImage.py update [<type=OVERWORLD | nether | end>]\n

Update the entire overworld, nether, end tiles in realtime (approx. 11-13s each operation)

py realtimeChunkImage.py realtime

Example Commands

Command Operation
py realtimeChunkImage.py init initialize blank white tiles (overworld)
py realtimeChunkImage.py init end specify the tiles to make
py realtimeChunkImage.py init end 2 make tiles for end with 2 zoom level (for leaflet)
py realtimeChunkImage.py update update the image with the coords from the coordinate files (overworld, along the zoom levels)
py realtimeChunkImage.py update nether update the nether tiles only
py realtimeChunkImage.py realtime update the entire overworld, nether, end tiles in realtime

Installation Setup

Note: You must have Git, Python 3 or above, Node.js and npm installed prior to this setup.

  1. Clone the repository on your machine:
git clone https://github.com/yuan-miranda/cmap.git
  1. Install the following
npm install leaflet
pip install pillow numpy matplotlib
  1. Run this schema on your PostgreSQL (pgAdmin4)
CREATE TABLE IF NOT EXISTS overworld (
    id SERIAL PRIMARY KEY,
    x INT NOT NULL,
    z INT NOT NULL
);

CREATE TABLE IF NOT EXISTS nether (
    id SERIAL PRIMARY KEY,
    x INT NOT NULL,
    z INT NOT NULL
);

CREATE TABLE IF NOT EXISTS the_end (
    id SERIAL PRIMARY KEY,
    x INT NOT NULL,
    z INT NOT NULL
);
  1. Setup the database details (realtimeChunkImage.py)
DB_HOST = ""
DB_PORT = 5432
DB_NAME = ""
DB_USER = ""
DB_PASSWORD = ""
  1. Run the interactive map
node app.js
  1. Generate the tiles for overworld, nether, end with no zoom
cd cmap_scripts
py realtimeChunkImage.py init overworld
py realtimeChunkImage.py init nether
py realtimeChunkImage.py init end
  1. Run the realtimeChunkImage.py in realtime (assuming you have the tiles generated)
cd cmap_scripts
py realtimeChunkImage.py realtime
  • after doing the procedures, it should look like this (example output) image

Acknowledgments

About

Visualize minecraft player coordinates generated from the coordinates cmap-paper sent using Leaflet.js for rendering the image tiles on the website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published