Beispiel #1
0
        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;
        }
Beispiel #2
0
 public MessageHandler(RakSession session, IMcpeClientMessageHandler handler) : base(session)
 {
     _messageDispatcher = new McpeClientMessageDispatcher(handler);
 }
Beispiel #3
0
 public MessageHandler(RaknetSession session, IMcpeClientMessageHandler handler) : base()
 {
     _session           = session;
     _messageDispatcher = new McpeClientMessageDispatcher(handler);
 }