示例#1
0
 public PlayerEntityHandler(IMinecraftClientAdapter adapter, int entityId, Uuid playerUuid, Vector3d position, Vector2 rotation)
 {
     _adapter         = adapter;
     EntityId         = entityId;
     EntityUuid       = playerUuid;
     _positionHandler = new EntityPositionHandler(adapter, entityId, position, rotation);
     //TODO: add events
     _adapter.EntitiesDestroyed += Adapter_EntitiesDestroyed;
 }
 public ClientPlayerEntityHandler(IMinecraftClientAdapter adapter)
 {
     _adapter = adapter;
     _positionHandler = new ClientPositionHandler(_adapter);
     _adapter.Logined += Adapter_Logined;
     _adapter.Joined += Adapter_Joined;
     _adapter.Disconnected += Adapter_Disconnected;
     _adapter.UpdateViewPosition += Adapter_UpdateViewPosition;
 }
示例#3
0
 public EntityPositionHandler(IMinecraftClientAdapter adapter, int entityId, Vector3d position, Vector2 rotation)
 {
     _adapter  = adapter;
     _entityId = entityId;
     _position = position;
     _rotation = rotation;
     _adapter.EntityDeltaMove += Adapter_EntityDeltaMove;
     _adapter.EntityRotation  += Adapter_EntityRotation;
     _adapter.EntityTeleport  += Adapter_EntityTeleport;
 }
示例#4
0
 public ClientPositionHandler(IMinecraftClientAdapter adapter)
 {
     _adapter = adapter;
     _adapter.PlayerPosition += Adapter_PlayerPosition;
     _adapter.PlayerLook     += Adapter_PlayerLook;
 }