Upgrade pyCraft
This commit is contained in:
parent
ca45925da1
commit
b8cbd9a5f0
|
@ -20,6 +20,7 @@ SAND = 66
|
||||||
SINGLE_SNOW = 3921
|
SINGLE_SNOW = 3921
|
||||||
SOUL_TORCH = 4008
|
SOUL_TORCH = 4008
|
||||||
|
|
||||||
|
TEST_BLOCK = (616, 78, 496)
|
||||||
|
|
||||||
|
|
||||||
AVOID = [
|
AVOID = [
|
||||||
|
|
2
bot.py
2
bot.py
|
@ -198,6 +198,8 @@ def bot(global_state):
|
||||||
init(g)
|
init(g)
|
||||||
print('Initialized.')
|
print('Initialized.')
|
||||||
|
|
||||||
|
print(blocks.mcd.windows)
|
||||||
|
|
||||||
while g.running:
|
while g.running:
|
||||||
tick(g)
|
tick(g)
|
||||||
|
|
||||||
|
|
6
game.py
6
game.py
|
@ -7,6 +7,7 @@ from itertools import count
|
||||||
from panda3d.core import LPoint3f
|
from panda3d.core import LPoint3f
|
||||||
|
|
||||||
from minecraft.networking.packets import Packet, clientbound, serverbound
|
from minecraft.networking.packets import Packet, clientbound, serverbound
|
||||||
|
from minecraft.networking.types import BlockFace
|
||||||
|
|
||||||
from protocol.packets import TimeUpdatePacket, SetSlotPacket, PlayerDiggingPacket, BlockBreakAnimationPacket, AcknowledgePlayerDiggingPacket, HeldItemChangePacket, PickItemPacket
|
from protocol.packets import TimeUpdatePacket, SetSlotPacket, PlayerDiggingPacket, BlockBreakAnimationPacket, AcknowledgePlayerDiggingPacket, HeldItemChangePacket, PickItemPacket
|
||||||
|
|
||||||
|
@ -261,7 +262,7 @@ class Game:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if command == 'break':
|
if command == 'break':
|
||||||
self.break_block((616, 78, 496))
|
self.break_block(blocks.TEST_BLOCK)
|
||||||
reply = 'ok'
|
reply = 'ok'
|
||||||
|
|
||||||
if command == 'gather' and data:
|
if command == 'gather' and data:
|
||||||
|
@ -312,6 +313,9 @@ class Game:
|
||||||
else:
|
else:
|
||||||
reply = 'not found'
|
reply = 'not found'
|
||||||
|
|
||||||
|
if command == 'open':
|
||||||
|
self.place_block(blocks.TEST_BLOCK, BlockFace.TOP)
|
||||||
|
|
||||||
if reply:
|
if reply:
|
||||||
print(reply)
|
print(reply)
|
||||||
self.g.chat.send(reply)
|
self.g.chat.send(reply)
|
||||||
|
|
|
@ -14,7 +14,7 @@ minecraft-data==2.67.0
|
||||||
panda3d==1.10.6.post2
|
panda3d==1.10.6.post2
|
||||||
pathtools==0.1.2
|
pathtools==0.1.2
|
||||||
pycparser==2.20
|
pycparser==2.20
|
||||||
pyCraft @ git+https://github.com/ammaraskar/pyCraft.git@cf93923acc2dcfbc076379b43842228d77aea188
|
pyCraft @ git+https://github.com/ammaraskar/pyCraft.git@903c20f9e2c8751fc28af46fc0dc3f7d3ec14a82
|
||||||
PyNBT==3.0.0
|
PyNBT==3.0.0
|
||||||
requests==2.24.0
|
requests==2.24.0
|
||||||
six==1.15.0
|
six==1.15.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user