Ejemplo n.º 1
0
        public BedrockWorldProvider(Alex alex, IPEndPoint endPoint, PlayerProfile profile,
                                    out INetworkProvider networkProvider)
        {
            Alex = alex;

            Client          = new BedrockClient(alex, endPoint, profile, new DedicatedThreadPool(new DedicatedThreadPoolSettings(Environment.ProcessorCount, ThreadType.Background, "BedrockClientThread")), this);
            networkProvider = Client;
        }
Ejemplo n.º 2
0
        public BedrockClientPacketHandler(BedrockClient client, Alex alex, CancellationToken cancellationToken) :
            base(client)
        {
            BaseClient        = client;
            AlexInstance      = alex;
            CancellationToken = cancellationToken;

            AnvilWorldProvider.LoadBlockConverter();

            ChunkProcessor = new ChunkProcessor(4,
                                                alex.Services.GetService <IOptionsProvider>().AlexOptions.MiscelaneousOptions.ServerSideLighting,
                                                cancellationToken);
        }
Ejemplo n.º 3
0
        public BedrockWorldProvider(Alex alex, IPEndPoint endPoint, PlayerProfile profile, DedicatedThreadPool threadPool,
                                    out NetworkProvider networkProvider)
        {
            Alex = alex;
            var eventDispatcher = alex.Services.GetRequiredService <IEventDispatcher>();

            EventDispatcher = eventDispatcher;

            //Client = new ExperimentalBedrockClient(alex, alex.Services, this, endPoint);
            Client          = new BedrockClient(alex, eventDispatcher, endPoint, profile, threadPool, this);
            networkProvider = Client;

            EventDispatcher.RegisterEvents(this);
        }