コード例 #1
0
ファイル: BotHelpers.cs プロジェクト: undrfined/undrClient
        public static Action <Task, string> DoSendCommand(MiNetClient client)
        {
            Action <Task, string> doUseItem = (t, command) =>
            {
                McpeCommandStep commandStep = McpeCommandStep.CreateObject();
                commandStep.commandName     = "fill";
                commandStep.commandOverload = "replace";
                commandStep.unknown1        = 0;
                commandStep.currentStep     = 0;
                commandStep.isOutput        = false;
                commandStep.clientId        = client.ClientId;
                //commandStep.commandInputJson = "{\n   \"tileName\" : \"dirt\",\n   \"from\" : {\n      \"x\" : 0,\n      \"xrelative\" : false,\n      \"y\" : 10,\n      \"yrelative\" : false,\n      \"z\" : 0,\n      \"zrelative\" : false\n   },\n   \"to\" : {\n      \"x\" : 10,\n      \"xrelative\" : false,\n      \"y\" : 10,\n      \"yrelative\" : false,\n      \"z\" : 10,\n      \"zrelative\" : false\n   }\n}\n";
                commandStep.commandInputJson = "{\n   \"from\" : {\n      \"x\" : 0,\n      \"xrelative\" : false,\n      \"y\" : 10,\n      \"yrelative\" : false,\n      \"z\" : 0,\n      \"zrelative\" : false\n   },\n   \"tileName\" : \"dirt\",\n   \"to\" : {\n      \"x\" : 10,\n      \"xrelative\" : false,\n      \"y\" : 10,\n      \"yrelative\" : false,\n      \"z\" : 10,\n      \"zrelative\" : false\n   }\n}\n";
                //   "commandInputJson": "{\n   \"from\" : {\n      \"x\" : 0,\n      \"xrelative\" : false,\n      \"y\" : 10,\n      \"yrelative\" : false,\n      \"z\" : 0,\n      \"zrelative\" : false\n   },\n   \"tileName\" : \"dirt\",\n   \"to\" : {\n      \"x\" : 10,\n      \"xrelative\" : false,\n      \"y\" : 10,\n      \"yrelative\" : false,\n      \"z\" : 10,\n      \"zrelative\" : false\n   }\n}\n",

                //commandStep.commandInputJson = "null\n";
                commandStep.commandOutputJson = "null\n";
                commandStep.unknown7          = 0;
                commandStep.unknown8          = 0;
                commandStep.entityIdSelf      = client.NetworkEntityId;
                //Log.Error($"Entity ID used={commandStep.entityIdSelf}\n{Package.HexDump(commandStep.Encode())}");
                client.SendPackage(commandStep);
            };

            return(doUseItem);
        }
コード例 #2
0
ファイル: BotHelpers.cs プロジェクト: TiesGamesNL/MiNET
        public static Action <Task, string> DoSendCommand(MiNetClient client)
        {
            Action <Task, string> doUseItem = (t, command) =>
            {
                McpeCommandStep commandStep = McpeCommandStep.CreateObject();
                commandStep.commandName     = "help";
                commandStep.commandOverload = "byPage";
                commandStep.unknown1        = 0;
                commandStep.currentStep     = 0;
                commandStep.isOutput        = false;
                commandStep.clientId        = -1;
                //commandStep.commandJson = @"{}";
                //commandStep.unkown6 = @"{}";
                commandStep.commandInputJson  = "null\n";
                commandStep.commandOutputJson = "null\n";
                commandStep.unknown7          = 0;
                commandStep.unknown8          = 0;
                commandStep.entityIdSelf      = client.NetworkEntityId;
                Log.Error($"Entity ID used={client.EntityId}\n{Package.HexDump(commandStep.Encode())}");

                client.SendPackage(commandStep);
            };

            return(doUseItem);
        }
コード例 #3
0
ファイル: xPlayer.cs プロジェクト: rdcpe/xCoreSplit
 public override void HandleMcpeCommandStep(McpeCommandStep message)
 {
     if (!PlayerData.isAuth)
     {
         if (message.commandName.StartsWith("log") || message.commandName.StartsWith("reg"))
         {
             base.HandleMcpeCommandStep(message);
         }
         return;
     }
     base.HandleMcpeCommandStep(message);
 }
コード例 #4
0
 public void HandleMcpeCommandStep(McpeCommandStep message)
 {
 }
コード例 #5
0
 public void HandleMcpeCommandStep(McpeCommandStep message)
 {
     WritePackage(message);
 }