1 /* 2 * This file has been automatically generated by Soupply and released under the MIT license. 3 * Generated from data/java393.xml 4 */ 5 module soupply.java393.protocol.play_serverbound; 6 7 static import std.conv; 8 import std.typetuple : TypeTuple; 9 import xpacket; 10 11 import soupply.util; 12 import soupply.java393.metadata : Metadata; 13 import soupply.java393.packet : Java393Packet; 14 15 static import soupply.java393.types; 16 17 alias Packets = TypeTuple!(TeleportConfirm, QueryBlockNbt, ChatMessage, ClientStatus, ClientSettings, TabComplete, ConfirmTransaction, EnchantItem, ClickWindow, CloseWindow, PluginMessage, EditBook, QueryEntityNbt, UseEntity, KeepAlive, Player, PlayerPosition, PlayerPositionAndLook, PlayerLook, VehicleMove, SteerBoat, PickItem, CraftRecipeRequest, PlayerAbilities, PlayerDigging, EntityAction, SteerVehicle, RecipeBookData, NameItem, ResourcePackStatus, AdvencementTab, SelectTrade, SetBeaconEffect, HeldItemChange, UpdateCommandBlock, UpdateCommandBlockMinecart, CreativeInventoryAction, UpdateStructureBlock, UpdateSign, Animation, Spectate, PlayerBlockPlacement, UseItem); 18 19 class TeleportConfirm : Java393Packet 20 { 21 22 enum uint ID = 0; 23 24 enum bool CLIENTBOUND = false; 25 enum bool SERVERBOUND = true; 26 27 enum string[] __fields = ["teleportId"]; 28 29 @Var uint teleportId; 30 31 this() pure nothrow @safe @nogc {} 32 33 this(uint teleportId) pure nothrow @safe @nogc 34 { 35 this.teleportId = teleportId; 36 } 37 38 mixin Make; 39 40 public static typeof(this) fromBuffer(ubyte[] buffer) 41 { 42 TeleportConfirm ret = new TeleportConfirm(); 43 ret.decode(buffer); 44 return ret; 45 } 46 47 override string toString() 48 { 49 return "TeleportConfirm(teleportId: " ~ std.conv.to!string(this.teleportId) ~ ")"; 50 } 51 52 } 53 54 class QueryBlockNbt : Java393Packet 55 { 56 57 enum uint ID = 1; 58 59 enum bool CLIENTBOUND = false; 60 enum bool SERVERBOUND = true; 61 62 enum string[] __fields = ["transationId", "location"]; 63 64 @Var uint transationId; 65 ulong location; 66 67 this() pure nothrow @safe @nogc {} 68 69 this(uint transationId, ulong location=ulong.init) pure nothrow @safe @nogc 70 { 71 this.transationId = transationId; 72 this.location = location; 73 } 74 75 mixin Make; 76 77 public static typeof(this) fromBuffer(ubyte[] buffer) 78 { 79 QueryBlockNbt ret = new QueryBlockNbt(); 80 ret.decode(buffer); 81 return ret; 82 } 83 84 override string toString() 85 { 86 return "QueryBlockNbt(transationId: " ~ std.conv.to!string(this.transationId) ~ ", location: " ~ std.conv.to!string(this.location) ~ ")"; 87 } 88 89 } 90 91 class ChatMessage : Java393Packet 92 { 93 94 enum uint ID = 2; 95 96 enum bool CLIENTBOUND = false; 97 enum bool SERVERBOUND = true; 98 99 enum string[] __fields = ["text"]; 100 101 string text; 102 103 this() pure nothrow @safe @nogc {} 104 105 this(string text) pure nothrow @safe @nogc 106 { 107 this.text = text; 108 } 109 110 mixin Make; 111 112 public static typeof(this) fromBuffer(ubyte[] buffer) 113 { 114 ChatMessage ret = new ChatMessage(); 115 ret.decode(buffer); 116 return ret; 117 } 118 119 override string toString() 120 { 121 return "ChatMessage(text: " ~ std.conv.to!string(this.text) ~ ")"; 122 } 123 124 } 125 126 class ClientStatus : Java393Packet 127 { 128 129 enum uint ID = 3; 130 131 enum bool CLIENTBOUND = false; 132 enum bool SERVERBOUND = true; 133 134 // action 135 enum uint RESPAWN = 0; 136 enum uint REQUEST_STATS = 1; 137 138 enum string[] __fields = ["action"]; 139 140 @Var uint action; 141 142 this() pure nothrow @safe @nogc {} 143 144 this(uint action) pure nothrow @safe @nogc 145 { 146 this.action = action; 147 } 148 149 mixin Make; 150 151 public static typeof(this) fromBuffer(ubyte[] buffer) 152 { 153 ClientStatus ret = new ClientStatus(); 154 ret.decode(buffer); 155 return ret; 156 } 157 158 override string toString() 159 { 160 return "ClientStatus(action: " ~ std.conv.to!string(this.action) ~ ")"; 161 } 162 163 } 164 165 class ClientSettings : Java393Packet 166 { 167 168 enum uint ID = 4; 169 170 enum bool CLIENTBOUND = false; 171 enum bool SERVERBOUND = true; 172 173 // chat mode 174 enum uint ENABLED = 0; 175 enum uint COMMANDS_ONLY = 1; 176 enum uint DISABLED = 2; 177 178 // displayed skin parts 179 enum ubyte CAPE = 1; 180 enum ubyte JACKET = 2; 181 enum ubyte LEFT_SLEEVE = 4; 182 enum ubyte RIGHT_SLEEVE = 8; 183 enum ubyte LEFT_PANTS = 16; 184 enum ubyte RIGHT_PANTS = 32; 185 enum ubyte HAT = 64; 186 187 // main hand 188 enum ubyte RIGHT = 0; 189 enum ubyte LEFT = 1; 190 191 enum string[] __fields = ["language", "viewDistance", "chatMode", "chatColors", "displayedSkinParts", "mainHand"]; 192 193 string language; 194 ubyte viewDistance; 195 @Var uint chatMode; 196 bool chatColors; 197 ubyte displayedSkinParts; 198 ubyte mainHand; 199 200 this() pure nothrow @safe @nogc {} 201 202 this(string language, ubyte viewDistance=ubyte.init, uint chatMode=uint.init, bool chatColors=bool.init, ubyte displayedSkinParts=ubyte.init, ubyte mainHand=ubyte.init) pure nothrow @safe @nogc 203 { 204 this.language = language; 205 this.viewDistance = viewDistance; 206 this.chatMode = chatMode; 207 this.chatColors = chatColors; 208 this.displayedSkinParts = displayedSkinParts; 209 this.mainHand = mainHand; 210 } 211 212 mixin Make; 213 214 public static typeof(this) fromBuffer(ubyte[] buffer) 215 { 216 ClientSettings ret = new ClientSettings(); 217 ret.decode(buffer); 218 return ret; 219 } 220 221 override string toString() 222 { 223 return "ClientSettings(language: " ~ std.conv.to!string(this.language) ~ ", viewDistance: " ~ std.conv.to!string(this.viewDistance) ~ ", chatMode: " ~ std.conv.to!string(this.chatMode) ~ ", chatColors: " ~ std.conv.to!string(this.chatColors) ~ ", displayedSkinParts: " ~ std.conv.to!string(this.displayedSkinParts) ~ ", mainHand: " ~ std.conv.to!string(this.mainHand) ~ ")"; 224 } 225 226 } 227 228 class TabComplete : Java393Packet 229 { 230 231 enum uint ID = 5; 232 233 enum bool CLIENTBOUND = false; 234 enum bool SERVERBOUND = true; 235 236 enum string[] __fields = ["transactionId", "text"]; 237 238 @Var uint transactionId; 239 string text; 240 241 this() pure nothrow @safe @nogc {} 242 243 this(uint transactionId, string text=string.init) pure nothrow @safe @nogc 244 { 245 this.transactionId = transactionId; 246 this.text = text; 247 } 248 249 mixin Make; 250 251 public static typeof(this) fromBuffer(ubyte[] buffer) 252 { 253 TabComplete ret = new TabComplete(); 254 ret.decode(buffer); 255 return ret; 256 } 257 258 override string toString() 259 { 260 return "TabComplete(transactionId: " ~ std.conv.to!string(this.transactionId) ~ ", text: " ~ std.conv.to!string(this.text) ~ ")"; 261 } 262 263 } 264 265 class ConfirmTransaction : Java393Packet 266 { 267 268 enum uint ID = 6; 269 270 enum bool CLIENTBOUND = false; 271 enum bool SERVERBOUND = true; 272 273 enum string[] __fields = ["window", "action", "accepted"]; 274 275 ubyte window; 276 ushort action; 277 bool accepted; 278 279 this() pure nothrow @safe @nogc {} 280 281 this(ubyte window, ushort action=ushort.init, bool accepted=bool.init) pure nothrow @safe @nogc 282 { 283 this.window = window; 284 this.action = action; 285 this.accepted = accepted; 286 } 287 288 mixin Make; 289 290 public static typeof(this) fromBuffer(ubyte[] buffer) 291 { 292 ConfirmTransaction ret = new ConfirmTransaction(); 293 ret.decode(buffer); 294 return ret; 295 } 296 297 override string toString() 298 { 299 return "ConfirmTransaction(window: " ~ std.conv.to!string(this.window) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", accepted: " ~ std.conv.to!string(this.accepted) ~ ")"; 300 } 301 302 } 303 304 class EnchantItem : Java393Packet 305 { 306 307 enum uint ID = 7; 308 309 enum bool CLIENTBOUND = false; 310 enum bool SERVERBOUND = true; 311 312 enum string[] __fields = ["window", "enchantment"]; 313 314 ubyte window; 315 ubyte enchantment; 316 317 this() pure nothrow @safe @nogc {} 318 319 this(ubyte window, ubyte enchantment=ubyte.init) pure nothrow @safe @nogc 320 { 321 this.window = window; 322 this.enchantment = enchantment; 323 } 324 325 mixin Make; 326 327 public static typeof(this) fromBuffer(ubyte[] buffer) 328 { 329 EnchantItem ret = new EnchantItem(); 330 ret.decode(buffer); 331 return ret; 332 } 333 334 override string toString() 335 { 336 return "EnchantItem(window: " ~ std.conv.to!string(this.window) ~ ", enchantment: " ~ std.conv.to!string(this.enchantment) ~ ")"; 337 } 338 339 } 340 341 class ClickWindow : Java393Packet 342 { 343 344 enum uint ID = 8; 345 346 enum bool CLIENTBOUND = false; 347 enum bool SERVERBOUND = true; 348 349 enum string[] __fields = ["window", "slot", "button", "action", "mode", "clickedItem"]; 350 351 ubyte window; 352 ushort slot; 353 ubyte button; 354 ushort action; 355 @Var uint mode; 356 soupply.java393.types.Slot clickedItem; 357 358 this() pure nothrow @safe @nogc {} 359 360 this(ubyte window, ushort slot=ushort.init, ubyte button=ubyte.init, ushort action=ushort.init, uint mode=uint.init, soupply.java393.types.Slot clickedItem=soupply.java393.types.Slot.init) pure nothrow @safe @nogc 361 { 362 this.window = window; 363 this.slot = slot; 364 this.button = button; 365 this.action = action; 366 this.mode = mode; 367 this.clickedItem = clickedItem; 368 } 369 370 mixin Make; 371 372 public static typeof(this) fromBuffer(ubyte[] buffer) 373 { 374 ClickWindow ret = new ClickWindow(); 375 ret.decode(buffer); 376 return ret; 377 } 378 379 override string toString() 380 { 381 return "ClickWindow(window: " ~ std.conv.to!string(this.window) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ", button: " ~ std.conv.to!string(this.button) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ", clickedItem: " ~ std.conv.to!string(this.clickedItem) ~ ")"; 382 } 383 384 } 385 386 class CloseWindow : Java393Packet 387 { 388 389 enum uint ID = 9; 390 391 enum bool CLIENTBOUND = false; 392 enum bool SERVERBOUND = true; 393 394 enum string[] __fields = ["window"]; 395 396 ubyte window; 397 398 this() pure nothrow @safe @nogc {} 399 400 this(ubyte window) pure nothrow @safe @nogc 401 { 402 this.window = window; 403 } 404 405 mixin Make; 406 407 public static typeof(this) fromBuffer(ubyte[] buffer) 408 { 409 CloseWindow ret = new CloseWindow(); 410 ret.decode(buffer); 411 return ret; 412 } 413 414 override string toString() 415 { 416 return "CloseWindow(window: " ~ std.conv.to!string(this.window) ~ ")"; 417 } 418 419 } 420 421 class PluginMessage : Java393Packet 422 { 423 424 enum uint ID = 10; 425 426 enum bool CLIENTBOUND = false; 427 enum bool SERVERBOUND = true; 428 429 enum string[] __fields = ["channel", "data"]; 430 431 string channel; 432 @NoLength ubyte[] data; 433 434 this() pure nothrow @safe @nogc {} 435 436 this(string channel, ubyte[] data=(ubyte[]).init) pure nothrow @safe @nogc 437 { 438 this.channel = channel; 439 this.data = data; 440 } 441 442 mixin Make; 443 444 public static typeof(this) fromBuffer(ubyte[] buffer) 445 { 446 PluginMessage ret = new PluginMessage(); 447 ret.decode(buffer); 448 return ret; 449 } 450 451 override string toString() 452 { 453 return "PluginMessage(channel: " ~ std.conv.to!string(this.channel) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 454 } 455 456 } 457 458 class EditBook : Java393Packet 459 { 460 461 enum uint ID = 11; 462 463 enum bool CLIENTBOUND = false; 464 enum bool SERVERBOUND = true; 465 466 enum string[] __fields = ["newBook", "signing"]; 467 468 soupply.java393.types.Slot newBook; 469 bool signing; 470 471 this() pure nothrow @safe @nogc {} 472 473 this(soupply.java393.types.Slot newBook, bool signing=bool.init) pure nothrow @safe @nogc 474 { 475 this.newBook = newBook; 476 this.signing = signing; 477 } 478 479 mixin Make; 480 481 public static typeof(this) fromBuffer(ubyte[] buffer) 482 { 483 EditBook ret = new EditBook(); 484 ret.decode(buffer); 485 return ret; 486 } 487 488 override string toString() 489 { 490 return "EditBook(newBook: " ~ std.conv.to!string(this.newBook) ~ ", signing: " ~ std.conv.to!string(this.signing) ~ ")"; 491 } 492 493 } 494 495 class QueryEntityNbt : Java393Packet 496 { 497 498 enum uint ID = 12; 499 500 enum bool CLIENTBOUND = false; 501 enum bool SERVERBOUND = true; 502 503 enum string[] __fields = ["transactionId", "entityId"]; 504 505 @Var uint transactionId; 506 @Var uint entityId; 507 508 this() pure nothrow @safe @nogc {} 509 510 this(uint transactionId, uint entityId=uint.init) pure nothrow @safe @nogc 511 { 512 this.transactionId = transactionId; 513 this.entityId = entityId; 514 } 515 516 mixin Make; 517 518 public static typeof(this) fromBuffer(ubyte[] buffer) 519 { 520 QueryEntityNbt ret = new QueryEntityNbt(); 521 ret.decode(buffer); 522 return ret; 523 } 524 525 override string toString() 526 { 527 return "QueryEntityNbt(transactionId: " ~ std.conv.to!string(this.transactionId) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ")"; 528 } 529 530 } 531 532 class UseEntity : Java393Packet 533 { 534 535 enum uint ID = 13; 536 537 enum bool CLIENTBOUND = false; 538 enum bool SERVERBOUND = true; 539 540 // type 541 enum uint INTERACT = 0; 542 enum uint ATTACK = 1; 543 enum uint INTERACT_AT = 2; 544 545 // hand 546 enum uint MAIN_HAND = 0; 547 enum uint OFF_HAND = 1; 548 549 enum string[] __fields = ["target", "type", "targetPosition", "hand"]; 550 551 @Var uint target; 552 @Var uint type; 553 @Condition("type==2") Vector!(float, "xyz") targetPosition; 554 @Condition("type==0||type==2") @Var uint hand; 555 556 this() pure nothrow @safe @nogc {} 557 558 this(uint target, uint type=uint.init, Vector!(float, "xyz") targetPosition=Vector!(float, "xyz").init, uint hand=uint.init) pure nothrow @safe @nogc 559 { 560 this.target = target; 561 this.type = type; 562 this.targetPosition = targetPosition; 563 this.hand = hand; 564 } 565 566 mixin Make; 567 568 public static typeof(this) fromBuffer(ubyte[] buffer) 569 { 570 UseEntity ret = new UseEntity(); 571 ret.decode(buffer); 572 return ret; 573 } 574 575 override string toString() 576 { 577 return "UseEntity(target: " ~ std.conv.to!string(this.target) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", targetPosition: " ~ std.conv.to!string(this.targetPosition) ~ ", hand: " ~ std.conv.to!string(this.hand) ~ ")"; 578 } 579 580 } 581 582 class KeepAlive : Java393Packet 583 { 584 585 enum uint ID = 14; 586 587 enum bool CLIENTBOUND = false; 588 enum bool SERVERBOUND = true; 589 590 enum string[] __fields = ["id"]; 591 592 long id; 593 594 this() pure nothrow @safe @nogc {} 595 596 this(long id) pure nothrow @safe @nogc 597 { 598 this.id = id; 599 } 600 601 mixin Make; 602 603 public static typeof(this) fromBuffer(ubyte[] buffer) 604 { 605 KeepAlive ret = new KeepAlive(); 606 ret.decode(buffer); 607 return ret; 608 } 609 610 override string toString() 611 { 612 return "KeepAlive(id: " ~ std.conv.to!string(this.id) ~ ")"; 613 } 614 615 } 616 617 class Player : Java393Packet 618 { 619 620 enum uint ID = 15; 621 622 enum bool CLIENTBOUND = false; 623 enum bool SERVERBOUND = true; 624 625 enum string[] __fields = ["onGround"]; 626 627 bool onGround; 628 629 this() pure nothrow @safe @nogc {} 630 631 this(bool onGround) pure nothrow @safe @nogc 632 { 633 this.onGround = onGround; 634 } 635 636 mixin Make; 637 638 public static typeof(this) fromBuffer(ubyte[] buffer) 639 { 640 Player ret = new Player(); 641 ret.decode(buffer); 642 return ret; 643 } 644 645 override string toString() 646 { 647 return "Player(onGround: " ~ std.conv.to!string(this.onGround) ~ ")"; 648 } 649 650 } 651 652 class PlayerPosition : Java393Packet 653 { 654 655 enum uint ID = 16; 656 657 enum bool CLIENTBOUND = false; 658 enum bool SERVERBOUND = true; 659 660 enum string[] __fields = ["position", "onGround"]; 661 662 Vector!(double, "xyz") position; 663 bool onGround; 664 665 this() pure nothrow @safe @nogc {} 666 667 this(Vector!(double, "xyz") position, bool onGround=bool.init) pure nothrow @safe @nogc 668 { 669 this.position = position; 670 this.onGround = onGround; 671 } 672 673 mixin Make; 674 675 public static typeof(this) fromBuffer(ubyte[] buffer) 676 { 677 PlayerPosition ret = new PlayerPosition(); 678 ret.decode(buffer); 679 return ret; 680 } 681 682 override string toString() 683 { 684 return "PlayerPosition(position: " ~ std.conv.to!string(this.position) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")"; 685 } 686 687 } 688 689 class PlayerPositionAndLook : Java393Packet 690 { 691 692 enum uint ID = 17; 693 694 enum bool CLIENTBOUND = false; 695 enum bool SERVERBOUND = true; 696 697 enum string[] __fields = ["position", "yaw", "pitch", "onGround"]; 698 699 Vector!(double, "xyz") position; 700 float yaw; 701 float pitch; 702 bool onGround; 703 704 this() pure nothrow @safe @nogc {} 705 706 this(Vector!(double, "xyz") position, float yaw=float.init, float pitch=float.init, bool onGround=bool.init) pure nothrow @safe @nogc 707 { 708 this.position = position; 709 this.yaw = yaw; 710 this.pitch = pitch; 711 this.onGround = onGround; 712 } 713 714 mixin Make; 715 716 public static typeof(this) fromBuffer(ubyte[] buffer) 717 { 718 PlayerPositionAndLook ret = new PlayerPositionAndLook(); 719 ret.decode(buffer); 720 return ret; 721 } 722 723 override string toString() 724 { 725 return "PlayerPositionAndLook(position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")"; 726 } 727 728 } 729 730 class PlayerLook : Java393Packet 731 { 732 733 enum uint ID = 18; 734 735 enum bool CLIENTBOUND = false; 736 enum bool SERVERBOUND = true; 737 738 enum string[] __fields = ["yaw", "pitch", "onGround"]; 739 740 float yaw; 741 float pitch; 742 bool onGround; 743 744 this() pure nothrow @safe @nogc {} 745 746 this(float yaw, float pitch=float.init, bool onGround=bool.init) pure nothrow @safe @nogc 747 { 748 this.yaw = yaw; 749 this.pitch = pitch; 750 this.onGround = onGround; 751 } 752 753 mixin Make; 754 755 public static typeof(this) fromBuffer(ubyte[] buffer) 756 { 757 PlayerLook ret = new PlayerLook(); 758 ret.decode(buffer); 759 return ret; 760 } 761 762 override string toString() 763 { 764 return "PlayerLook(yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")"; 765 } 766 767 } 768 769 class VehicleMove : Java393Packet 770 { 771 772 enum uint ID = 19; 773 774 enum bool CLIENTBOUND = false; 775 enum bool SERVERBOUND = true; 776 777 enum string[] __fields = ["position", "yaw", "pitch"]; 778 779 Vector!(double, "xyz") position; 780 float yaw; 781 float pitch; 782 783 this() pure nothrow @safe @nogc {} 784 785 this(Vector!(double, "xyz") position, float yaw=float.init, float pitch=float.init) pure nothrow @safe @nogc 786 { 787 this.position = position; 788 this.yaw = yaw; 789 this.pitch = pitch; 790 } 791 792 mixin Make; 793 794 public static typeof(this) fromBuffer(ubyte[] buffer) 795 { 796 VehicleMove ret = new VehicleMove(); 797 ret.decode(buffer); 798 return ret; 799 } 800 801 override string toString() 802 { 803 return "VehicleMove(position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ")"; 804 } 805 806 } 807 808 class SteerBoat : Java393Packet 809 { 810 811 enum uint ID = 20; 812 813 enum bool CLIENTBOUND = false; 814 enum bool SERVERBOUND = true; 815 816 enum string[] __fields = ["rightPaddleTurning", "leftPaddleTurning"]; 817 818 bool rightPaddleTurning; 819 bool leftPaddleTurning; 820 821 this() pure nothrow @safe @nogc {} 822 823 this(bool rightPaddleTurning, bool leftPaddleTurning=bool.init) pure nothrow @safe @nogc 824 { 825 this.rightPaddleTurning = rightPaddleTurning; 826 this.leftPaddleTurning = leftPaddleTurning; 827 } 828 829 mixin Make; 830 831 public static typeof(this) fromBuffer(ubyte[] buffer) 832 { 833 SteerBoat ret = new SteerBoat(); 834 ret.decode(buffer); 835 return ret; 836 } 837 838 override string toString() 839 { 840 return "SteerBoat(rightPaddleTurning: " ~ std.conv.to!string(this.rightPaddleTurning) ~ ", leftPaddleTurning: " ~ std.conv.to!string(this.leftPaddleTurning) ~ ")"; 841 } 842 843 } 844 845 class PickItem : Java393Packet 846 { 847 848 enum uint ID = 21; 849 850 enum bool CLIENTBOUND = false; 851 enum bool SERVERBOUND = true; 852 853 enum string[] __fields = ["slot"]; 854 855 @Var uint slot; 856 857 this() pure nothrow @safe @nogc {} 858 859 this(uint slot) pure nothrow @safe @nogc 860 { 861 this.slot = slot; 862 } 863 864 mixin Make; 865 866 public static typeof(this) fromBuffer(ubyte[] buffer) 867 { 868 PickItem ret = new PickItem(); 869 ret.decode(buffer); 870 return ret; 871 } 872 873 override string toString() 874 { 875 return "PickItem(slot: " ~ std.conv.to!string(this.slot) ~ ")"; 876 } 877 878 } 879 880 class CraftRecipeRequest : Java393Packet 881 { 882 883 enum uint ID = 22; 884 885 enum bool CLIENTBOUND = false; 886 enum bool SERVERBOUND = true; 887 888 enum string[] __fields = ["window", "recipe", "makeAll"]; 889 890 ubyte window; 891 @Var uint recipe; 892 bool makeAll; 893 894 this() pure nothrow @safe @nogc {} 895 896 this(ubyte window, uint recipe=uint.init, bool makeAll=bool.init) pure nothrow @safe @nogc 897 { 898 this.window = window; 899 this.recipe = recipe; 900 this.makeAll = makeAll; 901 } 902 903 mixin Make; 904 905 public static typeof(this) fromBuffer(ubyte[] buffer) 906 { 907 CraftRecipeRequest ret = new CraftRecipeRequest(); 908 ret.decode(buffer); 909 return ret; 910 } 911 912 override string toString() 913 { 914 return "CraftRecipeRequest(window: " ~ std.conv.to!string(this.window) ~ ", recipe: " ~ std.conv.to!string(this.recipe) ~ ", makeAll: " ~ std.conv.to!string(this.makeAll) ~ ")"; 915 } 916 917 } 918 919 class PlayerAbilities : Java393Packet 920 { 921 922 enum uint ID = 23; 923 924 enum bool CLIENTBOUND = false; 925 enum bool SERVERBOUND = true; 926 927 // flags 928 enum ubyte CREATIVE_MODE = 1; 929 enum ubyte FLYING = 2; 930 enum ubyte ALLOW_FLYING = 4; 931 enum ubyte INVINCIBLE = 8; 932 933 enum string[] __fields = ["flags", "flyingSpeed", "walkingSpeed"]; 934 935 ubyte flags; 936 float flyingSpeed; 937 float walkingSpeed; 938 939 this() pure nothrow @safe @nogc {} 940 941 this(ubyte flags, float flyingSpeed=float.init, float walkingSpeed=float.init) pure nothrow @safe @nogc 942 { 943 this.flags = flags; 944 this.flyingSpeed = flyingSpeed; 945 this.walkingSpeed = walkingSpeed; 946 } 947 948 mixin Make; 949 950 public static typeof(this) fromBuffer(ubyte[] buffer) 951 { 952 PlayerAbilities ret = new PlayerAbilities(); 953 ret.decode(buffer); 954 return ret; 955 } 956 957 override string toString() 958 { 959 return "PlayerAbilities(flags: " ~ std.conv.to!string(this.flags) ~ ", flyingSpeed: " ~ std.conv.to!string(this.flyingSpeed) ~ ", walkingSpeed: " ~ std.conv.to!string(this.walkingSpeed) ~ ")"; 960 } 961 962 } 963 964 class PlayerDigging : Java393Packet 965 { 966 967 enum uint ID = 24; 968 969 enum bool CLIENTBOUND = false; 970 enum bool SERVERBOUND = true; 971 972 // status 973 enum uint START_DIGGING = 0; 974 enum uint CANCEL_DIGGING = 1; 975 enum uint FINISH_DIGGING = 2; 976 enum uint DROP_ITEM_STACK = 3; 977 enum uint DROP_ITEM = 4; 978 enum uint SHOOT_ARROW = 5; 979 enum uint FINISH_EATING = 5; 980 enum uint SWAP_ITEM_IN_HAND = 6; 981 982 enum string[] __fields = ["status", "position", "face"]; 983 984 @Var uint status; 985 ulong position; 986 ubyte face; 987 988 this() pure nothrow @safe @nogc {} 989 990 this(uint status, ulong position=ulong.init, ubyte face=ubyte.init) pure nothrow @safe @nogc 991 { 992 this.status = status; 993 this.position = position; 994 this.face = face; 995 } 996 997 mixin Make; 998 999 public static typeof(this) fromBuffer(ubyte[] buffer) 1000 { 1001 PlayerDigging ret = new PlayerDigging(); 1002 ret.decode(buffer); 1003 return ret; 1004 } 1005 1006 override string toString() 1007 { 1008 return "PlayerDigging(status: " ~ std.conv.to!string(this.status) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", face: " ~ std.conv.to!string(this.face) ~ ")"; 1009 } 1010 1011 } 1012 1013 class EntityAction : Java393Packet 1014 { 1015 1016 enum uint ID = 25; 1017 1018 enum bool CLIENTBOUND = false; 1019 enum bool SERVERBOUND = true; 1020 1021 // action 1022 enum uint START_SNEAKING = 0; 1023 enum uint STOP_SNEAKING = 1; 1024 enum uint LEAVE_BED = 2; 1025 enum uint START_SPRINTING = 3; 1026 enum uint STOP_SPRINTING = 4; 1027 enum uint START_HORSE_JUMP = 5; 1028 enum uint STOP_HORSE_JUMP = 6; 1029 enum uint OPEN_HORSE_INVENTORY = 7; 1030 enum uint START_ELYTRA_FLYING = 8; 1031 1032 enum string[] __fields = ["entityId", "action", "jumpBoost"]; 1033 1034 @Var uint entityId; 1035 @Var uint action; 1036 @Var uint jumpBoost; 1037 1038 this() pure nothrow @safe @nogc {} 1039 1040 this(uint entityId, uint action=uint.init, uint jumpBoost=uint.init) pure nothrow @safe @nogc 1041 { 1042 this.entityId = entityId; 1043 this.action = action; 1044 this.jumpBoost = jumpBoost; 1045 } 1046 1047 mixin Make; 1048 1049 public static typeof(this) fromBuffer(ubyte[] buffer) 1050 { 1051 EntityAction ret = new EntityAction(); 1052 ret.decode(buffer); 1053 return ret; 1054 } 1055 1056 override string toString() 1057 { 1058 return "EntityAction(entityId: " ~ std.conv.to!string(this.entityId) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", jumpBoost: " ~ std.conv.to!string(this.jumpBoost) ~ ")"; 1059 } 1060 1061 } 1062 1063 class SteerVehicle : Java393Packet 1064 { 1065 1066 enum uint ID = 26; 1067 1068 enum bool CLIENTBOUND = false; 1069 enum bool SERVERBOUND = true; 1070 1071 // flags 1072 enum ubyte JUMP = 1; 1073 enum ubyte UNMOUNT = 2; 1074 1075 enum string[] __fields = ["sideways", "forward", "flags"]; 1076 1077 float sideways; 1078 float forward; 1079 ubyte flags; 1080 1081 this() pure nothrow @safe @nogc {} 1082 1083 this(float sideways, float forward=float.init, ubyte flags=ubyte.init) pure nothrow @safe @nogc 1084 { 1085 this.sideways = sideways; 1086 this.forward = forward; 1087 this.flags = flags; 1088 } 1089 1090 mixin Make; 1091 1092 public static typeof(this) fromBuffer(ubyte[] buffer) 1093 { 1094 SteerVehicle ret = new SteerVehicle(); 1095 ret.decode(buffer); 1096 return ret; 1097 } 1098 1099 override string toString() 1100 { 1101 return "SteerVehicle(sideways: " ~ std.conv.to!string(this.sideways) ~ ", forward: " ~ std.conv.to!string(this.forward) ~ ", flags: " ~ std.conv.to!string(this.flags) ~ ")"; 1102 } 1103 1104 } 1105 1106 class RecipeBookData : Java393Packet 1107 { 1108 1109 enum uint ID = 27; 1110 1111 enum bool CLIENTBOUND = false; 1112 enum bool SERVERBOUND = true; 1113 1114 enum string[] __fields = ["type"]; 1115 1116 @Var uint type; 1117 1118 this() pure nothrow @safe @nogc {} 1119 1120 this(uint type) pure nothrow @safe @nogc 1121 { 1122 this.type = type; 1123 } 1124 1125 mixin Make; 1126 1127 public static typeof(this) fromBuffer(ubyte[] buffer) 1128 { 1129 RecipeBookData ret = new RecipeBookData(); 1130 ret.decode(buffer); 1131 return ret; 1132 } 1133 1134 override string toString() 1135 { 1136 return "RecipeBookData(type: " ~ std.conv.to!string(this.type) ~ ")"; 1137 } 1138 1139 enum string variantField = "type"; 1140 1141 alias Variants = TypeTuple!(DisplayedRecipe, CraftingBookStatus); 1142 1143 class DisplayedRecipe : Java393Packet 1144 { 1145 1146 enum typeof(type) TYPE = 1; 1147 1148 enum string[] __fields = ["id"]; 1149 1150 uint id; 1151 1152 this() pure nothrow @safe @nogc {} 1153 1154 this(uint id) pure nothrow @safe @nogc 1155 { 1156 this.id = id; 1157 } 1158 1159 mixin Make; 1160 1161 override string toString() 1162 { 1163 return "RecipeBookData.DisplayedRecipe(id: " ~ std.conv.to!string(this.id) ~ ")"; 1164 } 1165 1166 } 1167 1168 class CraftingBookStatus : Java393Packet 1169 { 1170 1171 enum typeof(type) TYPE = 2; 1172 1173 enum string[] __fields = ["craftingRecipeBookOpened", "craftingRecipeFilterActive", "smeltingRecipeBookOpened", "smeltingRecipeFilterActive"]; 1174 1175 bool craftingRecipeBookOpened; 1176 bool craftingRecipeFilterActive; 1177 bool smeltingRecipeBookOpened; 1178 bool smeltingRecipeFilterActive; 1179 1180 this() pure nothrow @safe @nogc {} 1181 1182 this(bool craftingRecipeBookOpened, bool craftingRecipeFilterActive=bool.init, bool smeltingRecipeBookOpened=bool.init, bool smeltingRecipeFilterActive=bool.init) pure nothrow @safe @nogc 1183 { 1184 this.craftingRecipeBookOpened = craftingRecipeBookOpened; 1185 this.craftingRecipeFilterActive = craftingRecipeFilterActive; 1186 this.smeltingRecipeBookOpened = smeltingRecipeBookOpened; 1187 this.smeltingRecipeFilterActive = smeltingRecipeFilterActive; 1188 } 1189 1190 mixin Make; 1191 1192 override string toString() 1193 { 1194 return "RecipeBookData.CraftingBookStatus(craftingRecipeBookOpened: " ~ std.conv.to!string(this.craftingRecipeBookOpened) ~ ", craftingRecipeFilterActive: " ~ std.conv.to!string(this.craftingRecipeFilterActive) ~ ", smeltingRecipeBookOpened: " ~ std.conv.to!string(this.smeltingRecipeBookOpened) ~ ", smeltingRecipeFilterActive: " ~ std.conv.to!string(this.smeltingRecipeFilterActive) ~ ")"; 1195 } 1196 1197 } 1198 1199 } 1200 1201 class NameItem : Java393Packet 1202 { 1203 1204 enum uint ID = 28; 1205 1206 enum bool CLIENTBOUND = false; 1207 enum bool SERVERBOUND = true; 1208 1209 enum string[] __fields = ["itemName"]; 1210 1211 string itemName; 1212 1213 this() pure nothrow @safe @nogc {} 1214 1215 this(string itemName) pure nothrow @safe @nogc 1216 { 1217 this.itemName = itemName; 1218 } 1219 1220 mixin Make; 1221 1222 public static typeof(this) fromBuffer(ubyte[] buffer) 1223 { 1224 NameItem ret = new NameItem(); 1225 ret.decode(buffer); 1226 return ret; 1227 } 1228 1229 override string toString() 1230 { 1231 return "NameItem(itemName: " ~ std.conv.to!string(this.itemName) ~ ")"; 1232 } 1233 1234 } 1235 1236 class ResourcePackStatus : Java393Packet 1237 { 1238 1239 enum uint ID = 29; 1240 1241 enum bool CLIENTBOUND = false; 1242 enum bool SERVERBOUND = true; 1243 1244 // result 1245 enum uint LOADED = 0; 1246 enum uint DECLINED = 1; 1247 enum uint FAILED = 2; 1248 enum uint ACCEPTED = 3; 1249 1250 enum string[] __fields = ["result"]; 1251 1252 @Var uint result; 1253 1254 this() pure nothrow @safe @nogc {} 1255 1256 this(uint result) pure nothrow @safe @nogc 1257 { 1258 this.result = result; 1259 } 1260 1261 mixin Make; 1262 1263 public static typeof(this) fromBuffer(ubyte[] buffer) 1264 { 1265 ResourcePackStatus ret = new ResourcePackStatus(); 1266 ret.decode(buffer); 1267 return ret; 1268 } 1269 1270 override string toString() 1271 { 1272 return "ResourcePackStatus(result: " ~ std.conv.to!string(this.result) ~ ")"; 1273 } 1274 1275 } 1276 1277 class AdvencementTab : Java393Packet 1278 { 1279 1280 enum uint ID = 30; 1281 1282 enum bool CLIENTBOUND = false; 1283 enum bool SERVERBOUND = true; 1284 1285 // action 1286 enum uint OPEN_TAB = 0; 1287 enum uint CLOSE_SCREEN = 1; 1288 1289 enum string[] __fields = ["action", "tab"]; 1290 1291 @Var uint action; 1292 @Condition("action==0") string tab; 1293 1294 this() pure nothrow @safe @nogc {} 1295 1296 this(uint action, string tab=string.init) pure nothrow @safe @nogc 1297 { 1298 this.action = action; 1299 this.tab = tab; 1300 } 1301 1302 mixin Make; 1303 1304 public static typeof(this) fromBuffer(ubyte[] buffer) 1305 { 1306 AdvencementTab ret = new AdvencementTab(); 1307 ret.decode(buffer); 1308 return ret; 1309 } 1310 1311 override string toString() 1312 { 1313 return "AdvencementTab(action: " ~ std.conv.to!string(this.action) ~ ", tab: " ~ std.conv.to!string(this.tab) ~ ")"; 1314 } 1315 1316 } 1317 1318 class SelectTrade : Java393Packet 1319 { 1320 1321 enum uint ID = 31; 1322 1323 enum bool CLIENTBOUND = false; 1324 enum bool SERVERBOUND = true; 1325 1326 enum string[] __fields = ["selectedSlot"]; 1327 1328 @Var uint selectedSlot; 1329 1330 this() pure nothrow @safe @nogc {} 1331 1332 this(uint selectedSlot) pure nothrow @safe @nogc 1333 { 1334 this.selectedSlot = selectedSlot; 1335 } 1336 1337 mixin Make; 1338 1339 public static typeof(this) fromBuffer(ubyte[] buffer) 1340 { 1341 SelectTrade ret = new SelectTrade(); 1342 ret.decode(buffer); 1343 return ret; 1344 } 1345 1346 override string toString() 1347 { 1348 return "SelectTrade(selectedSlot: " ~ std.conv.to!string(this.selectedSlot) ~ ")"; 1349 } 1350 1351 } 1352 1353 class SetBeaconEffect : Java393Packet 1354 { 1355 1356 enum uint ID = 32; 1357 1358 enum bool CLIENTBOUND = false; 1359 enum bool SERVERBOUND = true; 1360 1361 enum string[] __fields = ["primaryEffect", "secondaryEffect"]; 1362 1363 @Var uint primaryEffect; 1364 @Var uint secondaryEffect; 1365 1366 this() pure nothrow @safe @nogc {} 1367 1368 this(uint primaryEffect, uint secondaryEffect=uint.init) pure nothrow @safe @nogc 1369 { 1370 this.primaryEffect = primaryEffect; 1371 this.secondaryEffect = secondaryEffect; 1372 } 1373 1374 mixin Make; 1375 1376 public static typeof(this) fromBuffer(ubyte[] buffer) 1377 { 1378 SetBeaconEffect ret = new SetBeaconEffect(); 1379 ret.decode(buffer); 1380 return ret; 1381 } 1382 1383 override string toString() 1384 { 1385 return "SetBeaconEffect(primaryEffect: " ~ std.conv.to!string(this.primaryEffect) ~ ", secondaryEffect: " ~ std.conv.to!string(this.secondaryEffect) ~ ")"; 1386 } 1387 1388 } 1389 1390 class HeldItemChange : Java393Packet 1391 { 1392 1393 enum uint ID = 33; 1394 1395 enum bool CLIENTBOUND = false; 1396 enum bool SERVERBOUND = true; 1397 1398 enum string[] __fields = ["slot"]; 1399 1400 ushort slot; 1401 1402 this() pure nothrow @safe @nogc {} 1403 1404 this(ushort slot) pure nothrow @safe @nogc 1405 { 1406 this.slot = slot; 1407 } 1408 1409 mixin Make; 1410 1411 public static typeof(this) fromBuffer(ubyte[] buffer) 1412 { 1413 HeldItemChange ret = new HeldItemChange(); 1414 ret.decode(buffer); 1415 return ret; 1416 } 1417 1418 override string toString() 1419 { 1420 return "HeldItemChange(slot: " ~ std.conv.to!string(this.slot) ~ ")"; 1421 } 1422 1423 } 1424 1425 class UpdateCommandBlock : Java393Packet 1426 { 1427 1428 enum uint ID = 34; 1429 1430 enum bool CLIENTBOUND = false; 1431 enum bool SERVERBOUND = true; 1432 1433 // mode 1434 enum uint SEQUENCE = 0; 1435 enum uint AUTO = 1; 1436 enum uint REDSTONE = 2; 1437 1438 // flags 1439 enum ubyte TRACK_OUTPUT = 1; 1440 enum ubyte CONDITIONAL = 2; 1441 enum ubyte AUTOMATIC = 4; 1442 1443 enum string[] __fields = ["location", "command", "mode", "flags"]; 1444 1445 ulong location; 1446 string command; 1447 @Var uint mode; 1448 ubyte flags; 1449 1450 this() pure nothrow @safe @nogc {} 1451 1452 this(ulong location, string command=string.init, uint mode=uint.init, ubyte flags=ubyte.init) pure nothrow @safe @nogc 1453 { 1454 this.location = location; 1455 this.command = command; 1456 this.mode = mode; 1457 this.flags = flags; 1458 } 1459 1460 mixin Make; 1461 1462 public static typeof(this) fromBuffer(ubyte[] buffer) 1463 { 1464 UpdateCommandBlock ret = new UpdateCommandBlock(); 1465 ret.decode(buffer); 1466 return ret; 1467 } 1468 1469 override string toString() 1470 { 1471 return "UpdateCommandBlock(location: " ~ std.conv.to!string(this.location) ~ ", command: " ~ std.conv.to!string(this.command) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ", flags: " ~ std.conv.to!string(this.flags) ~ ")"; 1472 } 1473 1474 } 1475 1476 class UpdateCommandBlockMinecart : Java393Packet 1477 { 1478 1479 enum uint ID = 35; 1480 1481 enum bool CLIENTBOUND = false; 1482 enum bool SERVERBOUND = true; 1483 1484 enum string[] __fields = ["entityId", "command", "trackOutput"]; 1485 1486 @Var uint entityId; 1487 string command; 1488 bool trackOutput; 1489 1490 this() pure nothrow @safe @nogc {} 1491 1492 this(uint entityId, string command=string.init, bool trackOutput=bool.init) pure nothrow @safe @nogc 1493 { 1494 this.entityId = entityId; 1495 this.command = command; 1496 this.trackOutput = trackOutput; 1497 } 1498 1499 mixin Make; 1500 1501 public static typeof(this) fromBuffer(ubyte[] buffer) 1502 { 1503 UpdateCommandBlockMinecart ret = new UpdateCommandBlockMinecart(); 1504 ret.decode(buffer); 1505 return ret; 1506 } 1507 1508 override string toString() 1509 { 1510 return "UpdateCommandBlockMinecart(entityId: " ~ std.conv.to!string(this.entityId) ~ ", command: " ~ std.conv.to!string(this.command) ~ ", trackOutput: " ~ std.conv.to!string(this.trackOutput) ~ ")"; 1511 } 1512 1513 } 1514 1515 class CreativeInventoryAction : Java393Packet 1516 { 1517 1518 enum uint ID = 36; 1519 1520 enum bool CLIENTBOUND = false; 1521 enum bool SERVERBOUND = true; 1522 1523 enum string[] __fields = ["slot", "clickedItem"]; 1524 1525 ushort slot; 1526 soupply.java393.types.Slot clickedItem; 1527 1528 this() pure nothrow @safe @nogc {} 1529 1530 this(ushort slot, soupply.java393.types.Slot clickedItem=soupply.java393.types.Slot.init) pure nothrow @safe @nogc 1531 { 1532 this.slot = slot; 1533 this.clickedItem = clickedItem; 1534 } 1535 1536 mixin Make; 1537 1538 public static typeof(this) fromBuffer(ubyte[] buffer) 1539 { 1540 CreativeInventoryAction ret = new CreativeInventoryAction(); 1541 ret.decode(buffer); 1542 return ret; 1543 } 1544 1545 override string toString() 1546 { 1547 return "CreativeInventoryAction(slot: " ~ std.conv.to!string(this.slot) ~ ", clickedItem: " ~ std.conv.to!string(this.clickedItem) ~ ")"; 1548 } 1549 1550 } 1551 1552 class UpdateStructureBlock : Java393Packet 1553 { 1554 1555 enum uint ID = 37; 1556 1557 enum bool CLIENTBOUND = false; 1558 enum bool SERVERBOUND = true; 1559 1560 // action 1561 enum uint UPDATE_DATA = 0; 1562 enum uint SAVE_STRUCTURE = 1; 1563 enum uint LOAD_STRUCTURE = 2; 1564 enum uint DETECT_SIZE = 3; 1565 1566 // mode 1567 enum uint SAVE = 0; 1568 enum uint LOAD = 1; 1569 enum uint CORNER = 2; 1570 enum uint DATA = 3; 1571 1572 // mirror 1573 enum uint NONE = 0; 1574 enum uint LEFT_RIGHT = 1; 1575 enum uint FRONT_BACK = 2; 1576 1577 // rotation 1578 enum uint CLOCKWISE_90 = 1; 1579 enum uint CLOCKWISE_180 = 2; 1580 enum uint COUNTERCLOCKWISE_90 = 3; 1581 1582 // flags 1583 enum ubyte IGNORE_ENTITIES = 1; 1584 enum ubyte SHOW_AIR = 2; 1585 enum ubyte SHOW_BOUNDING_BOX = 4; 1586 1587 enum string[] __fields = ["location", "action", "mode", "offset", "size", "mirror", "rotation", "metadata", "integrity", "speed", "flags"]; 1588 1589 ulong location; 1590 @Var uint action; 1591 @Var uint mode; 1592 Vector!(byte, "xyz") offset; 1593 Vector!(ubyte, "xyz") size; 1594 @Var uint mirror; 1595 @Var uint rotation; 1596 string metadata; 1597 float integrity; 1598 @Var ulong speed; 1599 ubyte flags; 1600 1601 this() pure nothrow @safe @nogc {} 1602 1603 this(ulong location, uint action=uint.init, uint mode=uint.init, Vector!(byte, "xyz") offset=Vector!(byte, "xyz").init, Vector!(ubyte, "xyz") size=Vector!(ubyte, "xyz").init, uint mirror=uint.init, uint rotation=uint.init, string metadata=string.init, float integrity=float.init, ulong speed=ulong.init, ubyte flags=ubyte.init) pure nothrow @safe @nogc 1604 { 1605 this.location = location; 1606 this.action = action; 1607 this.mode = mode; 1608 this.offset = offset; 1609 this.size = size; 1610 this.mirror = mirror; 1611 this.rotation = rotation; 1612 this.metadata = metadata; 1613 this.integrity = integrity; 1614 this.speed = speed; 1615 this.flags = flags; 1616 } 1617 1618 mixin Make; 1619 1620 public static typeof(this) fromBuffer(ubyte[] buffer) 1621 { 1622 UpdateStructureBlock ret = new UpdateStructureBlock(); 1623 ret.decode(buffer); 1624 return ret; 1625 } 1626 1627 override string toString() 1628 { 1629 return "UpdateStructureBlock(location: " ~ std.conv.to!string(this.location) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ", offset: " ~ std.conv.to!string(this.offset) ~ ", size: " ~ std.conv.to!string(this.size) ~ ", mirror: " ~ std.conv.to!string(this.mirror) ~ ", rotation: " ~ std.conv.to!string(this.rotation) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ", integrity: " ~ std.conv.to!string(this.integrity) ~ ", speed: " ~ std.conv.to!string(this.speed) ~ ", flags: " ~ std.conv.to!string(this.flags) ~ ")"; 1630 } 1631 1632 } 1633 1634 class UpdateSign : Java393Packet 1635 { 1636 1637 enum uint ID = 38; 1638 1639 enum bool CLIENTBOUND = false; 1640 enum bool SERVERBOUND = true; 1641 1642 enum string[] __fields = ["position", "lines"]; 1643 1644 ulong position; 1645 string[4] lines; 1646 1647 this() pure nothrow @safe @nogc {} 1648 1649 this(ulong position, string[4] lines=(string[4]).init) pure nothrow @safe @nogc 1650 { 1651 this.position = position; 1652 this.lines = lines; 1653 } 1654 1655 mixin Make; 1656 1657 public static typeof(this) fromBuffer(ubyte[] buffer) 1658 { 1659 UpdateSign ret = new UpdateSign(); 1660 ret.decode(buffer); 1661 return ret; 1662 } 1663 1664 override string toString() 1665 { 1666 return "UpdateSign(position: " ~ std.conv.to!string(this.position) ~ ", lines: " ~ std.conv.to!string(this.lines) ~ ")"; 1667 } 1668 1669 } 1670 1671 class Animation : Java393Packet 1672 { 1673 1674 enum uint ID = 39; 1675 1676 enum bool CLIENTBOUND = false; 1677 enum bool SERVERBOUND = true; 1678 1679 // hand 1680 enum uint MAIN_HAND = 0; 1681 enum uint OFF_HAND = 1; 1682 1683 enum string[] __fields = ["hand"]; 1684 1685 @Var uint hand; 1686 1687 this() pure nothrow @safe @nogc {} 1688 1689 this(uint hand) pure nothrow @safe @nogc 1690 { 1691 this.hand = hand; 1692 } 1693 1694 mixin Make; 1695 1696 public static typeof(this) fromBuffer(ubyte[] buffer) 1697 { 1698 Animation ret = new Animation(); 1699 ret.decode(buffer); 1700 return ret; 1701 } 1702 1703 override string toString() 1704 { 1705 return "Animation(hand: " ~ std.conv.to!string(this.hand) ~ ")"; 1706 } 1707 1708 } 1709 1710 class Spectate : Java393Packet 1711 { 1712 1713 enum uint ID = 40; 1714 1715 enum bool CLIENTBOUND = false; 1716 enum bool SERVERBOUND = true; 1717 1718 enum string[] __fields = ["player"]; 1719 1720 UUID player; 1721 1722 this() pure nothrow @safe @nogc {} 1723 1724 this(UUID player) pure nothrow @safe @nogc 1725 { 1726 this.player = player; 1727 } 1728 1729 mixin Make; 1730 1731 public static typeof(this) fromBuffer(ubyte[] buffer) 1732 { 1733 Spectate ret = new Spectate(); 1734 ret.decode(buffer); 1735 return ret; 1736 } 1737 1738 override string toString() 1739 { 1740 return "Spectate(player: " ~ std.conv.to!string(this.player) ~ ")"; 1741 } 1742 1743 } 1744 1745 class PlayerBlockPlacement : Java393Packet 1746 { 1747 1748 enum uint ID = 41; 1749 1750 enum bool CLIENTBOUND = false; 1751 enum bool SERVERBOUND = true; 1752 1753 // hand 1754 enum uint MAIN_HAND = 0; 1755 enum uint OFF_HAND = 1; 1756 1757 enum string[] __fields = ["position", "face", "hand", "cursorPosition"]; 1758 1759 ulong position; 1760 @Var uint face; 1761 @Var uint hand; 1762 Vector!(float, "xyz") cursorPosition; 1763 1764 this() pure nothrow @safe @nogc {} 1765 1766 this(ulong position, uint face=uint.init, uint hand=uint.init, Vector!(float, "xyz") cursorPosition=Vector!(float, "xyz").init) pure nothrow @safe @nogc 1767 { 1768 this.position = position; 1769 this.face = face; 1770 this.hand = hand; 1771 this.cursorPosition = cursorPosition; 1772 } 1773 1774 mixin Make; 1775 1776 public static typeof(this) fromBuffer(ubyte[] buffer) 1777 { 1778 PlayerBlockPlacement ret = new PlayerBlockPlacement(); 1779 ret.decode(buffer); 1780 return ret; 1781 } 1782 1783 override string toString() 1784 { 1785 return "PlayerBlockPlacement(position: " ~ std.conv.to!string(this.position) ~ ", face: " ~ std.conv.to!string(this.face) ~ ", hand: " ~ std.conv.to!string(this.hand) ~ ", cursorPosition: " ~ std.conv.to!string(this.cursorPosition) ~ ")"; 1786 } 1787 1788 } 1789 1790 class UseItem : Java393Packet 1791 { 1792 1793 enum uint ID = 42; 1794 1795 enum bool CLIENTBOUND = false; 1796 enum bool SERVERBOUND = true; 1797 1798 // hand 1799 enum uint MAIN_HAND = 0; 1800 enum uint OFF_HAND = 1; 1801 1802 enum string[] __fields = ["hand"]; 1803 1804 @Var uint hand; 1805 1806 this() pure nothrow @safe @nogc {} 1807 1808 this(uint hand) pure nothrow @safe @nogc 1809 { 1810 this.hand = hand; 1811 } 1812 1813 mixin Make; 1814 1815 public static typeof(this) fromBuffer(ubyte[] buffer) 1816 { 1817 UseItem ret = new UseItem(); 1818 ret.decode(buffer); 1819 return ret; 1820 } 1821 1822 override string toString() 1823 { 1824 return "UseItem(hand: " ~ std.conv.to!string(this.hand) ~ ")"; 1825 } 1826 1827 }