public void HandleEntityTeleport(MinecraftClient client, IPacket packet) {
            var myPacket = (CBEntityTeleport)packet;

            if (client.MinecraftWorld != null) {
                int eIndex = client.MinecraftWorld.GetEntityById(myPacket.EntityID);

                if (eIndex != -1) {
                    client.MinecraftWorld.Entities[eIndex].Location.x = myPacket.X;
                    client.MinecraftWorld.Entities[eIndex].Location.y = myPacket.Y;
                    client.MinecraftWorld.Entities[eIndex].Location.z = myPacket.Z;
                    client.MinecraftWorld.Entities[eIndex].yaw = myPacket.Yaw;
                    client.MinecraftWorld.Entities[eIndex].pitch = myPacket.Pitch;
                }
            }

            client.RaiseEntityTeleport(myPacket.EntityID, myPacket.X, myPacket.Y, myPacket.Z);
            client.RaiseEntityLookChanged(myPacket.EntityID, myPacket.Yaw, myPacket.Pitch);
        }
        public void HandleEntityLook(MinecraftClient client, IPacket packet) {
            var myPacket = (CBEntityLook)packet;

            if (client.MinecraftWorld != null) {
                int eIndex = client.MinecraftWorld.GetEntityById(myPacket.EntityID);

                if (eIndex != -1) {
                    client.MinecraftWorld.Entities[eIndex].pitch = myPacket.Pitch;
                    client.MinecraftWorld.Entities[eIndex].yaw = myPacket.Yaw;
                }
            }

            client.RaiseEntityLookChanged(myPacket.EntityID, myPacket.Yaw, myPacket.Pitch);
        }
        public void HandleLookEntityRelMove(MinecraftClient client, IPacket packet) {
            var myPacket = (CBEntityLookandRelativeMove)packet;

            if (client.MinecraftWorld != null) {
                int eIndex = client.MinecraftWorld.GetEntityById(myPacket.EntityID);

                if (eIndex != -1) {
                    client.MinecraftWorld.Entities[eIndex].Location.x += (myPacket.DX * 32);
                    client.MinecraftWorld.Entities[eIndex].Location.y += (myPacket.DY * 32);
                    client.MinecraftWorld.Entities[eIndex].Location.z += (myPacket.DZ * 32);
                    client.MinecraftWorld.Entities[eIndex].yaw = myPacket.Yaw;
                    client.MinecraftWorld.Entities[eIndex].pitch = myPacket.Pitch;
                }
            }

            client.RaiseEntityRelMove(myPacket.EntityID, myPacket.DX * 32, myPacket.DY * 32, myPacket.DZ * 32);
            client.RaiseEntityLookChanged(myPacket.EntityID, myPacket.Yaw, myPacket.Pitch);
        }
        public void HandleLookEntityRelMove(MinecraftClient client, IPacket packet) {
            var myPacket = (CbEntityLookandRelativeMove)packet;

            if (client.MinecraftWorld != null) {
                var eIndex = client.MinecraftWorld.GetEntityById(myPacket.EntityId);

                if (eIndex != -1) {
                    client.MinecraftWorld.Entities[eIndex].Location.X += (myPacket.Dx * 32);
                    client.MinecraftWorld.Entities[eIndex].Location.Y += (myPacket.Dy * 32);
                    client.MinecraftWorld.Entities[eIndex].Location.Z += (myPacket.Dz * 32);
                    client.MinecraftWorld.Entities[eIndex].Yaw = myPacket.Yaw;
                    client.MinecraftWorld.Entities[eIndex].Pitch = myPacket.Pitch;
                }
            }

            client.RaiseEntityRelMove(myPacket.EntityId, myPacket.Dx * 32, myPacket.Dy * 32, myPacket.Dz * 32);
            client.RaiseEntityLookChanged(myPacket.EntityId, myPacket.Yaw, myPacket.Pitch);
        }