public void HandleEntityRelMove(MinecraftClient client, IPacket packet) { var myPacket = (CBEntityRelativeMove)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.RaiseEntityRelMove(myPacket.EntityID, myPacket.DX, myPacket.DY, myPacket.DZ); }
public void HandleEntityRelMove(MinecraftClient client, IPacket packet) { var myPacket = (CbEntityRelativeMove)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.RaiseEntityRelMove(myPacket.EntityId, myPacket.Dx, myPacket.Dy, myPacket.Dz); }
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); }