Skip to content

Commit 63717e1

Browse files
0.28_01 (0.28)
1 parent 6b1ca5c commit 63717e1

Some content is hidden

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

90 files changed

+1191
-1058
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.27.tar.gz
15+
pip install dist/minecraft-python-0.28.tar.gz
1616

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

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
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.27 SURVIVAL TEST** as released on _**October 24, 2009**_.
7+
This project is currently recreating the **Late Classic** versions of Minecraft. The latest version is **Classic 0.28_01** as released on _**October 27, 2009**_.
88

9-
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_Classic_0.27_SURVIVAL_TEST).
9+
Learn more about this version [here](https://minecraft.fandom.com/wiki/Java_Edition_Classic_0.28_01).
10+
11+
Or the server version [here](https://minecraft.fandom.com/wiki/Java_Edition_Classic_server_1.8.3).
1012

1113
This project is organized so that every commit is strictly the finished Python version of the Java game of the same version number.
1214
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,29 +22,35 @@ you can play it just by specifying the Minecraft version you want to play in the
2022
For audio to work you will either need *PyOgg* which is recommended, or FFmpeg which is installed on the system.
2123
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.
2224

23-
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.27`.
25+
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==0.28`.
2426

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

2729
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.
2830

2931
Run with the argument `-fullscreen` to open the window in fullscreen mode.
3032

33+
It is possible to enable a limited survival mode by editing `self.gamemode` in `Minecraft.py`.
34+
3135
### Gameplay
3236

33-
This version features early mobs (pigs, creepers, skeletons, zombies, spiders) and basic combat. Press Tab to launch arrows at enemies.
37+
This is a creative version of Classic, so no mobs exist. All ores and tiles are featured in this version.
3438

35-
This is the first version to feature spiders.
39+
If you enable survival mode, there will be limited functionality.
40+
Only sheep will spawn, which you can get wool from. Apart from that, no items drop.
3641

37-
There are pigs that drop brown mushrooms. Creepers explode only upon death.
42+
Press B to pick blocks. Press F5 to toggle rain. Other keys are listed in the regular options menu.
3843

39-
To heal, pick up mushrooms and right click to eat. Red mushrooms are poisonous and will take away health.
44+
### Multiplayer
4045

41-
TNT and ore blocks are featured in this version. There is also early weather; press F5 to toggle rain.
46+
To launch the multiplayer game, run `python -m mc.net.minecraft.Minecraft -server <host:port> -user <username> -mppass [password]`.
4247

43-
### Multiplayer
48+
This client is compatible with any 0.30 server that doesn't use an extended network protocol.
49+
50+
Press *Tab* in-game to view connected players.
4451

45-
Since this is a Survival version of Classic, multiplayer support is disabled.
52+
To host a server, follow the instructions in the `README.TXT` file in the *server* directory.
53+
Make sure `verify-names` is set to `false` in the server properties.
4654

4755
### Additional Notes
4856

mc/Resources.py

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

mc/net/minecraft/Entity.pxd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ cdef class Entity:
4343
public int textureId
4444
public float ySlideOffset
4545
public float footSize
46+
public bint noPhysics
47+
public float pushthrough
4648

4749
cpdef tick(self)
4850
cpdef bint isFree(self, float xa, float ya, float za)

mc/net/minecraft/Entity.pyx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ cdef class Entity:
4343
self.textureId = 0
4444
self.ySlideOffset = 0.0
4545
self.footSize = 0.0
46+
self.noPhysics = False
47+
self.pushthrough = 0.0
4648

4749
def __init__(self, level):
4850
self.level = level
@@ -147,6 +149,13 @@ cdef class Entity:
147149
cdef bint onGround
148150
cdef AABB aabbOrg, aABB, aabb
149151

152+
if self.noPhysics:
153+
self.bb.move(x, y, z)
154+
self.x = (self.bb.x0 + self.bb.x1) / 2.0
155+
self.y = self.bb.y0 + self.heightOffset - self.ySlideOffset
156+
self.z = (self.bb.z0 + self.bb.z1) / 2.0
157+
return
158+
150159
xOrg = self.x
151160
zOrg = self.z
152161
xaOrg = x
@@ -369,6 +378,8 @@ cdef class Entity:
369378
z /= d
370379
x *= 0.05
371380
z *= 0.05
381+
x *= 1.0 - self.pushthrough
382+
z *= 1.0 - self.pushthrough
372383
self._push(-x, 0.0, -z)
373384
entity._push(x, 0.0, z)
374385

@@ -409,3 +420,6 @@ cdef class Entity:
409420

410421
def getTexture(self):
411422
return self.textureId
423+
424+
def isCreativeModeAllowed(self):
425+
return False

0 commit comments

Comments
 (0)