Move to our own vector module instead of Panda3D
This commit is contained in:
@@ -8,7 +8,7 @@ from itertools import count
|
||||
from munch import Munch
|
||||
from copy import copy
|
||||
|
||||
from panda3d.core import LPoint3f
|
||||
from vector import Point3D
|
||||
|
||||
from minecraft.networking.packets import Packet, clientbound, serverbound
|
||||
from minecraft.networking.types import BlockFace
|
||||
@@ -392,7 +392,7 @@ class Game:
|
||||
def handle_block_change(self, packet):
|
||||
if packet.block_state_id == blocks.SOUL_TORCH:
|
||||
try:
|
||||
self.g.goal = LPoint3f(x=packet.location[0], y=packet.location[1], z=packet.location[2])
|
||||
self.g.goal = Point3D((packet.location[0], packet.location[1], packet.location[2]))
|
||||
print('new waypoint:', self.g.goal)
|
||||
|
||||
start = time.time()
|
||||
@@ -419,7 +419,7 @@ class Game:
|
||||
|
||||
def handle_position_and_look(self, packet):
|
||||
print(packet)
|
||||
p = LPoint3f(x=packet.x, y=packet.y, z=packet.z)
|
||||
p = Point3D((packet.x, packet.y, packet.z))
|
||||
self.g.pos = p
|
||||
|
||||
confirm_packet = serverbound.play.TeleportConfirmPacket()
|
||||
|
||||
Reference in New Issue
Block a user