Upgrade pyCraft

This commit is contained in:
Tanner Collin 2020-09-17 18:56:52 -06:00
parent ca45925da1
commit b8cbd9a5f0
4 changed files with 9 additions and 2 deletions

View File

@ -20,6 +20,7 @@ SAND = 66
SINGLE_SNOW = 3921
SOUL_TORCH = 4008
TEST_BLOCK = (616, 78, 496)
AVOID = [

2
bot.py
View File

@ -198,6 +198,8 @@ def bot(global_state):
init(g)
print('Initialized.')
print(blocks.mcd.windows)
while g.running:
tick(g)

View File

@ -7,6 +7,7 @@ from itertools import count
from panda3d.core import LPoint3f
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
@ -261,7 +262,7 @@ class Game:
raise
if command == 'break':
self.break_block((616, 78, 496))
self.break_block(blocks.TEST_BLOCK)
reply = 'ok'
if command == 'gather' and data:
@ -312,6 +313,9 @@ class Game:
else:
reply = 'not found'
if command == 'open':
self.place_block(blocks.TEST_BLOCK, BlockFace.TOP)
if reply:
print(reply)
self.g.chat.send(reply)

View File

@ -14,7 +14,7 @@ minecraft-data==2.67.0
panda3d==1.10.6.post2
pathtools==0.1.2
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
requests==2.24.0
six==1.15.0