This commit is contained in:
2025-12-14 21:08:19 +01:00
parent 3a7b81bfd7
commit 3124f82a2f
109 changed files with 16190 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace KCM.Packets.Game.GameVillager
{
public class VillagerTeleportTo : Packet
{
public override ushort packetId => (ushort)Enums.Packets.VillagerTeleportTo;
public Guid guid { get; set; }
public Vector3 pos { get; set; }
public override void HandlePacketClient()
{
if (KCClient.client.Id == clientId) return;
try
{
Villager.villagers.data.Where(x => x.guid == guid).FirstOrDefault().TeleportTo(pos);
Main.helper.Log($"Teleporting villager to {pos.ToString()}");
}
catch (Exception e)
{
Main.helper.Log("Error handling villager teleport packet: " + e.Message);
}
}
public override void HandlePacketServer()
{
}
}
}