https://github.com/henryiii/minecraft-gen
Demo program for se-for-sci
https://github.com/henryiii/minecraft-gen
Last synced: about 1 month ago
JSON representation
Demo program for se-for-sci
- Host: GitHub
- URL: https://github.com/henryiii/minecraft-gen
- Owner: henryiii
- License: mit
- Created: 2023-09-13T15:31:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-09T17:05:02.000Z (over 1 year ago)
- Last Synced: 2025-04-15T07:56:56.129Z (about 1 month ago)
- Language: Jupyter Notebook
- Size: 68.4 KB
- Stars: 6
- Watchers: 4
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Minecraft generation example project
## History
This example project was based on this MIT source:
* Original article: https://towardsdatascience.com/replicating-minecraft-world-generation-in-python-1b491bc9b9a4
* Original source: https://github.com/BilHim/minecraft-world-generationProcess taken:
* Move all functions to helper file
* Cleanup figures slightly (kwargs, simicolons)
* Add voronoi to scatter plot
* Make `map_seed`, `size`, and a few others explicit parameters
* Move imports to the top
* Fixed warning with divide by zero
* Fixed warning about clipping to 0
* Ran black on both (`pipx run black[jupyter] *.py *.ipynb`)
* General cleanup (using Ruff)
* Ran `ruff check --select=ALL --ignore=D,ANN,ERA,PLR,E703,E402,NPY002 MinecraftGenerator.ipynb minecraft_gen.py --fix`
* Manually cleaned up a few things, like `np.clip` instead of custom lambda
* Reran black
* Work on random numbers and plotting
* Normalize plotting code to use `plt.subplots` and `ax`/`axs`
* Simplify some loops with `zip`
* Remove commented out code that wasn't working
* Simplify density example to a loop
* Pull RNG out of the one function that used it
* Make `compute_all` function
* Factor out a few more functions
* Remove a little duplicate code