public BedrockClient(Alex alex, IPEndPoint endpoint, PlayerProfile playerProfile, DedicatedThreadPool threadPool, BedrockWorldProvider wp) : base(endpoint, playerProfile.Username, threadPool) { PlayerProfile = playerProfile; CancellationTokenSource = new CancellationTokenSource(); Alex = alex; WorldProvider = wp; ConnectionAcceptedWaitHandle = new ManualResetEventSlim(false); MessageDispatcher = new McpeClientMessageDispatcher(new BedrockClientPacketHandler(this, alex, CancellationTokenSource.Token)); CurrentLocation = new MiNET.Utils.PlayerLocation(0, 0, 0); OptionsProvider = alex.Services.GetService <IOptionsProvider>(); XblmsaService = alex.Services.GetService <XBLMSAService>(); base.ChunkRadius = Options.VideoOptions.RenderDistance; Options.VideoOptions.RenderDistance.Bind(RenderDistanceChanged); _threadPool = threadPool; }
public MessageHandler(RakSession session, IMcpeClientMessageHandler handler) : base(session) { _messageDispatcher = new McpeClientMessageDispatcher(handler); }
public MessageHandler(RaknetSession session, IMcpeClientMessageHandler handler) : base() { _session = session; _messageDispatcher = new McpeClientMessageDispatcher(handler); }