Skip to content

Commit 5189588

Browse files
0.31 20091223-2 (0.31.20091223-2)
1 parent 0cbe127 commit 5189588

File tree

333 files changed

+9229
-11451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+9229
-11451
lines changed

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [ubuntu-22.04, windows-2022, macos-11]
19+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
2020

2121
steps:
2222
- uses: actions/checkout@v4
2323

2424
- name: Build wheels
25-
uses: pypa/cibuildwheel@v2.16.5
25+
uses: pypa/cibuildwheel@v2.17.0
2626

2727
- uses: actions/upload-artifact@v4
2828
with:

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include screenshot.png
77
include LICENSE
88
include README.md
99

10-
recursive-include mc *.pyx *.pxd *.ogg *.png
10+
recursive-include mc *.pyx *.pxd *.ogg *.png *.md3 *.MD3
1111
recursive-exclude * *.pyc
1212
recursive-exclude * *.pyd
1313
recursive-exclude * *.html

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ install:
1212
CYTHONIZE=1 pip install .
1313

1414
install-from-source: dist
15-
pip install dist/minecraft-python-0.30.tar.gz
15+
pip install dist/minecraft-python-0.31.20091223.post2.tar.gz
1616

1717
clean:
1818
$(RM) -r build dist src/*.egg-info

README.md

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,45 @@
11
## Minecraft: Python Edition
22

3-
![Minecraft](/creative.png?raw=true)
3+
![Minecraft](/screenshot.png?raw=true)
44

55
_**Minecraft: Python Edition**_ is a project that strives to recreate each and every old Minecraft version in Python 3 using the **Pyglet** multimedia library and **Cython** for performance.
66

7-
This project has finished recreating the **Classic** versions of Minecraft. The latest version is **Classic 0.30** as released on _**November 10, 2009**_.
7+
The project is currently working on the Indev versions of Minecraft.
8+
The latest version is **Indev 0.31 20091223-2**, the first version of Indev which was released on _**December 23, 2009**_.
89

9-
This version comes with both survival and creative modes: to enable survival mode, just run with the argument `-survival`.
10+
This version is the last available version of Minecraft to be released in creative mode exclusively.
11+
However, the work-in-progress survival mode can be enabled by running the game with the argument `-survival`.
12+
This is the first version to feature one of the MD3 mobs of Indev, Rana.
1013

11-
Learn more about this version [here](https://minecraft.wiki/w/Java_Edition_Classic_0.30).
14+
You can learn more about this version [on the Minecraft wiki.](https://minecraft.wiki/w/Java_Edition_Indev_0.31_20091223-2).
1215

13-
Or the server version [here](https://minecraft.wiki/w/Java_Edition_Classic_server_1.10.1).
16+
### Organization
1417

15-
This project is organized so that every commit is strictly the finished Python version of the Java game of the same version number.
16-
This means that you can go back into this repository's commit history and see only the source code changes between versions of Minecraft,
17-
or you can compare branches and see the changes made between them. For any version this project covers,
18-
you can play it just by specifying the Minecraft version you want to play in the `pip install` command as demonstrated below.
18+
This project's commits represent the Python versions of each Minecraft Java game version.
19+
You can view source code changes between game versions by checking the commit history or comparing branches.
20+
To play any version, specify it in the `pip install` command as demonstrated below.
1921

2022
### General Usage
2123

22-
*Pyglet*, *Cython*, *Pillow*, and *PyOgg* are required dependencies and can easily be installed with *pip*. Use the versions specified in `requirements.txt`.
23-
*wxPython* is an optional dependency for the level file picker, but if you don't have it then *Tkinter* is used instead.
24+
*Pyglet*, *Cython*, and *Pillow* are required dependencies and can easily be installed with *pip*. Use the versions specified in `requirements.txt`.
2425

25-
For audio to work you will either need *PyOgg* which is recommended, or FFmpeg which is installed on the system.
26-
GStreamer is also supported on Linux through the *gst-python* library. PyOgg requires that your system have one of the *Opus*, *FLAC*, or *Vorbis* codecs. OpenAL is required.
26+
While the late Classic versions and later Indev versions feature audio, this version does not.
2727

28-
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.30`.
28+
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.31.20091223-2`.
2929

3030
Alternatively, for a manual Cython build, run `python setup.py build_ext --inplace`.
3131

3232
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.
3333

3434
Run with the argument `-fullscreen` to open the window in fullscreen mode.
3535

36-
### Creative Gameplay
36+
### Gameplay
3737

38-
In creative mode, no mobs exist. All Classic ores and tiles are made available by pressing B to pick blocks.
38+
Press B to pick any of the ores and tiles that exist in this creative version.
39+
Press F5 to toggle rain. Other keys are listed in the regular options menu.
3940

40-
You can press F5 to toggle rain. Other keys are listed in the regular options menu.
41-
42-
### Survival Gameplay
43-
44-
![Minecraft](/survival.png?raw=true)
45-
46-
The survival version features early mobs (pigs, creepers, skeletons, zombies, spiders) and basic combat. Press Tab to launch arrows at enemies.
47-
48-
There are pigs that drop brown mushrooms. Sheep also exist. Creepers explode only upon death.
49-
50-
To heal, pick up mushrooms and right click to eat. Red mushrooms are poisonous and will take away health.
51-
52-
### Multiplayer
53-
54-
To launch the multiplayer game while in creative mode, run `python -m mc.net.minecraft.Minecraft -server <host:port> -user <username> -mppass [password]`.
55-
56-
This client is compatible with any Classic server that doesn't use an extended protocol.
57-
58-
Press *Tab* in-game to view connected players.
59-
60-
To host a server, follow the instructions in the `README.TXT` file in the *server* directory.
61-
Make sure `verify-names` is set to `false` in the server properties.
41+
If you enable survival mode, you will spawn with some lava and water blocks for testing.
42+
You will be able to attack the Rana mobs, but items in general won't drop. Arrows and mushrooms are unusable.
6243

6344
### Additional Notes
6445

creative.png

-425 KB
Binary file not shown.

mc/CompatibilityShims.pxd

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# cython: language_level=3
2+
3+
cimport cython
4+
5+
cpdef unsigned long long getMillis()
6+
7+
cdef class Random:
8+
9+
cdef float randFloatM(self, float multiply)
10+
cdef float randFloat(self)
11+
cdef int nextInt(self, int limit)
12+
13+
cdef class Bits:
14+
15+
cdef long makeLong(self, unsigned char b7, unsigned char b6, unsigned char b5,
16+
unsigned char b4, unsigned char b3, unsigned char b2,
17+
unsigned char b1, unsigned char b0)
18+
cdef int makeInt(self, unsigned char b3, unsigned char b2,
19+
unsigned char b1, unsigned char b0)
20+
cdef short makeShort(self, unsigned char b1, unsigned char b0)
21+
22+
cpdef enum ByteOrder:
23+
BIG_ENDIAN = 0
24+
LITTLE_ENDIAN = 1
25+
26+
cdef class Buffer(Bits):
27+
28+
cdef:
29+
int _position
30+
int _limit
31+
int _capacity
32+
bint _order
33+
34+
cpdef long getLong(self)
35+
cpdef int getInt(self)
36+
cpdef short getShort(self)
37+
cpdef double getDouble(self)
38+
cpdef float getFloat(self)
39+
40+
cpdef order(self, bint order)
41+
cpdef flip(self)
42+
cpdef limit(self, int limit)
43+
cpdef position(self, int position=?)
44+
cpdef remaining(self)
45+
46+
cpdef clear(self)
47+
cpdef capacity(self)
48+
cpdef compact(self)
49+
50+
cdef int __nextIndex(self, int nb=?)
51+
cdef int nextGetIndex(self, int nb=?)
52+
cdef int nextPutIndex(self, int nb=?)
53+
54+
cdef int checkIndex(self, int i)
55+
cdef bint checkBounds(self, int off, int length, int size)
56+
57+
@cython.final
58+
cdef class ByteBuffer(Buffer):
59+
cdef:
60+
unsigned char[:] __array
61+
object __dataPtr
62+
63+
cpdef inline put(self, unsigned char value)
64+
cpdef inline unsigned char get(self)
65+
cpdef inline unsigned char getAt(self, int idx)
66+
cdef inline __getDataPtr(self)
67+
68+
@cython.final
69+
cdef class IntBuffer(Buffer):
70+
cdef:
71+
int[:] __array
72+
object __dataPtr
73+
74+
cpdef inline put(self, int value)
75+
cpdef inline int get(self)
76+
cpdef inline int getAt(self, int idx)
77+
cdef inline __getDataPtr(self)
78+
79+
@cython.final
80+
cdef class FloatBuffer(Buffer):
81+
cdef:
82+
float[:] __array
83+
object __dataPtr
84+
85+
cpdef inline put(self, float value)
86+
cdef putFloats(self, float* src, int offset, int length)
87+
cpdef inline float get(self)
88+
cpdef inline float getAt(self, int idx)
89+
cdef getFloats(self, float*, int size)
90+
cdef inline __getDataPtr(self)

0 commit comments

Comments
 (0)