Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mcsr-tools/villages

Repository files navigation

Minecraft Villages

GitHub GitHub code size in bytes GitHub Repo stars


mcsr.tools/villages is not affiliated with Minecraft or Microsoft. All Trademarks referred to are the property of their respective owners.


See an overview of Minecraft village structures, indicating useful information for speedrunners such as loot tables and the availability of specific blocks (e.g., beds), which are essential throughout a speedrun.

Features

  • Overview of structures grouped by village type e.g. plains, desert, etc.
  • Indicator if structure includes bed(s) or crafting table
  • Indicator if structure has loot table e.g. is special type like weapon smith
  • Loot table accessible by clicking on chest or barrel indicator

Development

This project only requires that you have NodeJS installed on your system.

First install the dependencies by running the following command at the root of the project:

npm install

To run the dev server run the following command at the root of the project:

npm start

Click on the URL outputted in your terminal to view the app locally in your browser.


The entrypoint of the app is located in /src/index.js and uses Alpine.js as lightweight JS templating framework. Beer CSS is used as a CSS framework, custom styling is located in /src/index.css Since it's a single page website all templating is located in /index.html. Static files reside in /public.

The wiki used for gathering all the necessary village info used can be viewed here. The scraping logic is located in in /bin/gen. MediaWiki API is used for finding info about villages e.g. all structure types & loot tables and to generate JSON files.

Note

Do not actually generate the JSON files anymore for now. The pre-generated JSON files located in the /src directory have been manually edited after generation. The gen code hasn't been reflected yet to include these changes.

Deployment

Deployed with Cloudflare Workers only using static assets. The Cloudflare Vite plugin merges our config file and generates all the necessary files at build time to deploy correctly.

To make this project visitable under a pathname of a domain a wildcard pattern route e.g. mcsr.tools/villages* is added. Cloudflare will automatically use our worker for URLs that match that pattern. Lastly to resolve requests under the pathname _redirects proxies is used. This is automatically generated with Vite at build time, only requirement is that the VITE_BASE_PUBLIC_PATH environment variable is set.

This repo is automatically Continuously Deployed when commits are pushed to main.

Contributing

Bug reports and fixes are appreciated as well as ideas or discussions!

License

MIT

About

https://mcsr.tools/villages | Overview of Minecraft village structures including info such as bed count, loot table, etc.

Topics

Resources

License

Stars

Watchers

Forks