Skip to content

Commit 9766ada

Browse files
0.25_05 SURVIVAL TEST (0.25)
1 parent bcaa5a0 commit 9766ada

Some content is hidden

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

70 files changed

+926
-576
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-0.24.tar.gz
15+
pip install dist/minecraft-python-0.25.tar.gz
1616

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

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
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 is currently recreating the **Survival Test Classic** versions of Minecraft. The latest version is **Classic 0.24_SURVIVAL_TEST_03** as released on _**September 1, 2009**_.
7+
This project is currently recreating the **Survival Test Classic** versions of Minecraft. The latest version is **Classic 0.25_05 SURVIVAL TEST** as released on _**September 3, 2009**_.
88

9-
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_Classic_0.24_SURVIVAL_TEST_03).
9+
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_Classic_0.25_05_SURVIVAL_TEST).
1010

1111
This project is organized so that every commit is strictly the finished Python version of the Java game of the same version number.
1212
This means that you can go back into this repository's commit history and see only the source code changes between versions of Minecraft,
@@ -20,7 +20,7 @@ you can play it just by specifying the Minecraft version you want to play in the
2020
For audio to work you will either need *PyOgg* which is recommended, or FFmpeg which is installed on the system.
2121
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.
2222

23-
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.24`.
23+
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.25`.
2424

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

@@ -30,11 +30,11 @@ Run with the argument `-fullscreen` to open the window in fullscreen mode.
3030

3131
### Gameplay
3232

33-
This version features early mob enemies and basic combat. Press Tab to launch arrows at enemies.
33+
This version features early mobs (pigs, creepers, skeletons, zombies) and basic combat. Press Tab to launch arrows at enemies.
3434

35-
There are pigs, but they don't drop anything. Creepers, zombies, and skeletons all attack the same, but creepers explode upon death.
35+
There are pigs that drop brown mushrooms. Creepers explode only upon death.
3636

37-
To heal, pick up brown mushrooms and right click to eat. Red mushrooms are poisonous and will take damage.
37+
To heal, pick up mushrooms and right click to eat. Red mushrooms are poisonous and will take away health.
3838

3939
### Multiplayer
4040

mc/Resources.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

mc/net/minecraft/Entity.pxd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cython: language_level=3
22

33
from mc.net.minecraft.phys.AABB cimport AABB
4+
from mc.net.minecraft.level.Level cimport Level
45

56
cdef class Entity:
67

@@ -19,7 +20,7 @@ cdef class Entity:
1920
public float yRotO
2021
public float xRotO
2122

22-
public object level
23+
public Level level
2324
public AABB bb
2425
public bint onGround
2526
public bint horizontalCollision

mc/net/minecraft/Entity.pyx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ cdef class Entity:
7070
self.bbWidth = w
7171
self.bbHeight = h
7272

73-
def setMovePos(self, playerMove):
74-
if playerMove.moving:
75-
self.setPos(playerMove.x, playerMove.y, playerMove.z)
73+
def setMovePos(self, pos):
74+
if pos.moving:
75+
self.setPos(pos.x, pos.y, pos.z)
7676
else:
7777
self.setPos(self.x, self.y, self.z)
7878

79-
if playerMove.rotating:
80-
self.setRot(playerMove.yRot, playerMove.xRot)
79+
if pos.rotating:
80+
self.setRot(pos.yRot, pos.xRot)
8181
else:
8282
self.setRot(self.yRot, self.xRot)
8383

@@ -212,7 +212,7 @@ cdef class Entity:
212212
return self.level.containsLiquid(self.bb.grow(0.0, -0.4, 0.0), Liquid.water)
213213

214214
def isUnderWater(self):
215-
tile = self.level.getTile(self.x, self.y + 0.12, self.z)
215+
tile = self.level.getTile(<int>self.x, <int>(self.y + 0.12), <int>self.z)
216216
if tile != 0:
217217
return tiles.tiles[tile].getLiquidType() == Liquid.water
218218

@@ -310,15 +310,15 @@ cdef class Entity:
310310
z /= d
311311
x *= 0.05
312312
z *= 0.05
313-
self._pushEntity(-x, 0.0, -z)
314-
entity._pushEntity(x, 0.0, z)
313+
self._push(-x, 0.0, -z)
314+
entity._push(x, 0.0, z)
315315

316-
def _pushEntity(self, float x, float y, float z):
316+
def _push(self, float x, float y, float z):
317317
self.xd += x
318318
self.yd += y
319319
self.zd += z
320320

321-
def hurt(self, entity, n):
321+
def hurt(self, entity, hp):
322322
pass
323323

324324
def intersects(self, float x0, float y0, float z0,
@@ -334,5 +334,5 @@ cdef class Entity:
334334
def isShootable(self):
335335
return False
336336

337-
def awardKillScore(self, entity, n):
337+
def awardKillScore(self, entity, score):
338338
pass

0 commit comments

Comments
 (0)