-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
139 additions
and
19 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# (c) 2016 A. R. Pruss. MIT License. | ||
# | ||
from mc import * | ||
from time import sleep | ||
import win32con,win32api | ||
|
||
mc = Minecraft() | ||
|
||
lastPlatform = None | ||
lastPlatformBlock = None | ||
|
||
UNSOLID = set([WATER_FLOWING.id,WATER_STATIONARY.id,AIR.id,LAVA_FLOWING.id,LAVA_STATIONARY.id]) | ||
|
||
while True: | ||
pos = mc.player.getTilePos() | ||
move = False | ||
if win32api.GetAsyncKeyState(win32con.VK_NEXT): | ||
pos.y -= 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_PRIOR): | ||
pos.y += 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_LEFT): | ||
pos.x += 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_RIGHT): | ||
pos.x -= 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_UP): | ||
pos.z += 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_DOWN): | ||
pos.z -= 1 | ||
move = True | ||
if move: | ||
block = mc.getBlock(pos.x,pos.y-1,pos.z) | ||
if block in UNSOLID: | ||
drew = Vec3(pos.x,pos.y-1,pos.z) | ||
mc.setBlock(drew,GLASS) | ||
else: | ||
drew = None | ||
mc.player.setTilePos(pos) | ||
if lastPlatform and (not drew or lastPlatform != drew): | ||
mc.setBlock(lastPlatform,AIR) | ||
lastPlatform = None | ||
if drew: | ||
lastPlatform = drew | ||
lastPlatformBlock = block | ||
sleep(0.2) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from mc import * | ||
from time import sleep | ||
import win32con,win32api | ||
|
||
mc = Minecraft() | ||
|
||
lastPlatform = None | ||
lastPlatformBlock = None | ||
|
||
UNSOLID = set([WATER_FLOWING.id,WATER_STATIONARY.id,AIR.id,LAVA_FLOWING.id,LAVA_STATIONARY.id]) | ||
|
||
while True: | ||
pos = mc.player.getTilePos() | ||
move = False | ||
if win32api.GetAsyncKeyState(win32con.VK_NEXT): | ||
pos.y -= 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_PRIOR): | ||
pos.y += 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_LEFT): | ||
pos.x += 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_RIGHT): | ||
pos.x -= 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_UP): | ||
pos.z += 1 | ||
move = True | ||
if win32api.GetAsyncKeyState(win32con.VK_DOWN): | ||
pos.z -= 1 | ||
move = True | ||
if move: | ||
block = mc.getBlock(pos.x,pos.y-1,pos.z) | ||
if block in UNSOLID: | ||
drew = Vec3(pos.x,pos.y-1,pos.z) | ||
mc.setBlock(drew,GLASS) | ||
else: | ||
drew = None | ||
mc.player.setTilePos(pos) | ||
if lastPlatform and (not drew or lastPlatform != drew): | ||
mc.setBlock(lastPlatform,AIR) | ||
lastPlatform = None | ||
if drew: | ||
lastPlatform = drew | ||
lastPlatformBlock = block | ||
sleep(0.2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters