Skip to content

Commit aa8383d

Browse files
rd-132211 (132211)
0 parents  commit aa8383d

37 files changed

+2190
-0
lines changed

.github/workflows/wheels.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and upload to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
release:
10+
types:
11+
- published
12+
13+
jobs:
14+
build_wheels:
15+
name: Build wheels on ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-22.04, windows-2022, macos-11]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- name: Build wheels
25+
uses: pypa/[email protected]
26+
27+
- uses: actions/upload-artifact@v3
28+
with:
29+
path: ./wheelhouse/*.whl
30+
31+
build_sdist:
32+
name: Build source distribution
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v3
36+
37+
- name: Build sdist
38+
run: pipx run build --sdist
39+
40+
- uses: actions/upload-artifact@v3
41+
with:
42+
path: dist/*.tar.gz
43+
44+
upload_pypi:
45+
needs: [build_wheels, build_sdist]
46+
runs-on: ubuntu-latest
47+
environment: pypi
48+
permissions:
49+
id-token: write
50+
if: github.event_name == 'release' && github.event.action == 'published'
51+
steps:
52+
- uses: actions/download-artifact@v3
53+
with:
54+
name: artifact
55+
path: dist
56+
57+
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
build
2+
*.pyc
3+
*.pyd
4+
*.dat
5+
*.bat
6+
*.log
7+
*.html
8+
*.prof
9+
*.c
10+
*.h

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2023 pythonengineer
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
include MANIFEST.in
2+
include pyproject.toml
3+
include setup.py
4+
include Makefile
5+
include requirements.txt
6+
include screenshot.png
7+
include LICENSE
8+
include README.md
9+
10+
recursive-include mc *.pyx *.pxd
11+
recursive-include resources *
12+
recursive-exclude * *.pyc
13+
recursive-exclude * *.pyd
14+
recursive-exclude * *.html
15+
recursive-exclude * *.c

Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY: build dist redist install install-from-source clean uninstall
2+
3+
build:
4+
CYTHONIZE=1 ./setup.py build
5+
6+
dist:
7+
CYTHONIZE=1 ./setup.py sdist bdist_wheel
8+
9+
redist: clean dist
10+
11+
install:
12+
CYTHONIZE=1 pip install .
13+
14+
install-from-source: dist
15+
pip install dist/minecraft-python-132211.tar.gz
16+
17+
clean:
18+
$(RM) -r build dist src/*.egg-info
19+
find . -name __pycache__ -exec rm -r {} +
20+
21+
uninstall:
22+
pip uninstall minecraft-python

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Minecraft: Python Edition
2+
3+
![Minecraft](/screenshot.png?raw=true)
4+
5+
_**Minecraft: Python Edition**_ is a project that strives to recreate each and every old Minecraft version in Python using the **Pyglet** multimedia library and **Cython** for performance.
6+
7+
This project is currently recreating the **Preclassic** versions of Minecraft. The latest version is **Preclassic rd-132211** (the very first!) as released on _**May 13, 2009**_.
8+
9+
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_pre-Classic_rd-132211).
10+
11+
### General Usage
12+
13+
*Pyglet* and *Cython* are required dependencies and can easily be installed with *pip*. Use the versions specified in `requirements.txt`.
14+
15+
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==132211`.
16+
17+
Alternatively, for a manual Cython build, run `python setup.py build_ext --inplace`.
18+
19+
Run `python -m mc.net.minecraft.Minecraft` to launch the game. *Minecraft: Python Edition* should be compatible with any modern platform that supports OpenGL and Cython.
20+
21+
### Gameplay
22+
23+
Very basic block picking and placing are featured in this version. You can only place stone tiles, except at exact ground level where it is only grass.
24+
25+
### Additional Notes
26+
27+
The resources directory contains all of the textures that this version uses. However,
28+
they are only there for convenience, as all of the texture buffers are already preloaded
29+
in the `net.Resources` module.
30+
31+
This would have been much more challenging to work on without the great tools provided by [RetroMCP-Java](https://github.com/MCPHackers/RetroMCP-Java).

0 commit comments

Comments
 (0)