Skip to content

Commit be550f7

Browse files
0.0.11a (0.0.11)
1 parent 5a9ff16 commit be550f7

31 files changed

+599
-262
lines changed

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-161348.tar.gz
15+
pip install dist/minecraft-python-0.0.11.tar.gz
1616

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

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44

55
_**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.
66

7-
This project is currently recreating the **Preclassic** versions of Minecraft. The latest version is **Preclassic rd-161348** as released on _**May 16, 2009**_.
7+
This project is currently recreating the **Classic** versions of Minecraft. The latest version is **Classic 0.0.11a** as released on _**May 17, 2009**_.
88

9-
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_pre-Classic_rd-161348).
9+
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_Classic_0.0.11a).
1010

1111
### General Usage
1212

1313
*Pyglet* and *Cython* are required dependencies and can easily be installed with *pip*. Use the versions specified in `requirements.txt`.
1414

15-
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==161348`.
15+
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.0.11`.
1616

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

1919
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.
2020

2121
### Gameplay
2222

23-
Basic terrain, early block picking and placing, and human mobs are featured in this version. There are five different blocks you can place.
23+
Basic terrain, block picking and placing, level saving, and human mobs are featured in this version. There are five different blocks you can place.
2424

25-
Press *Esc* to exit the game. Press *Return* to save, *R* to reset your position, *G* to spawn a mob, and numbers *1-4* (*6* for saplings) to switch blocks.
25+
Press *Esc* to release the mouse. Press *R* to reset your position, *G* to spawn a mob, *Y* to invert mouse, *Enter* to save, and numbers *1-4* (*6* for saplings) to switch blocks.
2626

2727
### Additional Notes
2828

mc/Resources.py

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

mc/cCompatibilityShims.pxd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# cython: language_level=3
2+
3+
cdef class Random:
4+
5+
cdef float randFloatM(self, float multiply)
6+
cdef float randFloat(self)
7+
cdef int randInt(self, int limit)

mc/cCompatibilityShims.pyx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# cython: language_level=3
2+
3+
from libc.stdlib cimport srand, rand, RAND_MAX
4+
from libc.time cimport time
5+
6+
cdef class Random:
7+
8+
def __init__(self, seed=0):
9+
if seed == 0:
10+
srand(time(NULL))
11+
else:
12+
srand(seed)
13+
14+
cdef float randFloatM(self, float multiply):
15+
return self.randFloat() * multiply
16+
17+
cdef float randFloat(self):
18+
return rand() / <float>RAND_MAX
19+
20+
cdef int randInt(self, int limit):
21+
cdef int divisor, retval
22+
23+
divisor = RAND_MAX // (limit + 1)
24+
retval = limit + 1
25+
while retval > limit:
26+
retval = rand() // divisor
27+
28+
return retval

mc/net/minecraft/Entity.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,6 @@ def moveRelative(self, xa, za, speed):
116116

117117
def isLit(self):
118118
return self.level.isLit(self.x, self.y, self.z)
119+
120+
def render(self, a):
121+
pass

0 commit comments

Comments
 (0)