Skip to content

Commit 3c5a77e

Browse files
Indev 20100219 (20100219)
1 parent e7b4d89 commit 3c5a77e

51 files changed

Lines changed: 484 additions & 123 deletions

Some content is hidden

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

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

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

‎README.md‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ _**Minecraft: Python Edition**_ is a project that strives to recreate each and e
77
The project is currently working on the Indev versions of Minecraft.
88
The latest version is **Indev 20100218** as released on _**February 18, 2010**_.
99

10-
This version implements functional armor, third person view and leaf decay.
10+
This version adds furnaces to the game, replacing the lava/fire smelting system.
11+
Flint and porkchops are also newly added in this version, mobs will now drop the same items as they would in Alpha.
1112

1213
Features from previous Indev versions include the Indev mossy cobblestone spawn house, NBT level file saving, mobs and animals, farming,
13-
durable tools, day and night cycle, difficulty, torches, advanced liquid spread, TNT explosives, chests, the main menu, workbench crafting, and soup.
14+
durable tools, armor, day and night cycle, difficulty, torches, advanced liquid spread, TNT explosives, chests, the main menu, workbench crafting, and soup.
1415

15-
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==20100218`.
16+
To easily install this version of *Minecraft: Python Edition*, just run `python -m pip install minecraft-python==20100219`.
1617

17-
You can learn more about this version [on the Minecraft wiki.](https://minecraft.wiki/w/Java_Edition_Indev_20100218)
18+
You can learn more about this version [on the Minecraft wiki.](https://minecraft.wiki/w/Java_Edition_Indev_20100219)
1819

1920
### Organization
2021

@@ -44,16 +45,12 @@ The argument `-creative` will force the game to be in creative mode.
4445
All controls are as you would expect for the game and they can be configured in the options menu.
4546
Press I to open your inventory, F5 for third person view and F7 to take a cool isometric screenshot.
4647

47-
Smelting is unique in early Indev: to get iron or gold ingots, light the dropped ores on fire or throw them in lava.
48-
4948
The Indev level generator is customizable and you can choose between the *Inland*, *Island*, *Floating*, and *Flat* level types.
5049
You can specify the world theme as *Normal*, *Hell* (lava and dirt instead of water and grass), *Paradise* (always daylight), or *Woods*.
5150
World size and world shape (*Square*, *Long*, *Deep*) may also be selected.
5251

5352
Levels can be saved to a single *.mclevel* NBT file in the pause menu. The level files are perfectly compatible with Java and vice versa.
5453

55-
Any mob may drop string, gunpowder, feathers, or flint and steel upon death.
56-
5754
Mushroom bowl soup and bread will restore health. Check the Wiki for crafting recipes added in this version.
5855

5956
![Isometric screenshot](/map.png?raw=true)

‎mc/Resources.py‎

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

‎mc/net/minecraft/client/GuiMainMenu.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ def __init__(self):
3636
'Thousands of colors!', 'Try it!', 'Age of Wonders is better!',
3737
'Try the mushroom stew!', 'Sensational!', 'Hot tamale, hot hot tamale!',
3838
'Play him off, keyboard cat!', 'Guaranteed!', 'Macroscopic!', 'Bring it on!',
39-
'Random splash!', 'Call your mother!', 'Monster infighting!'
39+
'Random splash!', 'Call your mother!', 'Monster infighting!', 'Loved by millions!',
40+
'Ultimate edition!', 'Freaky!', 'You\'ve got a brand new key!', 'Water proof!',
41+
'Uninflammable!', 'Whoa, dude!', 'All inclusive!', 'Tell your friends!',
42+
'NP is not in P!', 'Notch <3 Ez!', 'Music by C418!'
4043
)
4144
self.__currentSplash = self.__splashes[int(random() * len(self.__splashes))]
4245

‎mc/net/minecraft/client/Minecraft.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ def on_draw(self):
334334

335335
self.isGamePaused = self.currentScreen is not None and \
336336
self.currentScreen.doesGuiPauseGame()
337+
except RuntimeError as e:
338+
raise e
337339
except Exception as e:
338340
print(traceback.format_exc())
339341
self.displayGuiScreen(GuiErrorScreen('Client error', 'The game broke! [' + str(e) + ']'))

‎mc/net/minecraft/client/controller/PlayerControllerSP.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def sendBlockRemoved(self, x, y, z):
2727
items.itemsList[stack.itemID].onBlockDestroyed(stack)
2828
if stack.stackSize == 0:
2929
self._mc.thePlayer.displayGUIInventory()
30-
if change:
30+
if change and self._mc.thePlayer.canHarvestBlock(blocks.blocksList[block]):
3131
blocks.blocksList[block].dropBlockAsItem(self._mc.theWorld, x, y, z, metadata)
3232

3333
return change

‎mc/net/minecraft/client/effect/EntitySmokeFX.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def onEntityUpdate(self):
3535
self._particleTextureIndex = int(7 - (self._particleAge << 3) / self._particleMaxAge)
3636
self._motionY1 = self._motionY1 + 0.004
3737
self.moveEntity(self._motionX1, self._motionY1, self._motionZ1)
38+
if self.posY == self.prevPosY:
39+
self._motionX1 *= 1.1
40+
self._motionZ1 *= 1.1
41+
3842
self._motionX1 *= 0.96
3943
self._motionY1 *= 0.96
4044
self._motionZ1 *= 0.96
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from mc.net.minecraft.client.gui.container.GuiContainer import GuiContainer
2+
from mc.net.minecraft.client.gui.container.Slot import Slot
3+
from mc.net.minecraft.client.render.RenderEngine import RenderEngine
4+
from pyglet import gl
5+
6+
class GuiFurnace(GuiContainer):
7+
8+
def __init__(self, inventory, furnaceInventory):
9+
super().__init__()
10+
self.__furnaceInventory = furnaceInventory
11+
self._inventorySlots.append(Slot(self, furnaceInventory, 0, 56, 17))
12+
self._inventorySlots.append(Slot(self, furnaceInventory, 1, 56, 53))
13+
self._inventorySlots.append(Slot(self, furnaceInventory, 2, 116, 35))
14+
for row in range(3):
15+
for col in range(9):
16+
self._inventorySlots.append(Slot(self, inventory, col + (row + 1) * 9,
17+
8 + col * 18, 84 + row * 18))
18+
for row in range(9):
19+
self._inventorySlots.append(Slot(self, inventory, row,
20+
8 + row * 18, 142))
21+
22+
def _drawGuiContainerForegroundLayer(self):
23+
self._fontRenderer.drawString('Furnace', 60, 6, 4210752)
24+
self._fontRenderer.drawString('Inventory', 8, self.ySize - 96 + 2, 4210752)
25+
26+
def _drawGuiContainerBackgroundLayer(self):
27+
tex = self.mc.renderEngine.getTexture('gui/furnace.png')
28+
gl.glColor4f(1.0, 1.0, 1.0, 1.0)
29+
RenderEngine.bindTexture(tex)
30+
x = (self.width - self.xSize) // 2
31+
y = (self.height - self.ySize) // 2
32+
self.drawTexturedModalRect(x, y, 0, 0, self.xSize, self.ySize)
33+
if self.__furnaceInventory.isBurning():
34+
burnTime = self.__furnaceInventory.getBurnTimeRemainingScaled(12)
35+
self.drawTexturedModalRect(x + 56, y + 36 + 12 - burnTime, 176,
36+
12 - burnTime, 14, burnTime + 2)
37+
38+
cookProgress = self.__furnaceInventory.getCookProgressScaled(24)
39+
self.drawTexturedModalRect(x + 79, y + 34, 176, 14, cookProgress + 1, 16)

‎mc/net/minecraft/client/gui/container/InventoryCraftResult.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from mc.net.minecraft.game.Inventory import Inventory
22

33
class InventoryCraftResult(Inventory):
4-
STACK_LIMIT = 64
54

65
def __init__(self):
76
self.__stackResult = [None]
@@ -27,4 +26,4 @@ def setInventorySlotContents(self, slot, stack):
2726
self.__stackResult[slot] = stack
2827

2928
def getInventoryStackLimit(self):
30-
return InventoryCraftResult.STACK_LIMIT
29+
return Inventory.STACK_LIMIT

‎mc/net/minecraft/client/gui/container/InventoryCrafting.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from mc.net.minecraft.game.Inventory import Inventory
22

33
class InventoryCrafting(Inventory):
4-
STACK_LIMIT = 64
54

65
def __init__(self, eventHandler, width, height):
76
self.__inventoryWidth = width * height
@@ -39,4 +38,4 @@ def setInventorySlotContents(self, slot, stack):
3938
self.__eventHandler.guiCraftingItemsCheck()
4039

4140
def getInventoryStackLimit(self):
42-
return InventoryCrafting.STACK_LIMIT
41+
return Inventory.STACK_LIMIT

0 commit comments

Comments
 (0)