1 #include <iostream> 2 #include "minecraft.h" 3 #include <Windows.h> 4 using namespace std; 5 TxMinecraft mc; 6 int main() { 7 bool con=mc.ConnectMinecraft("zk","08bd17c1ea594f2684182fd956c2d172"); 8 if(!con){ 9 cout<<"连接失败"; 10 return 0; 11 } 12 int x_,y_,z_; 13 cout<<"坐标"; 14 cin>>x_>>y_>>z_; 15 string a[46][23],black="35,15",dhui="35,8",red="35,14",yellow="35,4",hlu="35,5",zong="35,12",dlan="35,3",blue="35,11",bait="159,0"; 16 int y=0,z=0; 17 string id,data; 18 bool fly=true; 19 mc.setPlayerFly("fushuxuan",true); 20 y++;//1 21 for(int j=6;j<41;j++){ 22 a[j][y]=black; 23 } 24 y++;//2 25 for(int j=10;j<37;j++){ 26 a[j][y]=dhui; 27 } 28 a[4][y]=black; 29 a[5][y]=black; 30 a[6][y]=red; 31 a[7][y]=red; 32 a[8][y]=red; 33 a[9][y]=black; 34 a[37][y]=black; 35 a[38][y]=blue; 36 a[39][y]=blue; 37 a[40][y]=blue; 38 a[41][y]=black; 39 a[42][y]=black; 40 y++;//3 41 for(int j=9;j<38;j++){ 42 a[j][y]=black; 43 } 44 a[3][y]=black; 45 a[4][y]=red; 46 a[5][y]=red; 47 a[6][y]=red; 48 a[7][y]=red; 49 a[8][y]=red; 50 a[10][y]=dhui; 51 a[36][y]=dhui; 52 a[38][y]=blue; 53 a[39][y]=blue; 54 a[40][y]=blue; 55 a[41][y]=blue; 56 a[42][y]=blue; 57 a[43][y]=black; 58 y++;//4 59 for(int j=12;j<35;j++){ 60 a[j][y]=zong; 61 } 62 a[2][y]=black; 63 a[3][y]=red; 64 a[4][y]=red; 65 a[5][y]=red; 66 a[6][y]=red; 67 a[7][y]=red; 68 a[8][y]=red; 69 a[9][y]=black; 70 a[10][y]=dhui; 71 a[36][y]=dhui; 72 a[11][y]=black; 73 a[35][y]=black; 74 a[37][y]=black; 75 a[38][y]=blue; 76 a[39][y]=blue; 77 a[40][y]=blue; 78 a[41][y]=blue; 79 a[42][y]=blue; 80 a[43][y]=blue; 81 a[44][y]=black; 82 y++;//5 83 for(int j=12;j<35;j++){ 84 a[j][y]=zong; 85 } 86 a[1][y]=black; 87 a[2][y]=red; 88 a[3][y]=red; 89 a[4][y]=black; 90 a[5][y]=red; 91 a[6][y]=red; 92 a[7][y]=red; 93 a[8][y]=red; 94 a[9][y]=black; 95 a[10][y]=dhui; 96 a[36][y]=dhui; 97 a[11][y]=black; 98 a[20][y]=black; 99 a[21][y]=black; 100 a[22][y]=black; 101 a[27][y]=black; 102 a[28][y]=black; 103 a[29][y]=black; 104 a[35][y]=black; 105 a[37][y]=black; 106 a[38][y]=blue; 107 a[39][y]=blue; 108 a[40][y]=blue; 109 a[41][y]=blue; 110 a[42][y]=black; 111 a[43][y]=blue; 112 a[44][y]=blue; 113 a[45][y]=black; 114 y++;//6 115 a[1][y]=black; 116 a[2][y]=red; 117 a[3][y]=red; 118 a[4][y]=red; 119 a[5][y]=red; 120 a[6][y]=red; 121 a[7][y]=red; 122 a[8][y]=red; 123 a[9][y]=black; 124 a[10][y]=dhui; 125 a[11][y]=black; 126 a[12][y]=black; 127 a[13][y]=black; 128 a[14][y]=black; 129 a[15][y]=black; 130 a[16][y]=black; 131 a[17][y]=dlan; 132 a[18][y]=black; 133 a[19][y]=black; 134 a[20][y]=red; 135 a[21][y]=red; 136 a[22][y]=black; 137 a[23][y]=blue; 138 a[24][y]=black; 139 a[25][y]=black; 140 a[26][y]=blue; 141 a[27][y]=black; 142 a[28][y]=red; 143 a[29][y]=red; 144 a[30][y]=black; 145 a[31][y]=black; 146 a[32][y]=black; 147 a[33][y]=black; 148 a[34][y]=black; 149 a[35][y]=black; 150 a[36][y]=dhui; 151 a[37][y]=black; 152 a[38][y]=blue; 153 a[39][y]=blue; 154 a[40][y]=blue; 155 a[41][y]=blue; 156 a[42][y]=blue; 157 a[43][y]=blue; 158 a[44][y]=blue; 159 a[45][y]=black; 160 y++;//7 161 a[1][y]=black; 162 a[2][y]=red; 163 a[3][y]=red; 164 a[4][y]=black; 165 a[5][y]=black; 166 a[6][y]=red; 167 a[7][y]=red; 168 a[8][y]=red; 169 a[9][y]=black; 170 a[10][y]=dhui; 171 a[11][y]=black; 172 a[12][y]=hlu; 173 a[13][y]=hlu; 174 a[14][y]=hlu; 175 a[15][y]=hlu; 176 a[16][y]=black; 177 a[17][y]=dlan; 178 a[18][y]=black; 179 a[19][y]=red; 180 a[20][y]=red; 181 a[21][y]=black; 182 a[22][y]=blue; 183 a[23][y]=blue; 184 a[24][y]=blue; 185 a[25][y]=blue; 186 a[26][y]=blue; 187 a[27][y]=blue; 188 a[28][y]=black; 189 a[29][y]=black; 190 a[30][y]=dlan; 191 a[31][y]=black; 192 a[32][y]=yellow; 193 a[33][y]=black; 194 a[34][y]=yellow; 195 a[35][y]=black; 196 a[36][y]=dhui; 197 a[37][y]=black; 198 a[38][y]=blue; 199 a[39][y]=blue; 200 a[40][y]=blue; 201 a[41][y]=blue; 202 a[42][y]=blue; 203 a[43][y]=blue; 204 a[44][y]=blue; 205 a[45][y]=black; 206 y++;//8 207 a[1][y]=black; 208 a[2][y]=red; 209 a[3][y]=black; 210 a[4][y]=dhui; 211 a[5][y]=dhui; 212 a[6][y]=black; 213 a[7][y]=red; 214 a[8][y]=red; 215 a[9][y]=black; 216 a[10][y]=dhui; 217 a[11][y]=black; 218 a[12][y]=hlu; 219 a[13][y]=hlu; 220 a[14][y]=hlu; 221 a[15][y]=hlu; 222 a[16][y]=black; 223 a[17][y]=black; 224 a[18][y]=bait; 225 a[19][y]=black; 226 a[20][y]=black; 227 a[21][y]=blue; 228 a[22][y]=blue; 229 a[23][y]=yellow; 230 a[24][y]=blue; 231 a[25][y]=blue; 232 a[26][y]=black; 233 a[27][y]=black; 234 a[28][y]=bait; 235 a[29][y]=bait; 236 a[30][y]=black; 237 a[31][y]=black; 238 a[32][y]=yellow; 239 a[33][y]=black; 240 a[34][y]=yellow; 241 a[35][y]=black; 242 a[36][y]=dhui; 243 a[37][y]=black; 244 a[38][y]=blue; 245 a[39][y]=blue; 246 a[40][y]=blue; 247 a[41][y]=black; 248 a[42][y]=blue; 249 a[43][y]=blue; 250 a[44][y]=blue; 251 a[45][y]=black; 252 y++;//9 253 a[1][y]=black; 254 a[2][y]=red; 255 a[3][y]=black; 256 a[4][y]=dhui; 257 a[5][y]=dhui; 258 a[6][y]=black; 259 a[7][y]=red; 260 a[8][y]=red; 261 a[9][y]=black; 262 a[10][y]=dhui; 263 a[11][y]=black; 264 a[12][y]=hlu; 265 a[13][y]=black; 266 a[14][y]=hlu; 267 a[15][y]=hlu; 268 a[16][y]=black; 269 a[17][y]=black; 270 a[18][y]=bait; 271 a[19][y]=red; 272 a[20][y]=blue; 273 a[21][y]=blue; 274 a[22][y]=blue; 275 a[23][y]=blue; 276 a[24][y]=blue; 277 a[25][y]=black; 278 a[26][y]=red; 279 a[27][y]=red; 280 a[28][y]=bait; 281 a[29][y]=bait; 282 a[30][y]=bait; 283 a[31][y]=black; 284 a[32][y]=black; 285 a[33][y]=yellow; 286 a[34][y]=black; 287 a[35][y]=black; 288 a[36][y]=dhui; 289 a[37][y]=black; 290 a[38][y]=blue; 291 a[39][y]=blue; 292 a[40][y]=black; 293 a[41][y]=black; 294 a[42][y]=black; 295 a[43][y]=blue; 296 a[44][y]=blue; 297 a[45][y]=black; 298 y++;//10 299 a[1][y]=black; 300 a[2][y]=red; 301 a[3][y]=red; 302 a[4][y]=black; 303 a[5][y]=black; 304 a[6][y]=red; 305 a[7][y]=red; 306 a[8][y]=red; 307 a[9][y]=black; 308 a[10][y]=dhui; 309 a[11][y]=black; 310 a[12][y]=hlu; 311 a[13][y]=black; 312 a[14][y]=hlu; 313 a[15][y]=black; 314 a[16][y]=dlan; 315 a[17][y]=black; 316 a[18][y]=black; 317 a[19][y]=red; 318 a[20][y]=black; 319 a[21][y]=red; 320 a[22][y]=red; 321 a[23][y]=blue; 322 a[24][y]=blue; 323 a[25][y]=red; 324 a[26][y]=red; 325 a[27][y]=red; 326 a[28][y]=red; 327 a[29][y]=bait; 328 a[30][y]=bait; 329 a[31][y]=black; 330 a[32][y]=dlan; 331 a[33][y]=dlan; 332 a[34][y]=dlan; 333 a[35][y]=black; 334 a[36][y]=dhui; 335 a[37][y]=black; 336 a[38][y]=blue; 337 a[39][y]=blue; 338 a[40][y]=blue; 339 a[41][y]=black; 340 a[42][y]=blue; 341 a[43][y]=blue; 342 a[44][y]=blue; 343 a[45][y]=black; 344 y++;//11 345 a[1][y]=black; 346 a[2][y]=red; 347 a[3][y]=red; 348 a[4][y]=red; 349 a[5][y]=red; 350 a[6][y]=red; 351 a[7][y]=red; 352 a[8][y]=red; 353 a[9][y]=black; 354 a[10][y]=dhui; 355 a[11][y]=black; 356 a[12][y]=hlu; 357 a[13][y]=hlu; 358 a[14][y]=hlu; 359 a[15][y]=black; 360 a[16][y]=dlan; 361 a[17][y]=dlan; 362 a[18][y]=dlan; 363 a[19][y]=black; 364 a[20][y]=black; 365 a[21][y]=black; 366 a[22][y]=red; 367 a[23][y]=red; 368 a[24][y]=blue; 369 a[25][y]=blue; 370 a[26][y]=red; 371 a[27][y]=red; 372 a[28][y]=red; 373 a[29][y]=black; 374 a[30][y]=black; 375 a[31][y]=dlan; 376 a[32][y]=dlan; 377 a[33][y]=dlan; 378 a[34][y]=dlan; 379 a[35][y]=black; 380 a[36][y]=dhui; 381 a[37][y]=black; 382 a[38][y]=blue; 383 a[39][y]=blue; 384 a[40][y]=blue; 385 a[41][y]=blue; 386 a[42][y]=blue; 387 a[43][y]=blue; 388 a[44][y]=blue; 389 a[45][y]=black; 390 y++;//12 391 a[1][y]=black; 392 a[2][y]=red; 393 a[3][y]=red; 394 a[4][y]=red; 395 a[5][y]=red; 396 a[6][y]=red; 397 a[7][y]=red; 398 a[8][y]=red; 399 a[9][y]=black; 400 a[10][y]=dhui; 401 a[11][y]=black; 402 a[12][y]=hlu; 403 a[13][y]=hlu; 404 a[14][y]=black; 405 a[15][y]=dlan; 406 a[16][y]=dlan; 407 a[17][y]=dlan; 408 a[18][y]=dlan; 409 a[19][y]=dlan; 410 a[20][y]=black; 411 a[21][y]=bait; 412 a[22][y]=bait; 413 a[23][y]=bait; 414 a[24][y]=bait; 415 a[25][y]=bait; 416 a[26][y]=black; 417 a[27][y]=black; 418 a[28][y]=black; 419 a[29][y]=dlan; 420 a[30][y]=dlan; 421 a[31][y]=dlan; 422 a[32][y]=dlan; 423 a[33][y]=dlan; 424 a[34][y]=dlan; 425 a[35][y]=black; 426 a[36][y]=dhui; 427 a[37][y]=black; 428 a[38][y]=blue; 429 a[39][y]=blue; 430 a[40][y]=blue; 431 a[41][y]=blue; 432 a[42][y]=blue; 433 a[43][y]=blue; 434 a[44][y]=blue; 435 a[45][y]=black; 436 y++;//13 437 a[1][y]=black; 438 a[2][y]=red; 439 a[3][y]=red; 440 a[4][y]=red; 441 a[5][y]=red; 442 a[6][y]=red; 443 a[7][y]=red; 444 a[8][y]=red; 445 a[9][y]=black; 446 a[10][y]=dhui; 447 a[11][y]=black; 448 a[12][y]=black; 449 a[13][y]=black; 450 a[14][y]=dlan; 451 a[15][y]=dlan; 452 a[16][y]=dlan; 453 a[17][y]=dlan; 454 a[18][y]=dlan; 455 a[19][y]=black; 456 a[20][y]=black; 457 a[21][y]=black; 458 a[22][y]=black; 459 a[23][y]=black; 460 a[24][y]=bait; 461 a[25][y]=bait; 462 a[26][y]=bait; 463 a[27][y]=black; 464 a[28][y]=black; 465 a[29][y]=dlan; 466 a[30][y]=dlan; 467 a[31][y]=dlan; 468 a[32][y]=dlan; 469 a[33][y]=dlan; 470 a[34][y]=dlan; 471 a[35][y]=black; 472 a[36][y]=dhui; 473 a[37][y]=black; 474 a[38][y]=blue; 475 a[39][y]=blue; 476 a[40][y]=blue; 477 a[41][y]=blue; 478 a[42][y]=blue; 479 a[43][y]=blue; 480 a[44][y]=blue; 481 a[45][y]=black; 482 y++;//14 483 a[1][y]=black; 484 a[2][y]=red; 485 a[3][y]=red; 486 a[4][y]=black; 487 a[5][y]=red; 488 a[6][y]=red; 489 a[7][y]=red; 490 a[8][y]=red; 491 a[9][y]=black; 492 a[10][y]=dhui; 493 a[11][y]=black; 494 a[12][y]=dlan; 495 a[13][y]=dlan; 496 a[14][y]=dlan; 497 a[15][y]=dlan; 498 a[16][y]=dlan; 499 a[17][y]=dlan; 500 a[18][y]=black; 501 a[19][y]=bait; 502 a[20][y]=bait; 503 a[21][y]=bait; 504 a[22][y]=black; 505 a[23][y]=bait; 506 a[24][y]=bait; 507 a[25][y]=black; 508 a[26][y]=black; 509 a[27][y]=bait; 510 a[28][y]=bait; 511 a[29][y]=black; 512 a[30][y]=dlan; 513 a[31][y]=dlan; 514 a[32][y]=dlan; 515 a[33][y]=dlan; 516 a[34][y]=dlan; 517 a[35][y]=black; 518 a[36][y]=dhui; 519 a[37][y]=black; 520 a[38][y]=blue; 521 a[39][y]=blue; 522 a[40][y]=blue; 523 a[41][y]=black; 524 a[42][y]=black; 525 a[43][y]=blue; 526 a[44][y]=blue; 527 a[45][y]=black; 528 y++;//15 529 a[1][y]=black; 530 a[2][y]=red; 531 a[3][y]=black; 532 a[4][y]=black; 533 a[5][y]=black; 534 a[6][y]=red; 535 a[7][y]=red; 536 a[8][y]=red; 537 a[9][y]=black; 538 a[10][y]=dhui; 539 a[11][y]=black; 540 a[12][y]=dlan; 541 a[13][y]=dlan; 542 a[14][y]=dlan; 543 a[15][y]=dlan; 544 a[16][y]=dlan; 545 a[17][y]=dlan; 546 a[18][y]=black; 547 a[19][y]=bait; 548 a[20][y]=bait; 549 a[21][y]=bait; 550 a[22][y]=bait; 551 a[23][y]=bait; 552 a[24][y]=bait; 553 a[25][y]=black; 554 a[26][y]=black; 555 a[27][y]=bait; 556 a[28][y]=bait; 557 a[29][y]=black; 558 a[30][y]=dlan; 559 a[31][y]=dlan; 560 a[32][y]=dlan; 561 a[33][y]=dlan; 562 a[34][y]=dlan; 563 a[35][y]=black; 564 a[36][y]=dhui; 565 a[37][y]=black; 566 a[38][y]=blue; 567 a[39][y]=blue; 568 a[40][y]=black; 569 a[41][y]=dhui; 570 a[42][y]=dhui; 571 a[43][y]=black; 572 a[44][y]=blue; 573 a[45][y]=black; 574 y++;//16 575 a[1][y]=black; 576 a[2][y]=red; 577 a[3][y]=red; 578 a[4][y]=black; 579 a[5][y]=red; 580 a[6][y]=red; 581 a[7][y]=red; 582 a[8][y]=red; 583 a[9][y]=black; 584 a[10][y]=dhui; 585 a[11][y]=black; 586 a[12][y]=dlan; 587 a[13][y]=dlan; 588 a[14][y]=dlan; 589 a[15][y]=dlan; 590 a[16][y]=dlan; 591 a[17][y]=dlan; 592 a[18][y]=dlan; 593 a[19][y]=black; 594 a[20][y]=black; 595 a[21][y]=black; 596 a[22][y]=bait; 597 a[23][y]=black; 598 a[24][y]=bait; 599 a[25][y]=bait; 600 a[26][y]=black; 601 a[27][y]=black; 602 a[28][y]=black; 603 a[29][y]=dlan; 604 a[30][y]=black; 605 a[31][y]=black; 606 a[32][y]=black; 607 a[33][y]=black; 608 a[34][y]=black; 609 a[35][y]=black; 610 a[36][y]=dhui; 611 a[37][y]=black; 612 a[38][y]=blue; 613 a[39][y]=blue; 614 a[40][y]=black; 615 a[41][y]=dhui; 616 a[42][y]=dhui; 617 a[43][y]=black; 618 a[44][y]=blue; 619 a[45][y]=black; 620 y++;//17 621 a[1][y]=black; 622 a[2][y]=red; 623 a[3][y]=red; 624 a[4][y]=red; 625 a[5][y]=red; 626 a[6][y]=black; 627 a[7][y]=red; 628 a[8][y]=red; 629 a[9][y]=black; 630 a[10][y]=dhui; 631 a[11][y]=black; 632 a[12][y]=dlan; 633 a[13][y]=dlan; 634 a[14][y]=dlan; 635 a[15][y]=dlan; 636 a[16][y]=dlan; 637 a[17][y]=dlan; 638 a[18][y]=black; 639 a[19][y]=red; 640 a[20][y]=red; 641 a[21][y]=red; 642 a[22][y]=red; 643 a[23][y]=red; 644 a[24][y]=red; 645 a[25][y]=red; 646 a[26][y]=red; 647 a[27][y]=red; 648 a[28][y]=black; 649 a[29][y]=black; 650 a[30][y]=black; 651 a[35][y]=black; 652 a[36][y]=dhui; 653 a[37][y]=black; 654 a[38][y]=blue; 655 a[39][y]=blue; 656 a[40][y]=blue; 657 a[41][y]=black; 658 a[42][y]=black; 659 a[43][y]=blue; 660 a[44][y]=blue; 661 a[45][y]=black; 662 y++;//18 663 a[1][y]=black; 664 a[2][y]=red; 665 a[3][y]=red; 666 a[4][y]=red; 667 a[5][y]=black; 668 a[6][y]=black; 669 a[7][y]=black; 670 a[8][y]=red; 671 a[9][y]=black; 672 a[10][y]=dhui; 673 a[11][y]=black; 674 a[12][y]=dlan; 675 a[13][y]=dlan; 676 a[14][y]=dlan; 677 a[15][y]=dlan; 678 a[16][y]=dlan; 679 a[17][y]=dlan; 680 a[18][y]=dlan; 681 a[19][y]=black; 682 a[20][y]=black; 683 a[21][y]=black; 684 a[22][y]=red; 685 a[23][y]=red; 686 a[24][y]=red; 687 a[25][y]=red; 688 a[26][y]=red; 689 a[27][y]=black; 690 a[28][y]=black; 691 a[35][y]=black; 692 a[36][y]=dhui; 693 a[37][y]=black; 694 a[38][y]=blue; 695 a[39][y]=blue; 696 a[40][y]=blue; 697 a[41][y]=blue; 698 a[42][y]=blue; 699 a[43][y]=blue; 700 a[44][y]=blue; 701 a[45][y]=black; 702 y++;//19 703 a[2][y]=black; 704 a[3][y]=red; 705 a[4][y]=red; 706 a[5][y]=red; 707 a[6][y]=black; 708 a[7][y]=red; 709 a[8][y]=red; 710 a[9][y]=black; 711 a[10][y]=dhui; 712 a[11][y]=black; 713 a[12][y]=dlan; 714 a[13][y]=dlan; 715 a[14][y]=dlan; 716 a[15][y]=dlan; 717 a[16][y]=dlan; 718 a[17][y]=dlan; 719 a[18][y]=dlan; 720 a[19][y]=dlan; 721 a[20][y]=dlan; 722 a[21][y]=black; 723 a[22][y]=black; 724 a[23][y]=black; 725 a[24][y]=black; 726 a[25][y]=black; 727 a[26][y]=black; 728 a[27][y]=black; 729 a[35][y]=black; 730 a[36][y]=dhui; 731 a[37][y]=black; 732 a[38][y]=blue; 733 a[39][y]=black; 734 a[40][y]=black; 735 a[41][y]=blue; 736 a[42][y]=blue; 737 a[43][y]=blue; 738 a[44][y]=black; 739 y++;//20 740 for(int j=9;j<38;j++){ 741 a[j][y]=black; 742 } 743 a[3][y]=black; 744 a[4][y]=red; 745 a[5][y]=red; 746 a[6][y]=red; 747 a[7][y]=red; 748 a[8][y]=red; 749 a[10][y]=dhui; 750 a[36][y]=dhui; 751 a[38][y]=blue; 752 a[39][y]=blue; 753 a[40][y]=blue; 754 a[41][y]=blue; 755 a[42][y]=blue; 756 a[43][y]=black; 757 y++;//21 758 for(int j=10;j<37;j++){ 759 a[j][y]=dhui; 760 } 761 a[4][y]=black; 762 a[5][y]=black; 763 a[6][y]=red; 764 a[7][y]=red; 765 a[8][y]=red; 766 a[9][y]=black; 767 a[37][y]=black; 768 a[38][y]=blue; 769 a[39][y]=blue; 770 a[40][y]=blue; 771 a[41][y]=black; 772 a[42][y]=black; 773 y++;//22 774 for(int j=6;j<41;j++){ 775 a[j][y]=black; 776 } 777 for(int i=0;i<46;i++){ 778 for(int k=0;k<23;k++){ 779 if(a[i][k]==""){ 780 id="251"; 781 data="0"; 782 }else{ 783 id=a[i][k].substr(0,a[i][k].find(",")); 784 data=a[i][k].substr(a[i][k].find(",")+1); 785 } 786 mc.setBlock(x_+i,y_+k,z_+z,stoi(id),stoi(data)); 787 Sleep(10); 788 } 789 } 790 return 0; 791 }
标签:mc,int,游戏机,35,bool,include,true From: https://www.cnblogs.com/fushuxuan/p/17488713.html