1 /* 2 * This file has been automatically generated by Soupply and released under the MIT license. 3 * Generated from data/bedrock201.xml 4 */ 5 module soupply.bedrock201.protocol.play; 6 7 static import std.conv; 8 import std.typetuple : TypeTuple; 9 import xpacket; 10 11 import soupply.util; 12 import soupply.bedrock201.metadata : Metadata; 13 import soupply.bedrock201.packet : Bedrock201Packet; 14 15 static import soupply.bedrock201.types; 16 17 alias Packets = TypeTuple!(Login, PlayStatus, ServerToClientHandshake, ClientToServerHandshake, Disconnect, ResourcePacksInfo, ResourcePacksStackPacket, ResourcePackClientResponse, Text, SetTime, StartGame, AddPlayer, AddEntity, RemoveEntity, AddItemEntity, AddHangingEntity, TakeItemEntity, MoveEntity, MovePlayer, RiderJump, UpdateBlock, AddPainting, Explode, LevelSoundEvent, LevelEvent, BlockEvent, EntityEvent, MobEffect, UpdateAttributes, InventoryTransaction, MobEquipment, MobArmorEquipment, Interact, BlockPickRequest, EntityPickRequest, PlayerAction, EntityFall, HurtArmor, SetEntityData, SetEntityMotion, SetEntityLink, SetHealth, SetSpawnPosition, Animate, Respawn, ContainerOpen, ContainerClose, PlayerHotbar, InventoryContent, InventorySlot, ContainerSetData, CraftingData, CraftingEvent, GuiDataPickItem, AdventureSettings, BlockEntityData, PlayerInput, FullChunkData, SetCommandsEnabled, SetDifficulty, ChangeDimension, SetPlayerGameType, PlayerList, SimpleEvent, TelemetryEvent, SpawnExperienceOrb, ClientboundMapItemData, MapInfoRequest, RequestChunkRadius, ChunkRadiusUpdated, ItemFrameDropItem, GameRulesChanged, Camera, BossEvent, ShowCredits, AvailableCommands, CommandRequest, CommandBlockUpdate, UpdateTrade, UpdateEquip, ResourcePackDataInfo, ResourcePackChunkData, ResourcePackChunkRequest, Transfer, PlaySound, StopSound, SetTitle, AddBehaviorTree, StructureBlockUpdate, ShowStoreOffer, PurchaseReceipt, PlayerSkin, SubClientLogin, InitiateWebSocketConnection, SetLastHurtBy, BookEdit, NpcRequest, PhotoTransfer, ModalFormRequest, ModalFormResponse, ServerSettingsRequest, ServerSettingsResponse, ShowProfile, SetDefaultGameType); 18 19 class Login : Bedrock201Packet 20 { 21 22 enum uint ID = 1; 23 24 enum bool CLIENTBOUND = false; 25 enum bool SERVERBOUND = true; 26 27 enum string[] __fields = ["protocol", "body_"]; 28 29 @BigEndian uint protocol = 201; 30 soupply.bedrock201.types.LoginBody body_; 31 32 this() pure nothrow @safe @nogc {} 33 34 this(uint protocol, soupply.bedrock201.types.LoginBody body_=soupply.bedrock201.types.LoginBody.init) pure nothrow @safe @nogc 35 { 36 this.protocol = protocol; 37 this.body_ = body_; 38 } 39 40 mixin Make; 41 42 public static typeof(this) fromBuffer(ubyte[] buffer) 43 { 44 Login ret = new Login(); 45 ret.decode(buffer); 46 return ret; 47 } 48 49 override string toString() 50 { 51 return "Login(protocol: " ~ std.conv.to!string(this.protocol) ~ ", body_: " ~ std.conv.to!string(this.body_) ~ ")"; 52 } 53 54 } 55 56 class PlayStatus : Bedrock201Packet 57 { 58 59 enum uint ID = 2; 60 61 enum bool CLIENTBOUND = true; 62 enum bool SERVERBOUND = false; 63 64 // status 65 enum uint OK = 0; 66 enum uint OUTDATED_CLIENT = 1; 67 enum uint OUTDATED_SERVER = 2; 68 enum uint SPAWNED = 3; 69 enum uint INVALID_TENANT = 4; 70 enum uint EDITION_MISMATCH_EDU_TO_VANILLA = 5; 71 enum uint EDITION_MISMATCH_VANILLA_TO_EDU = 6; 72 73 enum string[] __fields = ["status"]; 74 75 @BigEndian uint status; 76 77 this() pure nothrow @safe @nogc {} 78 79 this(uint status) pure nothrow @safe @nogc 80 { 81 this.status = status; 82 } 83 84 mixin Make; 85 86 public static typeof(this) fromBuffer(ubyte[] buffer) 87 { 88 PlayStatus ret = new PlayStatus(); 89 ret.decode(buffer); 90 return ret; 91 } 92 93 override string toString() 94 { 95 return "PlayStatus(status: " ~ std.conv.to!string(this.status) ~ ")"; 96 } 97 98 } 99 100 class ServerToClientHandshake : Bedrock201Packet 101 { 102 103 enum uint ID = 3; 104 105 enum bool CLIENTBOUND = true; 106 enum bool SERVERBOUND = false; 107 108 enum string[] __fields = ["serverPublicKey", "token"]; 109 110 string serverPublicKey; 111 ubyte[] token; 112 113 this() pure nothrow @safe @nogc {} 114 115 this(string serverPublicKey, ubyte[] token=(ubyte[]).init) pure nothrow @safe @nogc 116 { 117 this.serverPublicKey = serverPublicKey; 118 this.token = token; 119 } 120 121 mixin Make; 122 123 public static typeof(this) fromBuffer(ubyte[] buffer) 124 { 125 ServerToClientHandshake ret = new ServerToClientHandshake(); 126 ret.decode(buffer); 127 return ret; 128 } 129 130 override string toString() 131 { 132 return "ServerToClientHandshake(serverPublicKey: " ~ std.conv.to!string(this.serverPublicKey) ~ ", token: " ~ std.conv.to!string(this.token) ~ ")"; 133 } 134 135 } 136 137 class ClientToServerHandshake : Bedrock201Packet 138 { 139 140 enum uint ID = 4; 141 142 enum bool CLIENTBOUND = false; 143 enum bool SERVERBOUND = true; 144 145 enum string[] __fields = []; 146 147 mixin Make; 148 149 public static typeof(this) fromBuffer(ubyte[] buffer) 150 { 151 ClientToServerHandshake ret = new ClientToServerHandshake(); 152 ret.decode(buffer); 153 return ret; 154 } 155 156 override string toString() 157 { 158 return "ClientToServerHandshake()"; 159 } 160 161 } 162 163 class Disconnect : Bedrock201Packet 164 { 165 166 enum uint ID = 5; 167 168 enum bool CLIENTBOUND = true; 169 enum bool SERVERBOUND = false; 170 171 enum string[] __fields = ["hideDisconnectionScreen", "message"]; 172 173 bool hideDisconnectionScreen; 174 @Condition("hideDisconnectionScreen==false") string message; 175 176 this() pure nothrow @safe @nogc {} 177 178 this(bool hideDisconnectionScreen, string message=string.init) pure nothrow @safe @nogc 179 { 180 this.hideDisconnectionScreen = hideDisconnectionScreen; 181 this.message = message; 182 } 183 184 mixin Make; 185 186 public static typeof(this) fromBuffer(ubyte[] buffer) 187 { 188 Disconnect ret = new Disconnect(); 189 ret.decode(buffer); 190 return ret; 191 } 192 193 override string toString() 194 { 195 return "Disconnect(hideDisconnectionScreen: " ~ std.conv.to!string(this.hideDisconnectionScreen) ~ ", message: " ~ std.conv.to!string(this.message) ~ ")"; 196 } 197 198 } 199 200 class ResourcePacksInfo : Bedrock201Packet 201 { 202 203 enum uint ID = 6; 204 205 enum bool CLIENTBOUND = true; 206 enum bool SERVERBOUND = false; 207 208 enum string[] __fields = ["mustAccept", "behaviourPacks", "resourcePacks"]; 209 210 bool mustAccept; 211 @Length!ushort soupply.bedrock201.types.PackWithSize[] behaviourPacks; 212 @Length!ushort soupply.bedrock201.types.PackWithSize[] resourcePacks; 213 214 this() pure nothrow @safe @nogc {} 215 216 this(bool mustAccept, soupply.bedrock201.types.PackWithSize[] behaviourPacks=(soupply.bedrock201.types.PackWithSize[]).init, soupply.bedrock201.types.PackWithSize[] resourcePacks=(soupply.bedrock201.types.PackWithSize[]).init) pure nothrow @safe @nogc 217 { 218 this.mustAccept = mustAccept; 219 this.behaviourPacks = behaviourPacks; 220 this.resourcePacks = resourcePacks; 221 } 222 223 mixin Make; 224 225 public static typeof(this) fromBuffer(ubyte[] buffer) 226 { 227 ResourcePacksInfo ret = new ResourcePacksInfo(); 228 ret.decode(buffer); 229 return ret; 230 } 231 232 override string toString() 233 { 234 return "ResourcePacksInfo(mustAccept: " ~ std.conv.to!string(this.mustAccept) ~ ", behaviourPacks: " ~ std.conv.to!string(this.behaviourPacks) ~ ", resourcePacks: " ~ std.conv.to!string(this.resourcePacks) ~ ")"; 235 } 236 237 } 238 239 class ResourcePacksStackPacket : Bedrock201Packet 240 { 241 242 enum uint ID = 7; 243 244 enum bool CLIENTBOUND = true; 245 enum bool SERVERBOUND = false; 246 247 enum string[] __fields = ["mustAccept", "behaviourPacks", "resourcePacks"]; 248 249 bool mustAccept; 250 soupply.bedrock201.types.Pack[] behaviourPacks; 251 soupply.bedrock201.types.Pack[] resourcePacks; 252 253 this() pure nothrow @safe @nogc {} 254 255 this(bool mustAccept, soupply.bedrock201.types.Pack[] behaviourPacks=(soupply.bedrock201.types.Pack[]).init, soupply.bedrock201.types.Pack[] resourcePacks=(soupply.bedrock201.types.Pack[]).init) pure nothrow @safe @nogc 256 { 257 this.mustAccept = mustAccept; 258 this.behaviourPacks = behaviourPacks; 259 this.resourcePacks = resourcePacks; 260 } 261 262 mixin Make; 263 264 public static typeof(this) fromBuffer(ubyte[] buffer) 265 { 266 ResourcePacksStackPacket ret = new ResourcePacksStackPacket(); 267 ret.decode(buffer); 268 return ret; 269 } 270 271 override string toString() 272 { 273 return "ResourcePacksStackPacket(mustAccept: " ~ std.conv.to!string(this.mustAccept) ~ ", behaviourPacks: " ~ std.conv.to!string(this.behaviourPacks) ~ ", resourcePacks: " ~ std.conv.to!string(this.resourcePacks) ~ ")"; 274 } 275 276 } 277 278 class ResourcePackClientResponse : Bedrock201Packet 279 { 280 281 enum uint ID = 8; 282 283 enum bool CLIENTBOUND = false; 284 enum bool SERVERBOUND = true; 285 286 // status 287 enum ubyte REFUSED = 1; 288 enum ubyte SEND_PACKS = 2; 289 enum ubyte HAVE_ALL_PACKS = 3; 290 enum ubyte COMPLETED = 4; 291 292 enum string[] __fields = ["status", "packIds"]; 293 294 ubyte status; 295 @Length!ushort string[] packIds; 296 297 this() pure nothrow @safe @nogc {} 298 299 this(ubyte status, string[] packIds=(string[]).init) pure nothrow @safe @nogc 300 { 301 this.status = status; 302 this.packIds = packIds; 303 } 304 305 mixin Make; 306 307 public static typeof(this) fromBuffer(ubyte[] buffer) 308 { 309 ResourcePackClientResponse ret = new ResourcePackClientResponse(); 310 ret.decode(buffer); 311 return ret; 312 } 313 314 override string toString() 315 { 316 return "ResourcePackClientResponse(status: " ~ std.conv.to!string(this.status) ~ ", packIds: " ~ std.conv.to!string(this.packIds) ~ ")"; 317 } 318 319 } 320 321 class Text : Bedrock201Packet 322 { 323 324 enum uint ID = 9; 325 326 enum bool CLIENTBOUND = true; 327 enum bool SERVERBOUND = true; 328 329 enum string[] __fields = ["type", "unknown1"]; 330 331 ubyte type; 332 bool unknown1; 333 334 this() pure nothrow @safe @nogc {} 335 336 this(ubyte type, bool unknown1=bool.init) pure nothrow @safe @nogc 337 { 338 this.type = type; 339 this.unknown1 = unknown1; 340 } 341 342 mixin Make; 343 344 public static typeof(this) fromBuffer(ubyte[] buffer) 345 { 346 Text ret = new Text(); 347 ret.decode(buffer); 348 return ret; 349 } 350 351 override string toString() 352 { 353 return "Text(type: " ~ std.conv.to!string(this.type) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ")"; 354 } 355 356 enum string variantField = "type"; 357 358 alias Variants = TypeTuple!(Raw, Chat, Translation, Popup, JukeboxPopup, Tip, System, Whisper, Announcement); 359 360 class Raw : Bedrock201Packet 361 { 362 363 enum typeof(type) TYPE = 0; 364 365 enum string[] __fields = ["message", "xuid"]; 366 367 string message; 368 string xuid; 369 370 this() pure nothrow @safe @nogc {} 371 372 this(string message, string xuid=string.init) pure nothrow @safe @nogc 373 { 374 this.message = message; 375 this.xuid = xuid; 376 } 377 378 mixin Make; 379 380 override string toString() 381 { 382 return "Text.Raw(message: " ~ std.conv.to!string(this.message) ~ ", xuid: " ~ std.conv.to!string(this.xuid) ~ ")"; 383 } 384 385 } 386 387 class Chat : Bedrock201Packet 388 { 389 390 enum typeof(type) TYPE = 1; 391 392 enum string[] __fields = ["sender", "message", "xuid"]; 393 394 string sender; 395 string message; 396 string xuid; 397 398 this() pure nothrow @safe @nogc {} 399 400 this(string sender, string message=string.init, string xuid=string.init) pure nothrow @safe @nogc 401 { 402 this.sender = sender; 403 this.message = message; 404 this.xuid = xuid; 405 } 406 407 mixin Make; 408 409 override string toString() 410 { 411 return "Text.Chat(sender: " ~ std.conv.to!string(this.sender) ~ ", message: " ~ std.conv.to!string(this.message) ~ ", xuid: " ~ std.conv.to!string(this.xuid) ~ ")"; 412 } 413 414 } 415 416 class Translation : Bedrock201Packet 417 { 418 419 enum typeof(type) TYPE = 2; 420 421 enum string[] __fields = ["message", "parameters"]; 422 423 string message; 424 string[] parameters; 425 426 this() pure nothrow @safe @nogc {} 427 428 this(string message, string[] parameters=(string[]).init) pure nothrow @safe @nogc 429 { 430 this.message = message; 431 this.parameters = parameters; 432 } 433 434 mixin Make; 435 436 override string toString() 437 { 438 return "Text.Translation(message: " ~ std.conv.to!string(this.message) ~ ", parameters: " ~ std.conv.to!string(this.parameters) ~ ")"; 439 } 440 441 } 442 443 class Popup : Bedrock201Packet 444 { 445 446 enum typeof(type) TYPE = 3; 447 448 enum string[] __fields = ["title", "subtitle"]; 449 450 string title; 451 string subtitle; 452 453 this() pure nothrow @safe @nogc {} 454 455 this(string title, string subtitle=string.init) pure nothrow @safe @nogc 456 { 457 this.title = title; 458 this.subtitle = subtitle; 459 } 460 461 mixin Make; 462 463 override string toString() 464 { 465 return "Text.Popup(title: " ~ std.conv.to!string(this.title) ~ ", subtitle: " ~ std.conv.to!string(this.subtitle) ~ ")"; 466 } 467 468 } 469 470 class JukeboxPopup : Bedrock201Packet 471 { 472 473 enum typeof(type) TYPE = 4; 474 475 enum string[] __fields = ["message", "parameters"]; 476 477 string message; 478 string[] parameters; 479 480 this() pure nothrow @safe @nogc {} 481 482 this(string message, string[] parameters=(string[]).init) pure nothrow @safe @nogc 483 { 484 this.message = message; 485 this.parameters = parameters; 486 } 487 488 mixin Make; 489 490 override string toString() 491 { 492 return "Text.JukeboxPopup(message: " ~ std.conv.to!string(this.message) ~ ", parameters: " ~ std.conv.to!string(this.parameters) ~ ")"; 493 } 494 495 } 496 497 class Tip : Bedrock201Packet 498 { 499 500 enum typeof(type) TYPE = 5; 501 502 enum string[] __fields = ["message"]; 503 504 string message; 505 506 this() pure nothrow @safe @nogc {} 507 508 this(string message) pure nothrow @safe @nogc 509 { 510 this.message = message; 511 } 512 513 mixin Make; 514 515 override string toString() 516 { 517 return "Text.Tip(message: " ~ std.conv.to!string(this.message) ~ ")"; 518 } 519 520 } 521 522 class System : Bedrock201Packet 523 { 524 525 enum typeof(type) TYPE = 6; 526 527 enum string[] __fields = ["message"]; 528 529 string message; 530 531 this() pure nothrow @safe @nogc {} 532 533 this(string message) pure nothrow @safe @nogc 534 { 535 this.message = message; 536 } 537 538 mixin Make; 539 540 override string toString() 541 { 542 return "Text.System(message: " ~ std.conv.to!string(this.message) ~ ")"; 543 } 544 545 } 546 547 class Whisper : Bedrock201Packet 548 { 549 550 enum typeof(type) TYPE = 7; 551 552 enum string[] __fields = ["sender", "message"]; 553 554 string sender; 555 string message; 556 557 this() pure nothrow @safe @nogc {} 558 559 this(string sender, string message=string.init) pure nothrow @safe @nogc 560 { 561 this.sender = sender; 562 this.message = message; 563 } 564 565 mixin Make; 566 567 override string toString() 568 { 569 return "Text.Whisper(sender: " ~ std.conv.to!string(this.sender) ~ ", message: " ~ std.conv.to!string(this.message) ~ ")"; 570 } 571 572 } 573 574 class Announcement : Bedrock201Packet 575 { 576 577 enum typeof(type) TYPE = 8; 578 579 enum string[] __fields = ["announcer", "message"]; 580 581 string announcer; 582 string message; 583 584 this() pure nothrow @safe @nogc {} 585 586 this(string announcer, string message=string.init) pure nothrow @safe @nogc 587 { 588 this.announcer = announcer; 589 this.message = message; 590 } 591 592 mixin Make; 593 594 override string toString() 595 { 596 return "Text.Announcement(announcer: " ~ std.conv.to!string(this.announcer) ~ ", message: " ~ std.conv.to!string(this.message) ~ ")"; 597 } 598 599 } 600 601 } 602 603 class SetTime : Bedrock201Packet 604 { 605 606 enum uint ID = 10; 607 608 enum bool CLIENTBOUND = true; 609 enum bool SERVERBOUND = false; 610 611 enum string[] __fields = ["time"]; 612 613 @Var int time; 614 615 this() pure nothrow @safe @nogc {} 616 617 this(int time) pure nothrow @safe @nogc 618 { 619 this.time = time; 620 } 621 622 mixin Make; 623 624 public static typeof(this) fromBuffer(ubyte[] buffer) 625 { 626 SetTime ret = new SetTime(); 627 ret.decode(buffer); 628 return ret; 629 } 630 631 override string toString() 632 { 633 return "SetTime(time: " ~ std.conv.to!string(this.time) ~ ")"; 634 } 635 636 } 637 638 class StartGame : Bedrock201Packet 639 { 640 641 enum uint ID = 11; 642 643 enum bool CLIENTBOUND = true; 644 enum bool SERVERBOUND = false; 645 646 // gamemode 647 enum int SURVIVAL = 0; 648 enum int CREATIVE = 1; 649 enum int ADVENTURE = 2; 650 651 // dimension 652 enum int OVERWORLD = 0; 653 enum int NETHER = 1; 654 enum int END = 2; 655 656 // generator 657 enum int OLD = 0; 658 enum int INFINITE = 1; 659 enum int FLAT = 2; 660 661 // difficulty 662 enum int PEACEFUL = 0; 663 enum int EASY = 1; 664 enum int NORMAL = 2; 665 enum int HARD = 3; 666 667 // version 668 enum ubyte VANILLA = 0; 669 enum ubyte EDUCATION = 1; 670 671 enum string[] __fields = ["entityId", "runtimeId", "gamemode", "position", "yaw", "pitch", "seed", "dimension", "generator", "worldGamemode", "difficulty", "spawnPosition", "loadedInCreative", "time", "version_", "rainLevel", "lightningLevel", "multiplayerGame", "broadcastToLan", "broadcastToXbl", "commandsEnabled", "textureRequired", "gameRules", "bonusChestEnabled", "startWithMapEnabled", "trustPlayersEnabled", "defaultPermissionLevel", "xboxLiveBroadcastMode", "serverChunkTickRadius", "levelId", "worldName", "premiumWorldTemplate", "unknown32", "worldTicks", "enchantmentSeed"]; 672 673 @Var long entityId; 674 @Var ulong runtimeId; 675 @Var int gamemode; 676 Vector!(float, "xyz") position; 677 float yaw; 678 float pitch; 679 @Var int seed; 680 @Var int dimension = 0; 681 @Var int generator = 1; 682 @Var int worldGamemode; 683 @Var int difficulty; 684 @Var Vector!(int, "xyz") spawnPosition; 685 bool loadedInCreative; 686 @Var int time; 687 ubyte version_; 688 float rainLevel; 689 float lightningLevel; 690 bool multiplayerGame = true; 691 bool broadcastToLan; 692 bool broadcastToXbl; 693 bool commandsEnabled; 694 bool textureRequired; 695 soupply.bedrock201.types.Rule[] gameRules; 696 bool bonusChestEnabled; 697 bool startWithMapEnabled; 698 bool trustPlayersEnabled; 699 @Var int defaultPermissionLevel; 700 @Var int xboxLiveBroadcastMode; 701 uint serverChunkTickRadius; 702 string levelId; 703 string worldName; 704 string premiumWorldTemplate; 705 bool unknown32; 706 ulong worldTicks; 707 @Var int enchantmentSeed; 708 709 this() pure nothrow @safe @nogc {} 710 711 this(long entityId, ulong runtimeId=ulong.init, int gamemode=int.init, Vector!(float, "xyz") position=Vector!(float, "xyz").init, float yaw=float.init, float pitch=float.init, int seed=int.init, int dimension=0, int generator=1, int worldGamemode=int.init, int difficulty=int.init, Vector!(int, "xyz") spawnPosition=Vector!(int, "xyz").init, bool loadedInCreative=bool.init, int time=int.init, ubyte version_=ubyte.init, float rainLevel=float.init, float lightningLevel=float.init, bool multiplayerGame=true, bool broadcastToLan=bool.init, bool broadcastToXbl=bool.init, bool commandsEnabled=bool.init, bool textureRequired=bool.init, soupply.bedrock201.types.Rule[] gameRules=(soupply.bedrock201.types.Rule[]).init, bool bonusChestEnabled=bool.init, bool startWithMapEnabled=bool.init, bool trustPlayersEnabled=bool.init, int defaultPermissionLevel=int.init, int xboxLiveBroadcastMode=int.init, uint serverChunkTickRadius=uint.init, string levelId=string.init, string worldName=string.init, string premiumWorldTemplate=string.init, bool unknown32=bool.init, ulong worldTicks=ulong.init, int enchantmentSeed=int.init) pure nothrow @safe @nogc 712 { 713 this.entityId = entityId; 714 this.runtimeId = runtimeId; 715 this.gamemode = gamemode; 716 this.position = position; 717 this.yaw = yaw; 718 this.pitch = pitch; 719 this.seed = seed; 720 this.dimension = dimension; 721 this.generator = generator; 722 this.worldGamemode = worldGamemode; 723 this.difficulty = difficulty; 724 this.spawnPosition = spawnPosition; 725 this.loadedInCreative = loadedInCreative; 726 this.time = time; 727 this.version_ = version_; 728 this.rainLevel = rainLevel; 729 this.lightningLevel = lightningLevel; 730 this.multiplayerGame = multiplayerGame; 731 this.broadcastToLan = broadcastToLan; 732 this.broadcastToXbl = broadcastToXbl; 733 this.commandsEnabled = commandsEnabled; 734 this.textureRequired = textureRequired; 735 this.gameRules = gameRules; 736 this.bonusChestEnabled = bonusChestEnabled; 737 this.startWithMapEnabled = startWithMapEnabled; 738 this.trustPlayersEnabled = trustPlayersEnabled; 739 this.defaultPermissionLevel = defaultPermissionLevel; 740 this.xboxLiveBroadcastMode = xboxLiveBroadcastMode; 741 this.serverChunkTickRadius = serverChunkTickRadius; 742 this.levelId = levelId; 743 this.worldName = worldName; 744 this.premiumWorldTemplate = premiumWorldTemplate; 745 this.unknown32 = unknown32; 746 this.worldTicks = worldTicks; 747 this.enchantmentSeed = enchantmentSeed; 748 } 749 750 mixin Make; 751 752 public static typeof(this) fromBuffer(ubyte[] buffer) 753 { 754 StartGame ret = new StartGame(); 755 ret.decode(buffer); 756 return ret; 757 } 758 759 override string toString() 760 { 761 return "StartGame(entityId: " ~ std.conv.to!string(this.entityId) ~ ", runtimeId: " ~ std.conv.to!string(this.runtimeId) ~ ", gamemode: " ~ std.conv.to!string(this.gamemode) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", seed: " ~ std.conv.to!string(this.seed) ~ ", dimension: " ~ std.conv.to!string(this.dimension) ~ ", generator: " ~ std.conv.to!string(this.generator) ~ ", worldGamemode: " ~ std.conv.to!string(this.worldGamemode) ~ ", difficulty: " ~ std.conv.to!string(this.difficulty) ~ ", spawnPosition: " ~ std.conv.to!string(this.spawnPosition) ~ ", loadedInCreative: " ~ std.conv.to!string(this.loadedInCreative) ~ ", time: " ~ std.conv.to!string(this.time) ~ ", version_: " ~ std.conv.to!string(this.version_) ~ ", rainLevel: " ~ std.conv.to!string(this.rainLevel) ~ ", lightningLevel: " ~ std.conv.to!string(this.lightningLevel) ~ ", multiplayerGame: " ~ std.conv.to!string(this.multiplayerGame) ~ ", broadcastToLan: " ~ std.conv.to!string(this.broadcastToLan) ~ ", broadcastToXbl: " ~ std.conv.to!string(this.broadcastToXbl) ~ ", commandsEnabled: " ~ std.conv.to!string(this.commandsEnabled) ~ ", textureRequired: " ~ std.conv.to!string(this.textureRequired) ~ ", gameRules: " ~ std.conv.to!string(this.gameRules) ~ ", bonusChestEnabled: " ~ std.conv.to!string(this.bonusChestEnabled) ~ ", startWithMapEnabled: " ~ std.conv.to!string(this.startWithMapEnabled) ~ ", trustPlayersEnabled: " ~ std.conv.to!string(this.trustPlayersEnabled) ~ ", defaultPermissionLevel: " ~ std.conv.to!string(this.defaultPermissionLevel) ~ ", xboxLiveBroadcastMode: " ~ std.conv.to!string(this.xboxLiveBroadcastMode) ~ ", serverChunkTickRadius: " ~ std.conv.to!string(this.serverChunkTickRadius) ~ ", levelId: " ~ std.conv.to!string(this.levelId) ~ ", worldName: " ~ std.conv.to!string(this.worldName) ~ ", premiumWorldTemplate: " ~ std.conv.to!string(this.premiumWorldTemplate) ~ ", unknown32: " ~ std.conv.to!string(this.unknown32) ~ ", worldTicks: " ~ std.conv.to!string(this.worldTicks) ~ ", enchantmentSeed: " ~ std.conv.to!string(this.enchantmentSeed) ~ ")"; 762 } 763 764 } 765 766 class AddPlayer : Bedrock201Packet 767 { 768 769 enum uint ID = 12; 770 771 enum bool CLIENTBOUND = true; 772 enum bool SERVERBOUND = false; 773 774 enum string[] __fields = ["uuid", "username", "entityId", "runtimeId", "position", "motion", "pitch", "headYaw", "yaw", "heldItem", "metadata", "unknown11", "unknown12", "unknown13", "unknown14", "unknown15", "unknown16", "links"]; 775 776 soupply.bedrock201.types.McpeUuid uuid; 777 string username; 778 @Var long entityId; 779 @Var ulong runtimeId; 780 Vector!(float, "xyz") position; 781 Vector!(float, "xyz") motion; 782 float pitch; 783 float headYaw; 784 float yaw; 785 soupply.bedrock201.types.Slot heldItem; 786 Metadata metadata; 787 @Var uint unknown11; 788 @Var uint unknown12; 789 @Var uint unknown13; 790 @Var uint unknown14; 791 @Var uint unknown15; 792 long unknown16; 793 soupply.bedrock201.types.Link[] links; 794 795 this() pure nothrow @safe @nogc {} 796 797 this(soupply.bedrock201.types.McpeUuid uuid, string username=string.init, long entityId=long.init, ulong runtimeId=ulong.init, Vector!(float, "xyz") position=Vector!(float, "xyz").init, Vector!(float, "xyz") motion=Vector!(float, "xyz").init, float pitch=float.init, float headYaw=float.init, float yaw=float.init, soupply.bedrock201.types.Slot heldItem=soupply.bedrock201.types.Slot.init, Metadata metadata=Metadata.init, uint unknown11=uint.init, uint unknown12=uint.init, uint unknown13=uint.init, uint unknown14=uint.init, uint unknown15=uint.init, long unknown16=long.init, soupply.bedrock201.types.Link[] links=(soupply.bedrock201.types.Link[]).init) pure nothrow @safe @nogc 798 { 799 this.uuid = uuid; 800 this.username = username; 801 this.entityId = entityId; 802 this.runtimeId = runtimeId; 803 this.position = position; 804 this.motion = motion; 805 this.pitch = pitch; 806 this.headYaw = headYaw; 807 this.yaw = yaw; 808 this.heldItem = heldItem; 809 this.metadata = metadata; 810 this.unknown11 = unknown11; 811 this.unknown12 = unknown12; 812 this.unknown13 = unknown13; 813 this.unknown14 = unknown14; 814 this.unknown15 = unknown15; 815 this.unknown16 = unknown16; 816 this.links = links; 817 } 818 819 mixin Make; 820 821 public static typeof(this) fromBuffer(ubyte[] buffer) 822 { 823 AddPlayer ret = new AddPlayer(); 824 ret.decode(buffer); 825 return ret; 826 } 827 828 override string toString() 829 { 830 return "AddPlayer(uuid: " ~ std.conv.to!string(this.uuid) ~ ", username: " ~ std.conv.to!string(this.username) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ", runtimeId: " ~ std.conv.to!string(this.runtimeId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", motion: " ~ std.conv.to!string(this.motion) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", headYaw: " ~ std.conv.to!string(this.headYaw) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", heldItem: " ~ std.conv.to!string(this.heldItem) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ", unknown11: " ~ std.conv.to!string(this.unknown11) ~ ", unknown12: " ~ std.conv.to!string(this.unknown12) ~ ", unknown13: " ~ std.conv.to!string(this.unknown13) ~ ", unknown14: " ~ std.conv.to!string(this.unknown14) ~ ", unknown15: " ~ std.conv.to!string(this.unknown15) ~ ", unknown16: " ~ std.conv.to!string(this.unknown16) ~ ", links: " ~ std.conv.to!string(this.links) ~ ")"; 831 } 832 833 } 834 835 class AddEntity : Bedrock201Packet 836 { 837 838 enum uint ID = 13; 839 840 enum bool CLIENTBOUND = true; 841 enum bool SERVERBOUND = false; 842 843 enum string[] __fields = ["entityId", "runtimeId", "type", "position", "motion", "pitch", "yaw", "attributes", "metadata", "links"]; 844 845 @Var long entityId; 846 @Var ulong runtimeId; 847 @Var uint type; 848 Vector!(float, "xyz") position; 849 Vector!(float, "xyz") motion; 850 float pitch; 851 float yaw; 852 soupply.bedrock201.types.Attribute[] attributes; 853 Metadata metadata; 854 soupply.bedrock201.types.Link[] links; 855 856 this() pure nothrow @safe @nogc {} 857 858 this(long entityId, ulong runtimeId=ulong.init, uint type=uint.init, Vector!(float, "xyz") position=Vector!(float, "xyz").init, Vector!(float, "xyz") motion=Vector!(float, "xyz").init, float pitch=float.init, float yaw=float.init, soupply.bedrock201.types.Attribute[] attributes=(soupply.bedrock201.types.Attribute[]).init, Metadata metadata=Metadata.init, soupply.bedrock201.types.Link[] links=(soupply.bedrock201.types.Link[]).init) pure nothrow @safe @nogc 859 { 860 this.entityId = entityId; 861 this.runtimeId = runtimeId; 862 this.type = type; 863 this.position = position; 864 this.motion = motion; 865 this.pitch = pitch; 866 this.yaw = yaw; 867 this.attributes = attributes; 868 this.metadata = metadata; 869 this.links = links; 870 } 871 872 mixin Make; 873 874 public static typeof(this) fromBuffer(ubyte[] buffer) 875 { 876 AddEntity ret = new AddEntity(); 877 ret.decode(buffer); 878 return ret; 879 } 880 881 override string toString() 882 { 883 return "AddEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", runtimeId: " ~ std.conv.to!string(this.runtimeId) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", motion: " ~ std.conv.to!string(this.motion) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", attributes: " ~ std.conv.to!string(this.attributes) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ", links: " ~ std.conv.to!string(this.links) ~ ")"; 884 } 885 886 } 887 888 class RemoveEntity : Bedrock201Packet 889 { 890 891 enum uint ID = 14; 892 893 enum bool CLIENTBOUND = true; 894 enum bool SERVERBOUND = false; 895 896 enum string[] __fields = ["entityId"]; 897 898 @Var long entityId; 899 900 this() pure nothrow @safe @nogc {} 901 902 this(long entityId) pure nothrow @safe @nogc 903 { 904 this.entityId = entityId; 905 } 906 907 mixin Make; 908 909 public static typeof(this) fromBuffer(ubyte[] buffer) 910 { 911 RemoveEntity ret = new RemoveEntity(); 912 ret.decode(buffer); 913 return ret; 914 } 915 916 override string toString() 917 { 918 return "RemoveEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ")"; 919 } 920 921 } 922 923 class AddItemEntity : Bedrock201Packet 924 { 925 926 enum uint ID = 15; 927 928 enum bool CLIENTBOUND = true; 929 enum bool SERVERBOUND = false; 930 931 enum string[] __fields = ["entityId", "runtimeId", "item", "position", "motion", "metadata"]; 932 933 @Var long entityId; 934 @Var ulong runtimeId; 935 soupply.bedrock201.types.Slot item; 936 Vector!(float, "xyz") position; 937 Vector!(float, "xyz") motion; 938 Metadata metadata; 939 940 this() pure nothrow @safe @nogc {} 941 942 this(long entityId, ulong runtimeId=ulong.init, soupply.bedrock201.types.Slot item=soupply.bedrock201.types.Slot.init, Vector!(float, "xyz") position=Vector!(float, "xyz").init, Vector!(float, "xyz") motion=Vector!(float, "xyz").init, Metadata metadata=Metadata.init) pure nothrow @safe @nogc 943 { 944 this.entityId = entityId; 945 this.runtimeId = runtimeId; 946 this.item = item; 947 this.position = position; 948 this.motion = motion; 949 this.metadata = metadata; 950 } 951 952 mixin Make; 953 954 public static typeof(this) fromBuffer(ubyte[] buffer) 955 { 956 AddItemEntity ret = new AddItemEntity(); 957 ret.decode(buffer); 958 return ret; 959 } 960 961 override string toString() 962 { 963 return "AddItemEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", runtimeId: " ~ std.conv.to!string(this.runtimeId) ~ ", item: " ~ std.conv.to!string(this.item) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", motion: " ~ std.conv.to!string(this.motion) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ")"; 964 } 965 966 } 967 968 class AddHangingEntity : Bedrock201Packet 969 { 970 971 enum uint ID = 16; 972 973 enum bool CLIENTBOUND = true; 974 enum bool SERVERBOUND = false; 975 976 enum string[] __fields = ["entityId", "runtimeId", "position", "unknown3"]; 977 978 @Var long entityId; 979 @Var ulong runtimeId; 980 soupply.bedrock201.types.BlockPosition position; 981 @Var int unknown3; 982 983 this() pure nothrow @safe @nogc {} 984 985 this(long entityId, ulong runtimeId=ulong.init, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, int unknown3=int.init) pure nothrow @safe @nogc 986 { 987 this.entityId = entityId; 988 this.runtimeId = runtimeId; 989 this.position = position; 990 this.unknown3 = unknown3; 991 } 992 993 mixin Make; 994 995 public static typeof(this) fromBuffer(ubyte[] buffer) 996 { 997 AddHangingEntity ret = new AddHangingEntity(); 998 ret.decode(buffer); 999 return ret; 1000 } 1001 1002 override string toString() 1003 { 1004 return "AddHangingEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", runtimeId: " ~ std.conv.to!string(this.runtimeId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", unknown3: " ~ std.conv.to!string(this.unknown3) ~ ")"; 1005 } 1006 1007 } 1008 1009 class TakeItemEntity : Bedrock201Packet 1010 { 1011 1012 enum uint ID = 17; 1013 1014 enum bool CLIENTBOUND = true; 1015 enum bool SERVERBOUND = false; 1016 1017 enum string[] __fields = ["collected", "collector"]; 1018 1019 @Var long collected; 1020 @Var long collector; 1021 1022 this() pure nothrow @safe @nogc {} 1023 1024 this(long collected, long collector=long.init) pure nothrow @safe @nogc 1025 { 1026 this.collected = collected; 1027 this.collector = collector; 1028 } 1029 1030 mixin Make; 1031 1032 public static typeof(this) fromBuffer(ubyte[] buffer) 1033 { 1034 TakeItemEntity ret = new TakeItemEntity(); 1035 ret.decode(buffer); 1036 return ret; 1037 } 1038 1039 override string toString() 1040 { 1041 return "TakeItemEntity(collected: " ~ std.conv.to!string(this.collected) ~ ", collector: " ~ std.conv.to!string(this.collector) ~ ")"; 1042 } 1043 1044 } 1045 1046 class MoveEntity : Bedrock201Packet 1047 { 1048 1049 enum uint ID = 18; 1050 1051 enum bool CLIENTBOUND = true; 1052 enum bool SERVERBOUND = false; 1053 1054 enum string[] __fields = ["entityId", "position", "pitch", "headYaw", "yaw", "onGround", "teleported"]; 1055 1056 @Var long entityId; 1057 Vector!(float, "xyz") position; 1058 ubyte pitch; 1059 ubyte headYaw; 1060 ubyte yaw; 1061 bool onGround; 1062 bool teleported; 1063 1064 this() pure nothrow @safe @nogc {} 1065 1066 this(long entityId, Vector!(float, "xyz") position=Vector!(float, "xyz").init, ubyte pitch=ubyte.init, ubyte headYaw=ubyte.init, ubyte yaw=ubyte.init, bool onGround=bool.init, bool teleported=bool.init) pure nothrow @safe @nogc 1067 { 1068 this.entityId = entityId; 1069 this.position = position; 1070 this.pitch = pitch; 1071 this.headYaw = headYaw; 1072 this.yaw = yaw; 1073 this.onGround = onGround; 1074 this.teleported = teleported; 1075 } 1076 1077 mixin Make; 1078 1079 public static typeof(this) fromBuffer(ubyte[] buffer) 1080 { 1081 MoveEntity ret = new MoveEntity(); 1082 ret.decode(buffer); 1083 return ret; 1084 } 1085 1086 override string toString() 1087 { 1088 return "MoveEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", headYaw: " ~ std.conv.to!string(this.headYaw) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ", teleported: " ~ std.conv.to!string(this.teleported) ~ ")"; 1089 } 1090 1091 } 1092 1093 class MovePlayer : Bedrock201Packet 1094 { 1095 1096 enum uint ID = 19; 1097 1098 enum bool CLIENTBOUND = true; 1099 enum bool SERVERBOUND = true; 1100 1101 // animation 1102 enum ubyte FULL = 0; 1103 enum ubyte NONE = 1; 1104 enum ubyte TELEPORT = 2; 1105 enum ubyte PITCH = 3; 1106 1107 enum string[] __fields = ["entityId", "position", "pitch", "headYaw", "yaw", "animation", "onGround", "unknown7", "unknown8", "unknown9"]; 1108 1109 @Var long entityId; 1110 Vector!(float, "xyz") position; 1111 float pitch; 1112 float headYaw; 1113 float yaw; 1114 ubyte animation; 1115 bool onGround; 1116 @Var long unknown7; 1117 @Condition("animation==3") int unknown8; 1118 @Condition("animation==3") int unknown9; 1119 1120 this() pure nothrow @safe @nogc {} 1121 1122 this(long entityId, Vector!(float, "xyz") position=Vector!(float, "xyz").init, float pitch=float.init, float headYaw=float.init, float yaw=float.init, ubyte animation=ubyte.init, bool onGround=bool.init, long unknown7=long.init, int unknown8=int.init, int unknown9=int.init) pure nothrow @safe @nogc 1123 { 1124 this.entityId = entityId; 1125 this.position = position; 1126 this.pitch = pitch; 1127 this.headYaw = headYaw; 1128 this.yaw = yaw; 1129 this.animation = animation; 1130 this.onGround = onGround; 1131 this.unknown7 = unknown7; 1132 this.unknown8 = unknown8; 1133 this.unknown9 = unknown9; 1134 } 1135 1136 mixin Make; 1137 1138 public static typeof(this) fromBuffer(ubyte[] buffer) 1139 { 1140 MovePlayer ret = new MovePlayer(); 1141 ret.decode(buffer); 1142 return ret; 1143 } 1144 1145 override string toString() 1146 { 1147 return "MovePlayer(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", headYaw: " ~ std.conv.to!string(this.headYaw) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", animation: " ~ std.conv.to!string(this.animation) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ", unknown7: " ~ std.conv.to!string(this.unknown7) ~ ", unknown8: " ~ std.conv.to!string(this.unknown8) ~ ", unknown9: " ~ std.conv.to!string(this.unknown9) ~ ")"; 1148 } 1149 1150 } 1151 1152 class RiderJump : Bedrock201Packet 1153 { 1154 1155 enum uint ID = 20; 1156 1157 enum bool CLIENTBOUND = true; 1158 enum bool SERVERBOUND = true; 1159 1160 enum string[] __fields = ["rider"]; 1161 1162 @Var long rider; 1163 1164 this() pure nothrow @safe @nogc {} 1165 1166 this(long rider) pure nothrow @safe @nogc 1167 { 1168 this.rider = rider; 1169 } 1170 1171 mixin Make; 1172 1173 public static typeof(this) fromBuffer(ubyte[] buffer) 1174 { 1175 RiderJump ret = new RiderJump(); 1176 ret.decode(buffer); 1177 return ret; 1178 } 1179 1180 override string toString() 1181 { 1182 return "RiderJump(rider: " ~ std.conv.to!string(this.rider) ~ ")"; 1183 } 1184 1185 } 1186 1187 class UpdateBlock : Bedrock201Packet 1188 { 1189 1190 enum uint ID = 21; 1191 1192 enum bool CLIENTBOUND = true; 1193 enum bool SERVERBOUND = false; 1194 1195 // flags and meta 1196 enum uint NEIGHBORS = 1; 1197 enum uint NETWORK = 2; 1198 enum uint NO_GRAPHIC = 4; 1199 enum uint PRIORITY = 8; 1200 1201 enum string[] __fields = ["position", "block", "flagsAndMeta"]; 1202 1203 soupply.bedrock201.types.BlockPosition position; 1204 @Var uint block; 1205 @Var uint flagsAndMeta; 1206 1207 this() pure nothrow @safe @nogc {} 1208 1209 this(soupply.bedrock201.types.BlockPosition position, uint block=uint.init, uint flagsAndMeta=uint.init) pure nothrow @safe @nogc 1210 { 1211 this.position = position; 1212 this.block = block; 1213 this.flagsAndMeta = flagsAndMeta; 1214 } 1215 1216 mixin Make; 1217 1218 public static typeof(this) fromBuffer(ubyte[] buffer) 1219 { 1220 UpdateBlock ret = new UpdateBlock(); 1221 ret.decode(buffer); 1222 return ret; 1223 } 1224 1225 override string toString() 1226 { 1227 return "UpdateBlock(position: " ~ std.conv.to!string(this.position) ~ ", block: " ~ std.conv.to!string(this.block) ~ ", flagsAndMeta: " ~ std.conv.to!string(this.flagsAndMeta) ~ ")"; 1228 } 1229 1230 } 1231 1232 class AddPainting : Bedrock201Packet 1233 { 1234 1235 enum uint ID = 22; 1236 1237 enum bool CLIENTBOUND = true; 1238 enum bool SERVERBOUND = false; 1239 1240 enum string[] __fields = ["entityId", "runtimeId", "position", "direction", "title"]; 1241 1242 @Var long entityId; 1243 @Var ulong runtimeId; 1244 soupply.bedrock201.types.BlockPosition position; 1245 @Var int direction; 1246 string title; 1247 1248 this() pure nothrow @safe @nogc {} 1249 1250 this(long entityId, ulong runtimeId=ulong.init, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, int direction=int.init, string title=string.init) pure nothrow @safe @nogc 1251 { 1252 this.entityId = entityId; 1253 this.runtimeId = runtimeId; 1254 this.position = position; 1255 this.direction = direction; 1256 this.title = title; 1257 } 1258 1259 mixin Make; 1260 1261 public static typeof(this) fromBuffer(ubyte[] buffer) 1262 { 1263 AddPainting ret = new AddPainting(); 1264 ret.decode(buffer); 1265 return ret; 1266 } 1267 1268 override string toString() 1269 { 1270 return "AddPainting(entityId: " ~ std.conv.to!string(this.entityId) ~ ", runtimeId: " ~ std.conv.to!string(this.runtimeId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", direction: " ~ std.conv.to!string(this.direction) ~ ", title: " ~ std.conv.to!string(this.title) ~ ")"; 1271 } 1272 1273 } 1274 1275 class Explode : Bedrock201Packet 1276 { 1277 1278 enum uint ID = 23; 1279 1280 enum bool CLIENTBOUND = true; 1281 enum bool SERVERBOUND = false; 1282 1283 enum string[] __fields = ["position", "radius", "destroyedBlocks"]; 1284 1285 Vector!(float, "xyz") position; 1286 float radius; 1287 soupply.bedrock201.types.BlockPosition[] destroyedBlocks; 1288 1289 this() pure nothrow @safe @nogc {} 1290 1291 this(Vector!(float, "xyz") position, float radius=float.init, soupply.bedrock201.types.BlockPosition[] destroyedBlocks=(soupply.bedrock201.types.BlockPosition[]).init) pure nothrow @safe @nogc 1292 { 1293 this.position = position; 1294 this.radius = radius; 1295 this.destroyedBlocks = destroyedBlocks; 1296 } 1297 1298 mixin Make; 1299 1300 public static typeof(this) fromBuffer(ubyte[] buffer) 1301 { 1302 Explode ret = new Explode(); 1303 ret.decode(buffer); 1304 return ret; 1305 } 1306 1307 override string toString() 1308 { 1309 return "Explode(position: " ~ std.conv.to!string(this.position) ~ ", radius: " ~ std.conv.to!string(this.radius) ~ ", destroyedBlocks: " ~ std.conv.to!string(this.destroyedBlocks) ~ ")"; 1310 } 1311 1312 } 1313 1314 class LevelSoundEvent : Bedrock201Packet 1315 { 1316 1317 enum uint ID = 24; 1318 1319 enum bool CLIENTBOUND = true; 1320 enum bool SERVERBOUND = true; 1321 1322 // sound 1323 enum ubyte ITEM_USE_ON = 0; 1324 enum ubyte HIT = 1; 1325 enum ubyte STEP = 2; 1326 enum ubyte FLY = 3; 1327 enum ubyte JUMP = 4; 1328 enum ubyte BREAK = 5; 1329 enum ubyte PLACE = 6; 1330 enum ubyte HEAVY_STEP = 7; 1331 enum ubyte GALLOP = 8; 1332 enum ubyte FALL = 9; 1333 enum ubyte AMBIENT = 10; 1334 enum ubyte AMBIENT_BABY = 11; 1335 enum ubyte AMBIENT_IN_WATER = 12; 1336 enum ubyte BREATHE = 13; 1337 enum ubyte DEATH = 14; 1338 enum ubyte DEATH_IN_WATER = 15; 1339 enum ubyte DEATH_TO_ZOMBIE = 16; 1340 enum ubyte HURT = 17; 1341 enum ubyte HURT_IN_WATER = 18; 1342 enum ubyte MAD = 19; 1343 enum ubyte BOOST = 20; 1344 enum ubyte BOW = 21; 1345 enum ubyte SQUISH_BIG = 22; 1346 enum ubyte SQUISH_SMALL = 23; 1347 enum ubyte FALL_BIG = 24; 1348 enum ubyte FALL_SMALL = 25; 1349 enum ubyte SPLASH = 26; 1350 enum ubyte FIZZ = 27; 1351 enum ubyte FLAP = 28; 1352 enum ubyte SWIM = 29; 1353 enum ubyte DRINK = 30; 1354 enum ubyte EAT = 31; 1355 enum ubyte TAKEOFF = 32; 1356 enum ubyte SHAKE = 33; 1357 enum ubyte PLOP = 34; 1358 enum ubyte LAND = 35; 1359 enum ubyte SADDLE = 36; 1360 enum ubyte ARMOR = 37; 1361 enum ubyte ADD_CHEST = 38; 1362 enum ubyte THROW = 39; 1363 enum ubyte ATTACK = 40; 1364 enum ubyte ATTACK_NODAMAGE = 41; 1365 enum ubyte ATTACK_STRONG = 42; 1366 enum ubyte WARN = 43; 1367 enum ubyte SHEAR = 44; 1368 enum ubyte MILK = 45; 1369 enum ubyte THUNDER = 46; 1370 enum ubyte EXPLODE = 47; 1371 enum ubyte FIRE = 48; 1372 enum ubyte IGNITE = 49; 1373 enum ubyte FUSE = 50; 1374 enum ubyte STARE = 51; 1375 enum ubyte SPAWN = 52; 1376 enum ubyte SHOOT = 53; 1377 enum ubyte BREAK_BLOCK = 54; 1378 enum ubyte LAUNCH = 55; 1379 enum ubyte BLAST = 56; 1380 enum ubyte LARGE_BLAST = 57; 1381 enum ubyte TWINKLE = 58; 1382 enum ubyte REMEDY = 59; 1383 enum ubyte UNFECT = 60; 1384 enum ubyte LEVELUP = 61; 1385 enum ubyte BOW_HIT = 62; 1386 enum ubyte BULLET_HIT = 63; 1387 enum ubyte EXTINGUISH_FIRE = 64; 1388 enum ubyte ITEM_FIZZ = 65; 1389 enum ubyte CHEST_OPEN = 66; 1390 enum ubyte CHEST_CLOSED = 67; 1391 enum ubyte SHULKER_BOX_OPEN = 68; 1392 enum ubyte SHULKER_BOX_CLOSE = 69; 1393 enum ubyte POWER_ON = 70; 1394 enum ubyte POWER_OFF = 71; 1395 enum ubyte ATTACH = 72; 1396 enum ubyte DETACH = 73; 1397 enum ubyte DENY = 74; 1398 enum ubyte TRIPOD = 75; 1399 enum ubyte POP = 76; 1400 enum ubyte DROP_SLOT = 77; 1401 enum ubyte NOTE = 78; 1402 enum ubyte THORNS = 79; 1403 enum ubyte PISTON_IN = 80; 1404 enum ubyte PISTON_OUT = 81; 1405 enum ubyte PORTAL = 82; 1406 enum ubyte WATER = 83; 1407 enum ubyte LAVA_POP = 84; 1408 enum ubyte LAVA = 85; 1409 enum ubyte BURP = 86; 1410 enum ubyte BUCKET_FILL_WATER = 87; 1411 enum ubyte BUCKET_FILL_LAVA = 88; 1412 enum ubyte BUCKET_EMPTY_WATER = 89; 1413 enum ubyte BUCKET_EMPTY_LAVA = 90; 1414 enum ubyte RECORD_13 = 91; 1415 enum ubyte RECORD_CAT = 92; 1416 enum ubyte RECORD_BLOCKS = 93; 1417 enum ubyte RECORD_CHIRP = 94; 1418 enum ubyte RECORD_FAR = 95; 1419 enum ubyte RECORD_MALL = 96; 1420 enum ubyte RECORD_MELLOHI = 97; 1421 enum ubyte RECORD_STAL = 98; 1422 enum ubyte RECORD_STRAD = 99; 1423 enum ubyte RECORD_WARD = 100; 1424 enum ubyte RECORD_11 = 101; 1425 enum ubyte RECORD_WAIT = 102; 1426 enum ubyte GUARDIAN_FLOP = 104; 1427 enum ubyte ELDERGUARDIAN_CURSE = 105; 1428 enum ubyte MOB_WARNING = 106; 1429 enum ubyte MOB_WARNING_BABY = 107; 1430 enum ubyte TELEPORT = 108; 1431 enum ubyte SHULKER_OPEN = 109; 1432 enum ubyte SHULKER_CLOSE = 110; 1433 enum ubyte HAGGLE = 111; 1434 enum ubyte HAGGLE_YES = 112; 1435 enum ubyte HAGGLE_NO = 113; 1436 enum ubyte HAGGLE_IDLE = 114; 1437 enum ubyte CHORUS_GROW = 115; 1438 enum ubyte CHORUS_DEATH = 116; 1439 enum ubyte GLASS = 117; 1440 enum ubyte CAST_SPELL = 118; 1441 enum ubyte PREPARE_ATTACK = 119; 1442 enum ubyte PREPARE_SUMMON = 120; 1443 enum ubyte PREPARE_WOLOLO = 121; 1444 enum ubyte FANG = 122; 1445 enum ubyte CHARGE = 123; 1446 enum ubyte CAMERA_TAKE_PICTURE = 124; 1447 enum ubyte LEASHKNOT_PLACE = 125; 1448 enum ubyte LEASHKNOT_BREAK = 126; 1449 enum ubyte GROWL = 127; 1450 enum ubyte WHINE = 128; 1451 enum ubyte PANT = 129; 1452 enum ubyte PURR = 130; 1453 enum ubyte PURREOW = 131; 1454 enum ubyte DEATH_MIN_VOLUME = 132; 1455 enum ubyte DEATH_MID_VOLUME = 133; 1456 enum ubyte INITIATE_BLAZE = 134; 1457 enum ubyte INITIATE_CAVE_SPIDER = 135; 1458 enum ubyte INITIATE_CREEPER = 136; 1459 enum ubyte INITIATE_ELDER_GUARDIAN = 137; 1460 enum ubyte INITIATE_ENDER_DRAGON = 138; 1461 enum ubyte INITIATE_ENDERMAN = 139; 1462 enum ubyte INITIATE_EVOCATION_ILLAGER = 141; 1463 enum ubyte INITIATE_GHAST = 142; 1464 enum ubyte INITIATE_HUSK = 143; 1465 enum ubyte INITIATE_ILLUSION_ILLAGER = 144; 1466 enum ubyte INITIATE_MAGMA_CUBE = 145; 1467 enum ubyte INITIATE_POLAR_BEAR = 146; 1468 enum ubyte INITIATE_SHULKER = 147; 1469 enum ubyte INITIATE_SILVERFISH = 148; 1470 enum ubyte INITIATE_SKELETON = 149; 1471 enum ubyte INITIATE_SLIME = 150; 1472 enum ubyte INITIATE_SPIDER = 151; 1473 enum ubyte INITIATE_STRAY = 152; 1474 enum ubyte INITIATE_VEX = 153; 1475 enum ubyte INITIATE_VINDICATION_ILLAGER = 154; 1476 enum ubyte INITIATE_WITCH = 155; 1477 enum ubyte INITIATE_WITHER = 156; 1478 enum ubyte INITIATE_WITHER_SKELETON = 157; 1479 enum ubyte INITIATE_WOLF = 158; 1480 enum ubyte INITIATE_ZOMBIE = 159; 1481 enum ubyte INITIATE_ZOMBIE_PIGMAN = 160; 1482 enum ubyte INITIATE_ZOMBIE_VILLAGER = 161; 1483 enum ubyte BLOCK_END_PORTAL_FRAME_FILL = 162; 1484 enum ubyte BLOCK_END_PORTAL_SPAWN = 163; 1485 enum ubyte RANDOM_ANVIL_USE = 164; 1486 enum ubyte BOTTLE_DRAGONBREATH = 165; 1487 enum ubyte DEFAULT = 166; 1488 enum ubyte UNDEFINED = 167; 1489 1490 enum string[] __fields = ["sound", "position", "volume", "pitch", "unknown4", "disableRelativeVolume"]; 1491 1492 ubyte sound; 1493 Vector!(float, "xyz") position; 1494 @Var uint volume; 1495 @Var int pitch; 1496 bool unknown4; 1497 bool disableRelativeVolume; 1498 1499 this() pure nothrow @safe @nogc {} 1500 1501 this(ubyte sound, Vector!(float, "xyz") position=Vector!(float, "xyz").init, uint volume=uint.init, int pitch=int.init, bool unknown4=bool.init, bool disableRelativeVolume=bool.init) pure nothrow @safe @nogc 1502 { 1503 this.sound = sound; 1504 this.position = position; 1505 this.volume = volume; 1506 this.pitch = pitch; 1507 this.unknown4 = unknown4; 1508 this.disableRelativeVolume = disableRelativeVolume; 1509 } 1510 1511 mixin Make; 1512 1513 public static typeof(this) fromBuffer(ubyte[] buffer) 1514 { 1515 LevelSoundEvent ret = new LevelSoundEvent(); 1516 ret.decode(buffer); 1517 return ret; 1518 } 1519 1520 override string toString() 1521 { 1522 return "LevelSoundEvent(sound: " ~ std.conv.to!string(this.sound) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", volume: " ~ std.conv.to!string(this.volume) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", unknown4: " ~ std.conv.to!string(this.unknown4) ~ ", disableRelativeVolume: " ~ std.conv.to!string(this.disableRelativeVolume) ~ ")"; 1523 } 1524 1525 } 1526 1527 class LevelEvent : Bedrock201Packet 1528 { 1529 1530 enum uint ID = 25; 1531 1532 enum bool CLIENTBOUND = true; 1533 enum bool SERVERBOUND = false; 1534 1535 // event id 1536 enum int START_RAIN = 3001; 1537 enum int START_THUNDER = 3002; 1538 enum int STOP_RAIN = 3003; 1539 enum int STOP_THUNDER = 3004; 1540 enum int START_BLOCK_BREAK = 3600; 1541 enum int STOP_BLOCK_BREAK = 3601; 1542 enum int SET_DATA = 4000; 1543 enum int PLAYERS_SLEEPING = 9800; 1544 enum int PARTICLE_BUBBLE = 16385; 1545 enum int PARTICLE_CRITICAL = 16386; 1546 enum int PARTICLE_BLOCK_FORCE_FIELD = 16387; 1547 enum int PARTICLE_SMOKE = 16388; 1548 enum int PARTICLE_EXPLODE = 16389; 1549 enum int PARTICLE_EVAPORATION = 16390; 1550 enum int PARTICLE_FLAME = 16391; 1551 enum int PARTICLE_LAVA = 16392; 1552 enum int PARTICLE_LARGE_SMOKE = 16393; 1553 enum int PARTICLE_REDSTONE = 16394; 1554 enum int PARTICLE_RISING_RED_DUST = 16395; 1555 enum int PARTICLE_ITEM_BREAK = 16396; 1556 enum int PARTICLE_SNOWBALL_POOF = 16397; 1557 enum int PARTICLE_HUGE_EXPLODE = 16398; 1558 enum int PARTICLE_HUGE_EXPLODE_SEED = 16399; 1559 enum int PARTICLE_MOB_FLAME = 16400; 1560 enum int PARTICLE_HEART = 16401; 1561 enum int PARTICLE_TERRAIN = 16402; 1562 enum int PARTICLE_TOWN_AURA = 16403; 1563 enum int PARTICLE_PORTAL = 16404; 1564 enum int PARTICLE_WATER_SPLASH = 16405; 1565 enum int PARTICLE_WATER_WAKE = 16406; 1566 enum int PARTICLE_DRIP_WATER = 16407; 1567 enum int PARTICLE_DRIP_LAVA = 16408; 1568 enum int PARTICLE_FALLING_DUST = 16409; 1569 enum int PARTICLE_MOB_SPELL = 16410; 1570 enum int PARTICLE_MOB_SPELL_AMBIENT = 16411; 1571 enum int PARTICLE_MOB_SPELL_INSTANTANEOUS = 16412; 1572 enum int PARTICLE_INK = 16413; 1573 enum int PARTICLE_SLIME = 16414; 1574 enum int PARTICLE_RAIN_SPLASH = 16415; 1575 enum int PARTICLE_VILLAGER_ANGRY = 16416; 1576 enum int PARTICLE_VILLAGER_HAPPY = 16417; 1577 enum int PARTICLE_ENCHANTMENT_TABLE = 16418; 1578 enum int PARTICLE_TRACKING_EMITTER = 16419; 1579 enum int PARTICLE_NOTE = 16420; 1580 enum int PARTICLE_WITCH_SPELL = 16421; 1581 enum int PARTICLE_CARROT = 16422; 1582 enum int PARTICLE_END_ROD = 16424; 1583 enum int PARTICLE_DRAGON_BREATH = 16425; 1584 enum int PARTICLE_SHOOT = 2000; 1585 enum int PARTICLE_DESTROY = 2001; 1586 enum int PARTICLE_SPLASH = 2002; 1587 enum int PARTICLE_EYE_DESPAWN = 2003; 1588 enum int PARTICLE_SPAWN = 2004; 1589 1590 enum string[] __fields = ["eventId", "position", "data"]; 1591 1592 @Var int eventId; 1593 Vector!(float, "xyz") position; 1594 @Var int data; 1595 1596 this() pure nothrow @safe @nogc {} 1597 1598 this(int eventId, Vector!(float, "xyz") position=Vector!(float, "xyz").init, int data=int.init) pure nothrow @safe @nogc 1599 { 1600 this.eventId = eventId; 1601 this.position = position; 1602 this.data = data; 1603 } 1604 1605 mixin Make; 1606 1607 public static typeof(this) fromBuffer(ubyte[] buffer) 1608 { 1609 LevelEvent ret = new LevelEvent(); 1610 ret.decode(buffer); 1611 return ret; 1612 } 1613 1614 override string toString() 1615 { 1616 return "LevelEvent(eventId: " ~ std.conv.to!string(this.eventId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 1617 } 1618 1619 } 1620 1621 class BlockEvent : Bedrock201Packet 1622 { 1623 1624 enum uint ID = 26; 1625 1626 enum bool CLIENTBOUND = true; 1627 enum bool SERVERBOUND = false; 1628 1629 enum string[] __fields = ["position", "data"]; 1630 1631 soupply.bedrock201.types.BlockPosition position; 1632 @Var int[2] data; 1633 1634 this() pure nothrow @safe @nogc {} 1635 1636 this(soupply.bedrock201.types.BlockPosition position, int[2] data=(int[2]).init) pure nothrow @safe @nogc 1637 { 1638 this.position = position; 1639 this.data = data; 1640 } 1641 1642 mixin Make; 1643 1644 public static typeof(this) fromBuffer(ubyte[] buffer) 1645 { 1646 BlockEvent ret = new BlockEvent(); 1647 ret.decode(buffer); 1648 return ret; 1649 } 1650 1651 override string toString() 1652 { 1653 return "BlockEvent(position: " ~ std.conv.to!string(this.position) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 1654 } 1655 1656 } 1657 1658 class EntityEvent : Bedrock201Packet 1659 { 1660 1661 enum uint ID = 27; 1662 1663 enum bool CLIENTBOUND = true; 1664 enum bool SERVERBOUND = true; 1665 1666 // event id 1667 enum ubyte HURT_ANIMATION = 2; 1668 enum ubyte DEATH_ANIMATION = 3; 1669 enum ubyte ARM_SWING = 4; 1670 enum ubyte TAME_FAIL = 6; 1671 enum ubyte TAME_SUCCESS = 7; 1672 enum ubyte SHAKE_WET = 8; 1673 enum ubyte USE_ITEM = 9; 1674 enum ubyte EAT_GRASS_ANIMATION = 10; 1675 enum ubyte FISH_HOOK_BUBBLES = 11; 1676 enum ubyte FISH_HOOK_POSITION = 12; 1677 enum ubyte FISH_HOOK_HOOK = 13; 1678 enum ubyte FISH_HOOK_TEASE = 14; 1679 enum ubyte SQUID_INK_CLOUD = 15; 1680 enum ubyte ZOMBIE_VILLAGER_CURE = 16; 1681 enum ubyte RESPAWN = 18; 1682 enum ubyte IRON_GOLEM_OFFER_FLOWER = 19; 1683 enum ubyte IRON_GOLEM_WITHDRAW_FLOWER = 20; 1684 enum ubyte LOVE_PARTICLES = 21; 1685 enum ubyte WITCH_SPELL_ANIMATION = 24; 1686 enum ubyte FIREWORK_PARTICLES = 25; 1687 enum ubyte SILVERFISH_SPAWN_ANIMATION = 27; 1688 enum ubyte WITCH_DRINK_POTION = 29; 1689 enum ubyte WITCH_THROWN_POTION = 30; 1690 enum ubyte MINECART_TNT_PRIME_FUSE = 31; 1691 enum ubyte PLAYER_ADD_XP_LEVELS = 34; 1692 enum ubyte ELDER_GUARDIAN_CURSE = 35; 1693 enum ubyte AGENT_ARM_SWING = 36; 1694 enum ubyte ENDER_DRAGON_DEATH = 37; 1695 enum ubyte DUST_PARTICLES = 38; 1696 enum ubyte EATING_ITEM = 57; 1697 enum ubyte BABY_ANIMAL_FEED = 60; 1698 enum ubyte DEATH_SMOKE_CLOUD = 61; 1699 enum ubyte COMPLETE_TRADE = 62; 1700 enum ubyte REMOVE_LEASH = 63; 1701 enum ubyte CONSUME_TOTEM = 65; 1702 enum ubyte ENTITY_SPAWN = 67; 1703 enum ubyte DRAGON_PUKE = 68; 1704 enum ubyte ITEM_ENTITY_MERGE = 69; 1705 1706 enum string[] __fields = ["entityId", "eventId", "data"]; 1707 1708 @Var long entityId; 1709 ubyte eventId; 1710 @Var int data; 1711 1712 this() pure nothrow @safe @nogc {} 1713 1714 this(long entityId, ubyte eventId=ubyte.init, int data=int.init) pure nothrow @safe @nogc 1715 { 1716 this.entityId = entityId; 1717 this.eventId = eventId; 1718 this.data = data; 1719 } 1720 1721 mixin Make; 1722 1723 public static typeof(this) fromBuffer(ubyte[] buffer) 1724 { 1725 EntityEvent ret = new EntityEvent(); 1726 ret.decode(buffer); 1727 return ret; 1728 } 1729 1730 override string toString() 1731 { 1732 return "EntityEvent(entityId: " ~ std.conv.to!string(this.entityId) ~ ", eventId: " ~ std.conv.to!string(this.eventId) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 1733 } 1734 1735 } 1736 1737 class MobEffect : Bedrock201Packet 1738 { 1739 1740 enum uint ID = 28; 1741 1742 enum bool CLIENTBOUND = true; 1743 enum bool SERVERBOUND = false; 1744 1745 // event id 1746 enum ubyte ADD = 1; 1747 enum ubyte MODIFY = 2; 1748 enum ubyte REMOVE = 3; 1749 1750 enum string[] __fields = ["entityId", "eventId", "effect", "amplifier", "particles", "duration"]; 1751 1752 @Var long entityId; 1753 ubyte eventId; 1754 @Var int effect; 1755 @Var int amplifier; 1756 bool particles; 1757 @Var int duration; 1758 1759 this() pure nothrow @safe @nogc {} 1760 1761 this(long entityId, ubyte eventId=ubyte.init, int effect=int.init, int amplifier=int.init, bool particles=bool.init, int duration=int.init) pure nothrow @safe @nogc 1762 { 1763 this.entityId = entityId; 1764 this.eventId = eventId; 1765 this.effect = effect; 1766 this.amplifier = amplifier; 1767 this.particles = particles; 1768 this.duration = duration; 1769 } 1770 1771 mixin Make; 1772 1773 public static typeof(this) fromBuffer(ubyte[] buffer) 1774 { 1775 MobEffect ret = new MobEffect(); 1776 ret.decode(buffer); 1777 return ret; 1778 } 1779 1780 override string toString() 1781 { 1782 return "MobEffect(entityId: " ~ std.conv.to!string(this.entityId) ~ ", eventId: " ~ std.conv.to!string(this.eventId) ~ ", effect: " ~ std.conv.to!string(this.effect) ~ ", amplifier: " ~ std.conv.to!string(this.amplifier) ~ ", particles: " ~ std.conv.to!string(this.particles) ~ ", duration: " ~ std.conv.to!string(this.duration) ~ ")"; 1783 } 1784 1785 } 1786 1787 class UpdateAttributes : Bedrock201Packet 1788 { 1789 1790 enum uint ID = 29; 1791 1792 enum bool CLIENTBOUND = true; 1793 enum bool SERVERBOUND = false; 1794 1795 enum string[] __fields = ["entityId", "attributes"]; 1796 1797 @Var long entityId; 1798 soupply.bedrock201.types.Attribute[] attributes; 1799 1800 this() pure nothrow @safe @nogc {} 1801 1802 this(long entityId, soupply.bedrock201.types.Attribute[] attributes=(soupply.bedrock201.types.Attribute[]).init) pure nothrow @safe @nogc 1803 { 1804 this.entityId = entityId; 1805 this.attributes = attributes; 1806 } 1807 1808 mixin Make; 1809 1810 public static typeof(this) fromBuffer(ubyte[] buffer) 1811 { 1812 UpdateAttributes ret = new UpdateAttributes(); 1813 ret.decode(buffer); 1814 return ret; 1815 } 1816 1817 override string toString() 1818 { 1819 return "UpdateAttributes(entityId: " ~ std.conv.to!string(this.entityId) ~ ", attributes: " ~ std.conv.to!string(this.attributes) ~ ")"; 1820 } 1821 1822 } 1823 1824 class InventoryTransaction : Bedrock201Packet 1825 { 1826 1827 enum uint ID = 30; 1828 1829 enum bool CLIENTBOUND = false; 1830 enum bool SERVERBOUND = true; 1831 1832 enum string[] __fields = ["type", "actions"]; 1833 1834 @Var uint type; 1835 soupply.bedrock201.types.InventoryAction[] actions; 1836 1837 this() pure nothrow @safe @nogc {} 1838 1839 this(uint type, soupply.bedrock201.types.InventoryAction[] actions=(soupply.bedrock201.types.InventoryAction[]).init) pure nothrow @safe @nogc 1840 { 1841 this.type = type; 1842 this.actions = actions; 1843 } 1844 1845 mixin Make; 1846 1847 public static typeof(this) fromBuffer(ubyte[] buffer) 1848 { 1849 InventoryTransaction ret = new InventoryTransaction(); 1850 ret.decode(buffer); 1851 return ret; 1852 } 1853 1854 override string toString() 1855 { 1856 return "InventoryTransaction(type: " ~ std.conv.to!string(this.type) ~ ", actions: " ~ std.conv.to!string(this.actions) ~ ")"; 1857 } 1858 1859 enum string variantField = "type"; 1860 1861 alias Variants = TypeTuple!(Normal0, Normal1, UseItem, UseItemOnEntity, ReleaseItem); 1862 1863 class Normal0 : Bedrock201Packet 1864 { 1865 1866 enum typeof(type) TYPE = 0; 1867 1868 enum string[] __fields = []; 1869 1870 mixin Make; 1871 1872 override string toString() 1873 { 1874 return "InventoryTransaction.Normal0()"; 1875 } 1876 1877 } 1878 1879 class Normal1 : Bedrock201Packet 1880 { 1881 1882 enum typeof(type) TYPE = 1; 1883 1884 enum string[] __fields = []; 1885 1886 mixin Make; 1887 1888 override string toString() 1889 { 1890 return "InventoryTransaction.Normal1()"; 1891 } 1892 1893 } 1894 1895 class UseItem : Bedrock201Packet 1896 { 1897 1898 enum typeof(type) TYPE = 2; 1899 1900 // action type 1901 enum uint CLICK_BLOCK = 0; 1902 enum uint CLICK_AIR = 1; 1903 enum uint BREAK_BLOCK = 2; 1904 1905 enum string[] __fields = ["actionType", "blockPosition", "face", "hotbarSlot", "item", "playerPosition", "clickPosition"]; 1906 1907 @Var uint actionType; 1908 soupply.bedrock201.types.BlockPosition blockPosition; 1909 @Var int face; 1910 @Var int hotbarSlot; 1911 soupply.bedrock201.types.Slot item; 1912 Vector!(float, "xyz") playerPosition; 1913 Vector!(float, "xyz") clickPosition; 1914 1915 this() pure nothrow @safe @nogc {} 1916 1917 this(uint actionType, soupply.bedrock201.types.BlockPosition blockPosition=soupply.bedrock201.types.BlockPosition.init, int face=int.init, int hotbarSlot=int.init, soupply.bedrock201.types.Slot item=soupply.bedrock201.types.Slot.init, Vector!(float, "xyz") playerPosition=Vector!(float, "xyz").init, Vector!(float, "xyz") clickPosition=Vector!(float, "xyz").init) pure nothrow @safe @nogc 1918 { 1919 this.actionType = actionType; 1920 this.blockPosition = blockPosition; 1921 this.face = face; 1922 this.hotbarSlot = hotbarSlot; 1923 this.item = item; 1924 this.playerPosition = playerPosition; 1925 this.clickPosition = clickPosition; 1926 } 1927 1928 mixin Make; 1929 1930 override string toString() 1931 { 1932 return "InventoryTransaction.UseItem(actionType: " ~ std.conv.to!string(this.actionType) ~ ", blockPosition: " ~ std.conv.to!string(this.blockPosition) ~ ", face: " ~ std.conv.to!string(this.face) ~ ", hotbarSlot: " ~ std.conv.to!string(this.hotbarSlot) ~ ", item: " ~ std.conv.to!string(this.item) ~ ", playerPosition: " ~ std.conv.to!string(this.playerPosition) ~ ", clickPosition: " ~ std.conv.to!string(this.clickPosition) ~ ")"; 1933 } 1934 1935 } 1936 1937 class UseItemOnEntity : Bedrock201Packet 1938 { 1939 1940 enum typeof(type) TYPE = 3; 1941 1942 // action type 1943 enum uint INTERACT = 0; 1944 enum uint ATTACK = 1; 1945 1946 enum string[] __fields = ["entityId", "actionType", "hotbarSlot", "item", "unknown4", "unknown5"]; 1947 1948 @Var long entityId; 1949 @Var uint actionType; 1950 @Var int hotbarSlot; 1951 soupply.bedrock201.types.Slot item; 1952 Vector!(float, "xyz") unknown4; 1953 Vector!(float, "xyz") unknown5; 1954 1955 this() pure nothrow @safe @nogc {} 1956 1957 this(long entityId, uint actionType=uint.init, int hotbarSlot=int.init, soupply.bedrock201.types.Slot item=soupply.bedrock201.types.Slot.init, Vector!(float, "xyz") unknown4=Vector!(float, "xyz").init, Vector!(float, "xyz") unknown5=Vector!(float, "xyz").init) pure nothrow @safe @nogc 1958 { 1959 this.entityId = entityId; 1960 this.actionType = actionType; 1961 this.hotbarSlot = hotbarSlot; 1962 this.item = item; 1963 this.unknown4 = unknown4; 1964 this.unknown5 = unknown5; 1965 } 1966 1967 mixin Make; 1968 1969 override string toString() 1970 { 1971 return "InventoryTransaction.UseItemOnEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", actionType: " ~ std.conv.to!string(this.actionType) ~ ", hotbarSlot: " ~ std.conv.to!string(this.hotbarSlot) ~ ", item: " ~ std.conv.to!string(this.item) ~ ", unknown4: " ~ std.conv.to!string(this.unknown4) ~ ", unknown5: " ~ std.conv.to!string(this.unknown5) ~ ")"; 1972 } 1973 1974 } 1975 1976 class ReleaseItem : Bedrock201Packet 1977 { 1978 1979 enum typeof(type) TYPE = 4; 1980 1981 // action type 1982 enum uint SHOOT_BOW = 0; 1983 enum uint CONSUME = 1; 1984 1985 enum string[] __fields = ["actionType", "hotbarSlot", "item", "headPosition"]; 1986 1987 @Var uint actionType; 1988 @Var int hotbarSlot; 1989 soupply.bedrock201.types.Slot item; 1990 Vector!(float, "xyz") headPosition; 1991 1992 this() pure nothrow @safe @nogc {} 1993 1994 this(uint actionType, int hotbarSlot=int.init, soupply.bedrock201.types.Slot item=soupply.bedrock201.types.Slot.init, Vector!(float, "xyz") headPosition=Vector!(float, "xyz").init) pure nothrow @safe @nogc 1995 { 1996 this.actionType = actionType; 1997 this.hotbarSlot = hotbarSlot; 1998 this.item = item; 1999 this.headPosition = headPosition; 2000 } 2001 2002 mixin Make; 2003 2004 override string toString() 2005 { 2006 return "InventoryTransaction.ReleaseItem(actionType: " ~ std.conv.to!string(this.actionType) ~ ", hotbarSlot: " ~ std.conv.to!string(this.hotbarSlot) ~ ", item: " ~ std.conv.to!string(this.item) ~ ", headPosition: " ~ std.conv.to!string(this.headPosition) ~ ")"; 2007 } 2008 2009 } 2010 2011 } 2012 2013 class MobEquipment : Bedrock201Packet 2014 { 2015 2016 enum uint ID = 31; 2017 2018 enum bool CLIENTBOUND = true; 2019 enum bool SERVERBOUND = true; 2020 2021 enum string[] __fields = ["entityId", "item", "inventorySlot", "hotbarSlot", "unknown4"]; 2022 2023 @Var long entityId; 2024 soupply.bedrock201.types.Slot item; 2025 ubyte inventorySlot; 2026 ubyte hotbarSlot; 2027 ubyte unknown4; 2028 2029 this() pure nothrow @safe @nogc {} 2030 2031 this(long entityId, soupply.bedrock201.types.Slot item=soupply.bedrock201.types.Slot.init, ubyte inventorySlot=ubyte.init, ubyte hotbarSlot=ubyte.init, ubyte unknown4=ubyte.init) pure nothrow @safe @nogc 2032 { 2033 this.entityId = entityId; 2034 this.item = item; 2035 this.inventorySlot = inventorySlot; 2036 this.hotbarSlot = hotbarSlot; 2037 this.unknown4 = unknown4; 2038 } 2039 2040 mixin Make; 2041 2042 public static typeof(this) fromBuffer(ubyte[] buffer) 2043 { 2044 MobEquipment ret = new MobEquipment(); 2045 ret.decode(buffer); 2046 return ret; 2047 } 2048 2049 override string toString() 2050 { 2051 return "MobEquipment(entityId: " ~ std.conv.to!string(this.entityId) ~ ", item: " ~ std.conv.to!string(this.item) ~ ", inventorySlot: " ~ std.conv.to!string(this.inventorySlot) ~ ", hotbarSlot: " ~ std.conv.to!string(this.hotbarSlot) ~ ", unknown4: " ~ std.conv.to!string(this.unknown4) ~ ")"; 2052 } 2053 2054 } 2055 2056 class MobArmorEquipment : Bedrock201Packet 2057 { 2058 2059 enum uint ID = 32; 2060 2061 enum bool CLIENTBOUND = true; 2062 enum bool SERVERBOUND = true; 2063 2064 enum string[] __fields = ["entityId", "armor"]; 2065 2066 @Var long entityId; 2067 soupply.bedrock201.types.Slot[4] armor; 2068 2069 this() pure nothrow @safe @nogc {} 2070 2071 this(long entityId, soupply.bedrock201.types.Slot[4] armor=(soupply.bedrock201.types.Slot[4]).init) pure nothrow @safe @nogc 2072 { 2073 this.entityId = entityId; 2074 this.armor = armor; 2075 } 2076 2077 mixin Make; 2078 2079 public static typeof(this) fromBuffer(ubyte[] buffer) 2080 { 2081 MobArmorEquipment ret = new MobArmorEquipment(); 2082 ret.decode(buffer); 2083 return ret; 2084 } 2085 2086 override string toString() 2087 { 2088 return "MobArmorEquipment(entityId: " ~ std.conv.to!string(this.entityId) ~ ", armor: " ~ std.conv.to!string(this.armor) ~ ")"; 2089 } 2090 2091 } 2092 2093 class Interact : Bedrock201Packet 2094 { 2095 2096 enum uint ID = 33; 2097 2098 enum bool CLIENTBOUND = false; 2099 enum bool SERVERBOUND = true; 2100 2101 // action 2102 enum ubyte LEAVE_VEHICLE = 3; 2103 enum ubyte HOVER = 4; 2104 enum ubyte OPEN_INVENTORY = 6; 2105 2106 enum string[] __fields = ["action", "target", "targetPosition"]; 2107 2108 ubyte action; 2109 @Var long target; 2110 @Condition("action==4") Vector!(float, "xyz") targetPosition; 2111 2112 this() pure nothrow @safe @nogc {} 2113 2114 this(ubyte action, long target=long.init, Vector!(float, "xyz") targetPosition=Vector!(float, "xyz").init) pure nothrow @safe @nogc 2115 { 2116 this.action = action; 2117 this.target = target; 2118 this.targetPosition = targetPosition; 2119 } 2120 2121 mixin Make; 2122 2123 public static typeof(this) fromBuffer(ubyte[] buffer) 2124 { 2125 Interact ret = new Interact(); 2126 ret.decode(buffer); 2127 return ret; 2128 } 2129 2130 override string toString() 2131 { 2132 return "Interact(action: " ~ std.conv.to!string(this.action) ~ ", target: " ~ std.conv.to!string(this.target) ~ ", targetPosition: " ~ std.conv.to!string(this.targetPosition) ~ ")"; 2133 } 2134 2135 } 2136 2137 class BlockPickRequest : Bedrock201Packet 2138 { 2139 2140 enum uint ID = 34; 2141 2142 enum bool CLIENTBOUND = false; 2143 enum bool SERVERBOUND = true; 2144 2145 enum string[] __fields = ["position", "unknown1", "slot"]; 2146 2147 @Var Vector!(int, "xyz") position; 2148 bool unknown1; 2149 ubyte slot; 2150 2151 this() pure nothrow @safe @nogc {} 2152 2153 this(Vector!(int, "xyz") position, bool unknown1=bool.init, ubyte slot=ubyte.init) pure nothrow @safe @nogc 2154 { 2155 this.position = position; 2156 this.unknown1 = unknown1; 2157 this.slot = slot; 2158 } 2159 2160 mixin Make; 2161 2162 public static typeof(this) fromBuffer(ubyte[] buffer) 2163 { 2164 BlockPickRequest ret = new BlockPickRequest(); 2165 ret.decode(buffer); 2166 return ret; 2167 } 2168 2169 override string toString() 2170 { 2171 return "BlockPickRequest(position: " ~ std.conv.to!string(this.position) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ")"; 2172 } 2173 2174 } 2175 2176 class EntityPickRequest : Bedrock201Packet 2177 { 2178 2179 enum uint ID = 35; 2180 2181 enum bool CLIENTBOUND = false; 2182 enum bool SERVERBOUND = true; 2183 2184 enum string[] __fields = ["entityType", "slot"]; 2185 2186 long entityType; 2187 ubyte slot; 2188 2189 this() pure nothrow @safe @nogc {} 2190 2191 this(long entityType, ubyte slot=ubyte.init) pure nothrow @safe @nogc 2192 { 2193 this.entityType = entityType; 2194 this.slot = slot; 2195 } 2196 2197 mixin Make; 2198 2199 public static typeof(this) fromBuffer(ubyte[] buffer) 2200 { 2201 EntityPickRequest ret = new EntityPickRequest(); 2202 ret.decode(buffer); 2203 return ret; 2204 } 2205 2206 override string toString() 2207 { 2208 return "EntityPickRequest(entityType: " ~ std.conv.to!string(this.entityType) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ")"; 2209 } 2210 2211 } 2212 2213 class PlayerAction : Bedrock201Packet 2214 { 2215 2216 enum uint ID = 36; 2217 2218 enum bool CLIENTBOUND = false; 2219 enum bool SERVERBOUND = true; 2220 2221 // action 2222 enum int START_BREAK = 0; 2223 enum int ABORT_BREAK = 1; 2224 enum int STOP_BREAK = 2; 2225 enum int GET_UPDATED_BLOCK = 3; 2226 enum int DROP_ITEM = 4; 2227 enum int START_SLEEPING = 5; 2228 enum int STOP_SLEEPING = 6; 2229 enum int RESPAWN = 7; 2230 enum int JUMP = 8; 2231 enum int START_SPRINT = 9; 2232 enum int STOP_SPRINT = 10; 2233 enum int START_SNEAK = 11; 2234 enum int STOP_SNEAK = 12; 2235 enum int START_GLIDING = 15; 2236 enum int STOP_GLIDING = 16; 2237 enum int BUILD_DENIED = 17; 2238 enum int CONTINUE_BREAK = 18; 2239 enum int CHANGE_SKIN = 19; 2240 2241 enum string[] __fields = ["entityId", "action", "position", "face"]; 2242 2243 @Var long entityId; 2244 @Var int action; 2245 soupply.bedrock201.types.BlockPosition position; 2246 @Var int face; 2247 2248 this() pure nothrow @safe @nogc {} 2249 2250 this(long entityId, int action=int.init, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, int face=int.init) pure nothrow @safe @nogc 2251 { 2252 this.entityId = entityId; 2253 this.action = action; 2254 this.position = position; 2255 this.face = face; 2256 } 2257 2258 mixin Make; 2259 2260 public static typeof(this) fromBuffer(ubyte[] buffer) 2261 { 2262 PlayerAction ret = new PlayerAction(); 2263 ret.decode(buffer); 2264 return ret; 2265 } 2266 2267 override string toString() 2268 { 2269 return "PlayerAction(entityId: " ~ std.conv.to!string(this.entityId) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", face: " ~ std.conv.to!string(this.face) ~ ")"; 2270 } 2271 2272 } 2273 2274 class EntityFall : Bedrock201Packet 2275 { 2276 2277 enum uint ID = 37; 2278 2279 enum bool CLIENTBOUND = false; 2280 enum bool SERVERBOUND = true; 2281 2282 enum string[] __fields = ["entityId", "distance", "unknown2"]; 2283 2284 @Var long entityId; 2285 float distance; 2286 bool unknown2; 2287 2288 this() pure nothrow @safe @nogc {} 2289 2290 this(long entityId, float distance=float.init, bool unknown2=bool.init) pure nothrow @safe @nogc 2291 { 2292 this.entityId = entityId; 2293 this.distance = distance; 2294 this.unknown2 = unknown2; 2295 } 2296 2297 mixin Make; 2298 2299 public static typeof(this) fromBuffer(ubyte[] buffer) 2300 { 2301 EntityFall ret = new EntityFall(); 2302 ret.decode(buffer); 2303 return ret; 2304 } 2305 2306 override string toString() 2307 { 2308 return "EntityFall(entityId: " ~ std.conv.to!string(this.entityId) ~ ", distance: " ~ std.conv.to!string(this.distance) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 2309 } 2310 2311 } 2312 2313 class HurtArmor : Bedrock201Packet 2314 { 2315 2316 enum uint ID = 38; 2317 2318 enum bool CLIENTBOUND = true; 2319 enum bool SERVERBOUND = false; 2320 2321 enum string[] __fields = ["unknown0"]; 2322 2323 @Var int unknown0; 2324 2325 this() pure nothrow @safe @nogc {} 2326 2327 this(int unknown0) pure nothrow @safe @nogc 2328 { 2329 this.unknown0 = unknown0; 2330 } 2331 2332 mixin Make; 2333 2334 public static typeof(this) fromBuffer(ubyte[] buffer) 2335 { 2336 HurtArmor ret = new HurtArmor(); 2337 ret.decode(buffer); 2338 return ret; 2339 } 2340 2341 override string toString() 2342 { 2343 return "HurtArmor(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ")"; 2344 } 2345 2346 } 2347 2348 class SetEntityData : Bedrock201Packet 2349 { 2350 2351 enum uint ID = 39; 2352 2353 enum bool CLIENTBOUND = true; 2354 enum bool SERVERBOUND = false; 2355 2356 enum string[] __fields = ["entityId", "metadata"]; 2357 2358 @Var long entityId; 2359 Metadata metadata; 2360 2361 this() pure nothrow @safe @nogc {} 2362 2363 this(long entityId, Metadata metadata=Metadata.init) pure nothrow @safe @nogc 2364 { 2365 this.entityId = entityId; 2366 this.metadata = metadata; 2367 } 2368 2369 mixin Make; 2370 2371 public static typeof(this) fromBuffer(ubyte[] buffer) 2372 { 2373 SetEntityData ret = new SetEntityData(); 2374 ret.decode(buffer); 2375 return ret; 2376 } 2377 2378 override string toString() 2379 { 2380 return "SetEntityData(entityId: " ~ std.conv.to!string(this.entityId) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ")"; 2381 } 2382 2383 } 2384 2385 class SetEntityMotion : Bedrock201Packet 2386 { 2387 2388 enum uint ID = 40; 2389 2390 enum bool CLIENTBOUND = true; 2391 enum bool SERVERBOUND = false; 2392 2393 enum string[] __fields = ["entityId", "motion"]; 2394 2395 @Var long entityId; 2396 Vector!(float, "xyz") motion; 2397 2398 this() pure nothrow @safe @nogc {} 2399 2400 this(long entityId, Vector!(float, "xyz") motion=Vector!(float, "xyz").init) pure nothrow @safe @nogc 2401 { 2402 this.entityId = entityId; 2403 this.motion = motion; 2404 } 2405 2406 mixin Make; 2407 2408 public static typeof(this) fromBuffer(ubyte[] buffer) 2409 { 2410 SetEntityMotion ret = new SetEntityMotion(); 2411 ret.decode(buffer); 2412 return ret; 2413 } 2414 2415 override string toString() 2416 { 2417 return "SetEntityMotion(entityId: " ~ std.conv.to!string(this.entityId) ~ ", motion: " ~ std.conv.to!string(this.motion) ~ ")"; 2418 } 2419 2420 } 2421 2422 class SetEntityLink : Bedrock201Packet 2423 { 2424 2425 enum uint ID = 41; 2426 2427 enum bool CLIENTBOUND = true; 2428 enum bool SERVERBOUND = false; 2429 2430 // action 2431 enum ubyte REMOVE = 0; 2432 enum ubyte ADD = 1; 2433 2434 enum string[] __fields = ["vehicle", "passenger", "action"]; 2435 2436 @Var long vehicle; 2437 @Var long passenger; 2438 ubyte action; 2439 2440 this() pure nothrow @safe @nogc {} 2441 2442 this(long vehicle, long passenger=long.init, ubyte action=ubyte.init) pure nothrow @safe @nogc 2443 { 2444 this.vehicle = vehicle; 2445 this.passenger = passenger; 2446 this.action = action; 2447 } 2448 2449 mixin Make; 2450 2451 public static typeof(this) fromBuffer(ubyte[] buffer) 2452 { 2453 SetEntityLink ret = new SetEntityLink(); 2454 ret.decode(buffer); 2455 return ret; 2456 } 2457 2458 override string toString() 2459 { 2460 return "SetEntityLink(vehicle: " ~ std.conv.to!string(this.vehicle) ~ ", passenger: " ~ std.conv.to!string(this.passenger) ~ ", action: " ~ std.conv.to!string(this.action) ~ ")"; 2461 } 2462 2463 } 2464 2465 class SetHealth : Bedrock201Packet 2466 { 2467 2468 enum uint ID = 42; 2469 2470 enum bool CLIENTBOUND = true; 2471 enum bool SERVERBOUND = false; 2472 2473 enum string[] __fields = ["health"]; 2474 2475 @Var int health; 2476 2477 this() pure nothrow @safe @nogc {} 2478 2479 this(int health) pure nothrow @safe @nogc 2480 { 2481 this.health = health; 2482 } 2483 2484 mixin Make; 2485 2486 public static typeof(this) fromBuffer(ubyte[] buffer) 2487 { 2488 SetHealth ret = new SetHealth(); 2489 ret.decode(buffer); 2490 return ret; 2491 } 2492 2493 override string toString() 2494 { 2495 return "SetHealth(health: " ~ std.conv.to!string(this.health) ~ ")"; 2496 } 2497 2498 } 2499 2500 class SetSpawnPosition : Bedrock201Packet 2501 { 2502 2503 enum uint ID = 43; 2504 2505 enum bool CLIENTBOUND = true; 2506 enum bool SERVERBOUND = false; 2507 2508 // type 2509 enum int PLAYER_SPAWN = 0; 2510 enum int WORLD_SPAWN = 1; 2511 2512 enum string[] __fields = ["type", "position", "forced"]; 2513 2514 @Var int type; 2515 soupply.bedrock201.types.BlockPosition position; 2516 bool forced; 2517 2518 this() pure nothrow @safe @nogc {} 2519 2520 this(int type, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, bool forced=bool.init) pure nothrow @safe @nogc 2521 { 2522 this.type = type; 2523 this.position = position; 2524 this.forced = forced; 2525 } 2526 2527 mixin Make; 2528 2529 public static typeof(this) fromBuffer(ubyte[] buffer) 2530 { 2531 SetSpawnPosition ret = new SetSpawnPosition(); 2532 ret.decode(buffer); 2533 return ret; 2534 } 2535 2536 override string toString() 2537 { 2538 return "SetSpawnPosition(type: " ~ std.conv.to!string(this.type) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", forced: " ~ std.conv.to!string(this.forced) ~ ")"; 2539 } 2540 2541 } 2542 2543 class Animate : Bedrock201Packet 2544 { 2545 2546 enum uint ID = 44; 2547 2548 enum bool CLIENTBOUND = true; 2549 enum bool SERVERBOUND = true; 2550 2551 // action 2552 enum int BREAKING = 1; 2553 enum int WAKE_UP = 3; 2554 2555 enum string[] __fields = ["action", "entityId", "unknown2"]; 2556 2557 @Var int action; 2558 @Var long entityId; 2559 @Condition("action>128") float unknown2; 2560 2561 this() pure nothrow @safe @nogc {} 2562 2563 this(int action, long entityId=long.init, float unknown2=float.init) pure nothrow @safe @nogc 2564 { 2565 this.action = action; 2566 this.entityId = entityId; 2567 this.unknown2 = unknown2; 2568 } 2569 2570 mixin Make; 2571 2572 public static typeof(this) fromBuffer(ubyte[] buffer) 2573 { 2574 Animate ret = new Animate(); 2575 ret.decode(buffer); 2576 return ret; 2577 } 2578 2579 override string toString() 2580 { 2581 return "Animate(action: " ~ std.conv.to!string(this.action) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 2582 } 2583 2584 } 2585 2586 class Respawn : Bedrock201Packet 2587 { 2588 2589 enum uint ID = 45; 2590 2591 enum bool CLIENTBOUND = true; 2592 enum bool SERVERBOUND = false; 2593 2594 enum string[] __fields = ["position"]; 2595 2596 Vector!(float, "xyz") position; 2597 2598 this() pure nothrow @safe @nogc {} 2599 2600 this(Vector!(float, "xyz") position) pure nothrow @safe @nogc 2601 { 2602 this.position = position; 2603 } 2604 2605 mixin Make; 2606 2607 public static typeof(this) fromBuffer(ubyte[] buffer) 2608 { 2609 Respawn ret = new Respawn(); 2610 ret.decode(buffer); 2611 return ret; 2612 } 2613 2614 override string toString() 2615 { 2616 return "Respawn(position: " ~ std.conv.to!string(this.position) ~ ")"; 2617 } 2618 2619 } 2620 2621 class ContainerOpen : Bedrock201Packet 2622 { 2623 2624 enum uint ID = 46; 2625 2626 enum bool CLIENTBOUND = true; 2627 enum bool SERVERBOUND = false; 2628 2629 enum string[] __fields = ["window", "type", "position", "entityId"]; 2630 2631 ubyte window; 2632 ubyte type; 2633 soupply.bedrock201.types.BlockPosition position; 2634 @Var long entityId; 2635 2636 this() pure nothrow @safe @nogc {} 2637 2638 this(ubyte window, ubyte type=ubyte.init, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, long entityId=long.init) pure nothrow @safe @nogc 2639 { 2640 this.window = window; 2641 this.type = type; 2642 this.position = position; 2643 this.entityId = entityId; 2644 } 2645 2646 mixin Make; 2647 2648 public static typeof(this) fromBuffer(ubyte[] buffer) 2649 { 2650 ContainerOpen ret = new ContainerOpen(); 2651 ret.decode(buffer); 2652 return ret; 2653 } 2654 2655 override string toString() 2656 { 2657 return "ContainerOpen(window: " ~ std.conv.to!string(this.window) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ")"; 2658 } 2659 2660 } 2661 2662 class ContainerClose : Bedrock201Packet 2663 { 2664 2665 enum uint ID = 47; 2666 2667 enum bool CLIENTBOUND = true; 2668 enum bool SERVERBOUND = true; 2669 2670 enum string[] __fields = ["window"]; 2671 2672 ubyte window; 2673 2674 this() pure nothrow @safe @nogc {} 2675 2676 this(ubyte window) pure nothrow @safe @nogc 2677 { 2678 this.window = window; 2679 } 2680 2681 mixin Make; 2682 2683 public static typeof(this) fromBuffer(ubyte[] buffer) 2684 { 2685 ContainerClose ret = new ContainerClose(); 2686 ret.decode(buffer); 2687 return ret; 2688 } 2689 2690 override string toString() 2691 { 2692 return "ContainerClose(window: " ~ std.conv.to!string(this.window) ~ ")"; 2693 } 2694 2695 } 2696 2697 class PlayerHotbar : Bedrock201Packet 2698 { 2699 2700 enum uint ID = 48; 2701 2702 enum bool CLIENTBOUND = false; 2703 enum bool SERVERBOUND = false; 2704 2705 enum string[] __fields = []; 2706 2707 mixin Make; 2708 2709 public static typeof(this) fromBuffer(ubyte[] buffer) 2710 { 2711 PlayerHotbar ret = new PlayerHotbar(); 2712 ret.decode(buffer); 2713 return ret; 2714 } 2715 2716 override string toString() 2717 { 2718 return "PlayerHotbar()"; 2719 } 2720 2721 } 2722 2723 class InventoryContent : Bedrock201Packet 2724 { 2725 2726 enum uint ID = 49; 2727 2728 enum bool CLIENTBOUND = true; 2729 enum bool SERVERBOUND = false; 2730 2731 enum string[] __fields = ["window", "slots"]; 2732 2733 @Var uint window; 2734 soupply.bedrock201.types.Slot[] slots; 2735 2736 this() pure nothrow @safe @nogc {} 2737 2738 this(uint window, soupply.bedrock201.types.Slot[] slots=(soupply.bedrock201.types.Slot[]).init) pure nothrow @safe @nogc 2739 { 2740 this.window = window; 2741 this.slots = slots; 2742 } 2743 2744 mixin Make; 2745 2746 public static typeof(this) fromBuffer(ubyte[] buffer) 2747 { 2748 InventoryContent ret = new InventoryContent(); 2749 ret.decode(buffer); 2750 return ret; 2751 } 2752 2753 override string toString() 2754 { 2755 return "InventoryContent(window: " ~ std.conv.to!string(this.window) ~ ", slots: " ~ std.conv.to!string(this.slots) ~ ")"; 2756 } 2757 2758 } 2759 2760 class InventorySlot : Bedrock201Packet 2761 { 2762 2763 enum uint ID = 50; 2764 2765 enum bool CLIENTBOUND = true; 2766 enum bool SERVERBOUND = false; 2767 2768 enum string[] __fields = []; 2769 2770 mixin Make; 2771 2772 public static typeof(this) fromBuffer(ubyte[] buffer) 2773 { 2774 InventorySlot ret = new InventorySlot(); 2775 ret.decode(buffer); 2776 return ret; 2777 } 2778 2779 override string toString() 2780 { 2781 return "InventorySlot()"; 2782 } 2783 2784 } 2785 2786 class ContainerSetData : Bedrock201Packet 2787 { 2788 2789 enum uint ID = 51; 2790 2791 enum bool CLIENTBOUND = true; 2792 enum bool SERVERBOUND = false; 2793 2794 enum string[] __fields = ["window", "property", "value"]; 2795 2796 ubyte window; 2797 @Var int property; 2798 @Var int value; 2799 2800 this() pure nothrow @safe @nogc {} 2801 2802 this(ubyte window, int property=int.init, int value=int.init) pure nothrow @safe @nogc 2803 { 2804 this.window = window; 2805 this.property = property; 2806 this.value = value; 2807 } 2808 2809 mixin Make; 2810 2811 public static typeof(this) fromBuffer(ubyte[] buffer) 2812 { 2813 ContainerSetData ret = new ContainerSetData(); 2814 ret.decode(buffer); 2815 return ret; 2816 } 2817 2818 override string toString() 2819 { 2820 return "ContainerSetData(window: " ~ std.conv.to!string(this.window) ~ ", property: " ~ std.conv.to!string(this.property) ~ ", value: " ~ std.conv.to!string(this.value) ~ ")"; 2821 } 2822 2823 } 2824 2825 class CraftingData : Bedrock201Packet 2826 { 2827 2828 enum uint ID = 52; 2829 2830 enum bool CLIENTBOUND = true; 2831 enum bool SERVERBOUND = false; 2832 2833 enum string[] __fields = ["recipes"]; 2834 2835 soupply.bedrock201.types.Recipe[] recipes; 2836 2837 this() pure nothrow @safe @nogc {} 2838 2839 this(soupply.bedrock201.types.Recipe[] recipes) pure nothrow @safe @nogc 2840 { 2841 this.recipes = recipes; 2842 } 2843 2844 mixin Make; 2845 2846 public static typeof(this) fromBuffer(ubyte[] buffer) 2847 { 2848 CraftingData ret = new CraftingData(); 2849 ret.decode(buffer); 2850 return ret; 2851 } 2852 2853 override string toString() 2854 { 2855 return "CraftingData(recipes: " ~ std.conv.to!string(this.recipes) ~ ")"; 2856 } 2857 2858 } 2859 2860 class CraftingEvent : Bedrock201Packet 2861 { 2862 2863 enum uint ID = 53; 2864 2865 enum bool CLIENTBOUND = false; 2866 enum bool SERVERBOUND = true; 2867 2868 enum string[] __fields = ["window", "type", "uuid", "input", "output"]; 2869 2870 ubyte window; 2871 @Var int type; 2872 soupply.bedrock201.types.McpeUuid uuid; 2873 soupply.bedrock201.types.Slot[] input; 2874 soupply.bedrock201.types.Slot[] output; 2875 2876 this() pure nothrow @safe @nogc {} 2877 2878 this(ubyte window, int type=int.init, soupply.bedrock201.types.McpeUuid uuid=soupply.bedrock201.types.McpeUuid.init, soupply.bedrock201.types.Slot[] input=(soupply.bedrock201.types.Slot[]).init, soupply.bedrock201.types.Slot[] output=(soupply.bedrock201.types.Slot[]).init) pure nothrow @safe @nogc 2879 { 2880 this.window = window; 2881 this.type = type; 2882 this.uuid = uuid; 2883 this.input = input; 2884 this.output = output; 2885 } 2886 2887 mixin Make; 2888 2889 public static typeof(this) fromBuffer(ubyte[] buffer) 2890 { 2891 CraftingEvent ret = new CraftingEvent(); 2892 ret.decode(buffer); 2893 return ret; 2894 } 2895 2896 override string toString() 2897 { 2898 return "CraftingEvent(window: " ~ std.conv.to!string(this.window) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", uuid: " ~ std.conv.to!string(this.uuid) ~ ", input: " ~ std.conv.to!string(this.input) ~ ", output: " ~ std.conv.to!string(this.output) ~ ")"; 2899 } 2900 2901 } 2902 2903 class GuiDataPickItem : Bedrock201Packet 2904 { 2905 2906 enum uint ID = 54; 2907 2908 enum bool CLIENTBOUND = false; 2909 enum bool SERVERBOUND = true; 2910 2911 enum string[] __fields = ["slot"]; 2912 2913 @LittleEndian uint slot; 2914 2915 this() pure nothrow @safe @nogc {} 2916 2917 this(uint slot) pure nothrow @safe @nogc 2918 { 2919 this.slot = slot; 2920 } 2921 2922 mixin Make; 2923 2924 public static typeof(this) fromBuffer(ubyte[] buffer) 2925 { 2926 GuiDataPickItem ret = new GuiDataPickItem(); 2927 ret.decode(buffer); 2928 return ret; 2929 } 2930 2931 override string toString() 2932 { 2933 return "GuiDataPickItem(slot: " ~ std.conv.to!string(this.slot) ~ ")"; 2934 } 2935 2936 } 2937 2938 class AdventureSettings : Bedrock201Packet 2939 { 2940 2941 enum uint ID = 55; 2942 2943 enum bool CLIENTBOUND = true; 2944 enum bool SERVERBOUND = true; 2945 2946 // flags 2947 enum uint IMMUTABLE_WORLD = 1; 2948 enum uint PVP_DISABLED = 2; 2949 enum uint PVM_DISABLED = 4; 2950 enum uint MVP_DISBALED = 8; 2951 enum uint EVP_DISABLED = 16; 2952 enum uint AUTO_JUMP = 32; 2953 enum uint ALLOW_FLIGHT = 64; 2954 enum uint NO_CLIP = 128; 2955 enum uint FLYING = 512; 2956 enum uint MUTED = 1024; 2957 2958 // permission level 2959 enum uint LEVEL_USER = 0; 2960 enum uint LEVEL_OPERATOR = 1; 2961 enum uint LEVEL_HOST = 2; 2962 enum uint LEVEL_AUTOMATION = 3; 2963 enum uint LEVEL_ADMIN = 4; 2964 2965 // abilities 2966 enum uint BUILD_AND_MINE = 1; 2967 enum uint DOORS_AND_SWITCHES = 2; 2968 enum uint OPEN_CONTAINERS = 4; 2969 enum uint ATTACK_PLAYERS = 8; 2970 enum uint ATTACK_MOBS = 16; 2971 enum uint OP = 32; 2972 enum uint TELEPORT = 64; 2973 2974 // player rank 2975 enum uint VISITOR = 0; 2976 enum uint MEMBER = 1; 2977 enum uint OPERATOR = 2; 2978 enum uint CUSTOM = 3; 2979 2980 enum string[] __fields = ["flags", "permissionLevel", "abilities", "playerRank", "customPermissions", "entityId"]; 2981 2982 @Var uint flags; 2983 @Var uint permissionLevel; 2984 @Var uint abilities; 2985 @Var uint playerRank; 2986 @Var uint customPermissions; 2987 long entityId; 2988 2989 this() pure nothrow @safe @nogc {} 2990 2991 this(uint flags, uint permissionLevel=uint.init, uint abilities=uint.init, uint playerRank=uint.init, uint customPermissions=uint.init, long entityId=long.init) pure nothrow @safe @nogc 2992 { 2993 this.flags = flags; 2994 this.permissionLevel = permissionLevel; 2995 this.abilities = abilities; 2996 this.playerRank = playerRank; 2997 this.customPermissions = customPermissions; 2998 this.entityId = entityId; 2999 } 3000 3001 mixin Make; 3002 3003 public static typeof(this) fromBuffer(ubyte[] buffer) 3004 { 3005 AdventureSettings ret = new AdventureSettings(); 3006 ret.decode(buffer); 3007 return ret; 3008 } 3009 3010 override string toString() 3011 { 3012 return "AdventureSettings(flags: " ~ std.conv.to!string(this.flags) ~ ", permissionLevel: " ~ std.conv.to!string(this.permissionLevel) ~ ", abilities: " ~ std.conv.to!string(this.abilities) ~ ", playerRank: " ~ std.conv.to!string(this.playerRank) ~ ", customPermissions: " ~ std.conv.to!string(this.customPermissions) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ")"; 3013 } 3014 3015 } 3016 3017 class BlockEntityData : Bedrock201Packet 3018 { 3019 3020 enum uint ID = 56; 3021 3022 enum bool CLIENTBOUND = true; 3023 enum bool SERVERBOUND = true; 3024 3025 enum string[] __fields = ["position", "nbt"]; 3026 3027 soupply.bedrock201.types.BlockPosition position; 3028 @NoLength ubyte[] nbt; 3029 3030 this() pure nothrow @safe @nogc {} 3031 3032 this(soupply.bedrock201.types.BlockPosition position, ubyte[] nbt=(ubyte[]).init) pure nothrow @safe @nogc 3033 { 3034 this.position = position; 3035 this.nbt = nbt; 3036 } 3037 3038 mixin Make; 3039 3040 public static typeof(this) fromBuffer(ubyte[] buffer) 3041 { 3042 BlockEntityData ret = new BlockEntityData(); 3043 ret.decode(buffer); 3044 return ret; 3045 } 3046 3047 override string toString() 3048 { 3049 return "BlockEntityData(position: " ~ std.conv.to!string(this.position) ~ ", nbt: " ~ std.conv.to!string(this.nbt) ~ ")"; 3050 } 3051 3052 } 3053 3054 class PlayerInput : Bedrock201Packet 3055 { 3056 3057 enum uint ID = 57; 3058 3059 enum bool CLIENTBOUND = false; 3060 enum bool SERVERBOUND = true; 3061 3062 enum string[] __fields = ["sideways", "forward", "unknown2", "unknown3"]; 3063 3064 float sideways; 3065 float forward; 3066 bool unknown2; 3067 bool unknown3; 3068 3069 this() pure nothrow @safe @nogc {} 3070 3071 this(float sideways, float forward=float.init, bool unknown2=bool.init, bool unknown3=bool.init) pure nothrow @safe @nogc 3072 { 3073 this.sideways = sideways; 3074 this.forward = forward; 3075 this.unknown2 = unknown2; 3076 this.unknown3 = unknown3; 3077 } 3078 3079 mixin Make; 3080 3081 public static typeof(this) fromBuffer(ubyte[] buffer) 3082 { 3083 PlayerInput ret = new PlayerInput(); 3084 ret.decode(buffer); 3085 return ret; 3086 } 3087 3088 override string toString() 3089 { 3090 return "PlayerInput(sideways: " ~ std.conv.to!string(this.sideways) ~ ", forward: " ~ std.conv.to!string(this.forward) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ", unknown3: " ~ std.conv.to!string(this.unknown3) ~ ")"; 3091 } 3092 3093 } 3094 3095 class FullChunkData : Bedrock201Packet 3096 { 3097 3098 enum uint ID = 58; 3099 3100 enum bool CLIENTBOUND = true; 3101 enum bool SERVERBOUND = false; 3102 3103 enum string[] __fields = ["position", "data"]; 3104 3105 @Var Vector!(int, "xz") position; 3106 soupply.bedrock201.types.ChunkData data; 3107 3108 this() pure nothrow @safe @nogc {} 3109 3110 this(Vector!(int, "xz") position, soupply.bedrock201.types.ChunkData data=soupply.bedrock201.types.ChunkData.init) pure nothrow @safe @nogc 3111 { 3112 this.position = position; 3113 this.data = data; 3114 } 3115 3116 mixin Make; 3117 3118 public static typeof(this) fromBuffer(ubyte[] buffer) 3119 { 3120 FullChunkData ret = new FullChunkData(); 3121 ret.decode(buffer); 3122 return ret; 3123 } 3124 3125 override string toString() 3126 { 3127 return "FullChunkData(position: " ~ std.conv.to!string(this.position) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 3128 } 3129 3130 } 3131 3132 class SetCommandsEnabled : Bedrock201Packet 3133 { 3134 3135 enum uint ID = 59; 3136 3137 enum bool CLIENTBOUND = true; 3138 enum bool SERVERBOUND = false; 3139 3140 enum string[] __fields = ["enabled"]; 3141 3142 bool enabled; 3143 3144 this() pure nothrow @safe @nogc {} 3145 3146 this(bool enabled) pure nothrow @safe @nogc 3147 { 3148 this.enabled = enabled; 3149 } 3150 3151 mixin Make; 3152 3153 public static typeof(this) fromBuffer(ubyte[] buffer) 3154 { 3155 SetCommandsEnabled ret = new SetCommandsEnabled(); 3156 ret.decode(buffer); 3157 return ret; 3158 } 3159 3160 override string toString() 3161 { 3162 return "SetCommandsEnabled(enabled: " ~ std.conv.to!string(this.enabled) ~ ")"; 3163 } 3164 3165 } 3166 3167 class SetDifficulty : Bedrock201Packet 3168 { 3169 3170 enum uint ID = 60; 3171 3172 enum bool CLIENTBOUND = true; 3173 enum bool SERVERBOUND = false; 3174 3175 // difficulty 3176 enum uint PEACEFUL = 0; 3177 enum uint EASY = 1; 3178 enum uint NORMAL = 2; 3179 enum uint HARD = 3; 3180 3181 enum string[] __fields = ["difficulty"]; 3182 3183 @Var uint difficulty; 3184 3185 this() pure nothrow @safe @nogc {} 3186 3187 this(uint difficulty) pure nothrow @safe @nogc 3188 { 3189 this.difficulty = difficulty; 3190 } 3191 3192 mixin Make; 3193 3194 public static typeof(this) fromBuffer(ubyte[] buffer) 3195 { 3196 SetDifficulty ret = new SetDifficulty(); 3197 ret.decode(buffer); 3198 return ret; 3199 } 3200 3201 override string toString() 3202 { 3203 return "SetDifficulty(difficulty: " ~ std.conv.to!string(this.difficulty) ~ ")"; 3204 } 3205 3206 } 3207 3208 class ChangeDimension : Bedrock201Packet 3209 { 3210 3211 enum uint ID = 61; 3212 3213 enum bool CLIENTBOUND = true; 3214 enum bool SERVERBOUND = false; 3215 3216 // dimension 3217 enum int OVERWORLD = 0; 3218 enum int NETHER = 1; 3219 enum int END = 2; 3220 3221 enum string[] __fields = ["dimension", "position", "unknown2"]; 3222 3223 @Var int dimension; 3224 Vector!(float, "xyz") position; 3225 bool unknown2; 3226 3227 this() pure nothrow @safe @nogc {} 3228 3229 this(int dimension, Vector!(float, "xyz") position=Vector!(float, "xyz").init, bool unknown2=bool.init) pure nothrow @safe @nogc 3230 { 3231 this.dimension = dimension; 3232 this.position = position; 3233 this.unknown2 = unknown2; 3234 } 3235 3236 mixin Make; 3237 3238 public static typeof(this) fromBuffer(ubyte[] buffer) 3239 { 3240 ChangeDimension ret = new ChangeDimension(); 3241 ret.decode(buffer); 3242 return ret; 3243 } 3244 3245 override string toString() 3246 { 3247 return "ChangeDimension(dimension: " ~ std.conv.to!string(this.dimension) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 3248 } 3249 3250 } 3251 3252 class SetPlayerGameType : Bedrock201Packet 3253 { 3254 3255 enum uint ID = 62; 3256 3257 enum bool CLIENTBOUND = true; 3258 enum bool SERVERBOUND = true; 3259 3260 // gamemode 3261 enum int SURVIVAL = 0; 3262 enum int CREATIVE = 1; 3263 enum int ADVENTURE = 2; 3264 3265 enum string[] __fields = ["gamemode"]; 3266 3267 @Var int gamemode; 3268 3269 this() pure nothrow @safe @nogc {} 3270 3271 this(int gamemode) pure nothrow @safe @nogc 3272 { 3273 this.gamemode = gamemode; 3274 } 3275 3276 mixin Make; 3277 3278 public static typeof(this) fromBuffer(ubyte[] buffer) 3279 { 3280 SetPlayerGameType ret = new SetPlayerGameType(); 3281 ret.decode(buffer); 3282 return ret; 3283 } 3284 3285 override string toString() 3286 { 3287 return "SetPlayerGameType(gamemode: " ~ std.conv.to!string(this.gamemode) ~ ")"; 3288 } 3289 3290 } 3291 3292 class PlayerList : Bedrock201Packet 3293 { 3294 3295 enum uint ID = 63; 3296 3297 enum bool CLIENTBOUND = true; 3298 enum bool SERVERBOUND = false; 3299 3300 enum string[] __fields = ["action"]; 3301 3302 ubyte action; 3303 3304 this() pure nothrow @safe @nogc {} 3305 3306 this(ubyte action) pure nothrow @safe @nogc 3307 { 3308 this.action = action; 3309 } 3310 3311 mixin Make; 3312 3313 public static typeof(this) fromBuffer(ubyte[] buffer) 3314 { 3315 PlayerList ret = new PlayerList(); 3316 ret.decode(buffer); 3317 return ret; 3318 } 3319 3320 override string toString() 3321 { 3322 return "PlayerList(action: " ~ std.conv.to!string(this.action) ~ ")"; 3323 } 3324 3325 enum string variantField = "action"; 3326 3327 alias Variants = TypeTuple!(Add, Remove); 3328 3329 class Add : Bedrock201Packet 3330 { 3331 3332 enum typeof(action) ACTION = 0; 3333 3334 enum string[] __fields = ["players"]; 3335 3336 soupply.bedrock201.types.PlayerList[] players; 3337 3338 this() pure nothrow @safe @nogc {} 3339 3340 this(soupply.bedrock201.types.PlayerList[] players) pure nothrow @safe @nogc 3341 { 3342 this.players = players; 3343 } 3344 3345 mixin Make; 3346 3347 override string toString() 3348 { 3349 return "PlayerList.Add(players: " ~ std.conv.to!string(this.players) ~ ")"; 3350 } 3351 3352 } 3353 3354 class Remove : Bedrock201Packet 3355 { 3356 3357 enum typeof(action) ACTION = 1; 3358 3359 enum string[] __fields = ["players"]; 3360 3361 soupply.bedrock201.types.McpeUuid[] players; 3362 3363 this() pure nothrow @safe @nogc {} 3364 3365 this(soupply.bedrock201.types.McpeUuid[] players) pure nothrow @safe @nogc 3366 { 3367 this.players = players; 3368 } 3369 3370 mixin Make; 3371 3372 override string toString() 3373 { 3374 return "PlayerList.Remove(players: " ~ std.conv.to!string(this.players) ~ ")"; 3375 } 3376 3377 } 3378 3379 } 3380 3381 class SimpleEvent : Bedrock201Packet 3382 { 3383 3384 enum uint ID = 64; 3385 3386 enum bool CLIENTBOUND = true; 3387 enum bool SERVERBOUND = true; 3388 3389 enum string[] __fields = []; 3390 3391 mixin Make; 3392 3393 public static typeof(this) fromBuffer(ubyte[] buffer) 3394 { 3395 SimpleEvent ret = new SimpleEvent(); 3396 ret.decode(buffer); 3397 return ret; 3398 } 3399 3400 override string toString() 3401 { 3402 return "SimpleEvent()"; 3403 } 3404 3405 } 3406 3407 class TelemetryEvent : Bedrock201Packet 3408 { 3409 3410 enum uint ID = 65; 3411 3412 enum bool CLIENTBOUND = true; 3413 enum bool SERVERBOUND = false; 3414 3415 enum string[] __fields = ["entityId", "eventId"]; 3416 3417 @Var long entityId; 3418 @Var int eventId; 3419 3420 this() pure nothrow @safe @nogc {} 3421 3422 this(long entityId, int eventId=int.init) pure nothrow @safe @nogc 3423 { 3424 this.entityId = entityId; 3425 this.eventId = eventId; 3426 } 3427 3428 mixin Make; 3429 3430 public static typeof(this) fromBuffer(ubyte[] buffer) 3431 { 3432 TelemetryEvent ret = new TelemetryEvent(); 3433 ret.decode(buffer); 3434 return ret; 3435 } 3436 3437 override string toString() 3438 { 3439 return "TelemetryEvent(entityId: " ~ std.conv.to!string(this.entityId) ~ ", eventId: " ~ std.conv.to!string(this.eventId) ~ ")"; 3440 } 3441 3442 } 3443 3444 class SpawnExperienceOrb : Bedrock201Packet 3445 { 3446 3447 enum uint ID = 66; 3448 3449 enum bool CLIENTBOUND = true; 3450 enum bool SERVERBOUND = false; 3451 3452 enum string[] __fields = ["position", "count"]; 3453 3454 Vector!(float, "xyz") position; 3455 @Var int count; 3456 3457 this() pure nothrow @safe @nogc {} 3458 3459 this(Vector!(float, "xyz") position, int count=int.init) pure nothrow @safe @nogc 3460 { 3461 this.position = position; 3462 this.count = count; 3463 } 3464 3465 mixin Make; 3466 3467 public static typeof(this) fromBuffer(ubyte[] buffer) 3468 { 3469 SpawnExperienceOrb ret = new SpawnExperienceOrb(); 3470 ret.decode(buffer); 3471 return ret; 3472 } 3473 3474 override string toString() 3475 { 3476 return "SpawnExperienceOrb(position: " ~ std.conv.to!string(this.position) ~ ", count: " ~ std.conv.to!string(this.count) ~ ")"; 3477 } 3478 3479 } 3480 3481 class ClientboundMapItemData : Bedrock201Packet 3482 { 3483 3484 enum uint ID = 67; 3485 3486 enum bool CLIENTBOUND = true; 3487 enum bool SERVERBOUND = false; 3488 3489 // update 3490 enum uint TEXTURE = 2; 3491 enum uint DECORATIONS = 4; 3492 enum uint ENTITIES = 8; 3493 3494 enum string[] __fields = ["mapId", "update", "scale", "size", "offset", "data", "decorations"]; 3495 3496 @Var long mapId; 3497 @Var uint update; 3498 @Condition("update==2||update==4") ubyte scale; 3499 @Condition("update==2") @Var Vector!(int, "xz") size; 3500 @Condition("update==2") @Var Vector!(int, "xz") offset; 3501 @Condition("update==2") @NoLength ubyte[] data; 3502 @Condition("update==4") soupply.bedrock201.types.Decoration[] decorations; 3503 3504 this() pure nothrow @safe @nogc {} 3505 3506 this(long mapId, uint update=uint.init, ubyte scale=ubyte.init, Vector!(int, "xz") size=Vector!(int, "xz").init, Vector!(int, "xz") offset=Vector!(int, "xz").init, ubyte[] data=(ubyte[]).init, soupply.bedrock201.types.Decoration[] decorations=(soupply.bedrock201.types.Decoration[]).init) pure nothrow @safe @nogc 3507 { 3508 this.mapId = mapId; 3509 this.update = update; 3510 this.scale = scale; 3511 this.size = size; 3512 this.offset = offset; 3513 this.data = data; 3514 this.decorations = decorations; 3515 } 3516 3517 mixin Make; 3518 3519 public static typeof(this) fromBuffer(ubyte[] buffer) 3520 { 3521 ClientboundMapItemData ret = new ClientboundMapItemData(); 3522 ret.decode(buffer); 3523 return ret; 3524 } 3525 3526 override string toString() 3527 { 3528 return "ClientboundMapItemData(mapId: " ~ std.conv.to!string(this.mapId) ~ ", update: " ~ std.conv.to!string(this.update) ~ ", scale: " ~ std.conv.to!string(this.scale) ~ ", size: " ~ std.conv.to!string(this.size) ~ ", offset: " ~ std.conv.to!string(this.offset) ~ ", data: " ~ std.conv.to!string(this.data) ~ ", decorations: " ~ std.conv.to!string(this.decorations) ~ ")"; 3529 } 3530 3531 } 3532 3533 class MapInfoRequest : Bedrock201Packet 3534 { 3535 3536 enum uint ID = 68; 3537 3538 enum bool CLIENTBOUND = false; 3539 enum bool SERVERBOUND = true; 3540 3541 enum string[] __fields = ["mapId"]; 3542 3543 @Var long mapId; 3544 3545 this() pure nothrow @safe @nogc {} 3546 3547 this(long mapId) pure nothrow @safe @nogc 3548 { 3549 this.mapId = mapId; 3550 } 3551 3552 mixin Make; 3553 3554 public static typeof(this) fromBuffer(ubyte[] buffer) 3555 { 3556 MapInfoRequest ret = new MapInfoRequest(); 3557 ret.decode(buffer); 3558 return ret; 3559 } 3560 3561 override string toString() 3562 { 3563 return "MapInfoRequest(mapId: " ~ std.conv.to!string(this.mapId) ~ ")"; 3564 } 3565 3566 } 3567 3568 class RequestChunkRadius : Bedrock201Packet 3569 { 3570 3571 enum uint ID = 69; 3572 3573 enum bool CLIENTBOUND = false; 3574 enum bool SERVERBOUND = true; 3575 3576 enum string[] __fields = ["radius"]; 3577 3578 @Var int radius; 3579 3580 this() pure nothrow @safe @nogc {} 3581 3582 this(int radius) pure nothrow @safe @nogc 3583 { 3584 this.radius = radius; 3585 } 3586 3587 mixin Make; 3588 3589 public static typeof(this) fromBuffer(ubyte[] buffer) 3590 { 3591 RequestChunkRadius ret = new RequestChunkRadius(); 3592 ret.decode(buffer); 3593 return ret; 3594 } 3595 3596 override string toString() 3597 { 3598 return "RequestChunkRadius(radius: " ~ std.conv.to!string(this.radius) ~ ")"; 3599 } 3600 3601 } 3602 3603 class ChunkRadiusUpdated : Bedrock201Packet 3604 { 3605 3606 enum uint ID = 70; 3607 3608 enum bool CLIENTBOUND = true; 3609 enum bool SERVERBOUND = false; 3610 3611 enum string[] __fields = ["radius"]; 3612 3613 @Var int radius; 3614 3615 this() pure nothrow @safe @nogc {} 3616 3617 this(int radius) pure nothrow @safe @nogc 3618 { 3619 this.radius = radius; 3620 } 3621 3622 mixin Make; 3623 3624 public static typeof(this) fromBuffer(ubyte[] buffer) 3625 { 3626 ChunkRadiusUpdated ret = new ChunkRadiusUpdated(); 3627 ret.decode(buffer); 3628 return ret; 3629 } 3630 3631 override string toString() 3632 { 3633 return "ChunkRadiusUpdated(radius: " ~ std.conv.to!string(this.radius) ~ ")"; 3634 } 3635 3636 } 3637 3638 class ItemFrameDropItem : Bedrock201Packet 3639 { 3640 3641 enum uint ID = 71; 3642 3643 enum bool CLIENTBOUND = true; 3644 enum bool SERVERBOUND = false; 3645 3646 enum string[] __fields = ["position", "item"]; 3647 3648 soupply.bedrock201.types.BlockPosition position; 3649 soupply.bedrock201.types.Slot item; 3650 3651 this() pure nothrow @safe @nogc {} 3652 3653 this(soupply.bedrock201.types.BlockPosition position, soupply.bedrock201.types.Slot item=soupply.bedrock201.types.Slot.init) pure nothrow @safe @nogc 3654 { 3655 this.position = position; 3656 this.item = item; 3657 } 3658 3659 mixin Make; 3660 3661 public static typeof(this) fromBuffer(ubyte[] buffer) 3662 { 3663 ItemFrameDropItem ret = new ItemFrameDropItem(); 3664 ret.decode(buffer); 3665 return ret; 3666 } 3667 3668 override string toString() 3669 { 3670 return "ItemFrameDropItem(position: " ~ std.conv.to!string(this.position) ~ ", item: " ~ std.conv.to!string(this.item) ~ ")"; 3671 } 3672 3673 } 3674 3675 class GameRulesChanged : Bedrock201Packet 3676 { 3677 3678 enum uint ID = 72; 3679 3680 enum bool CLIENTBOUND = true; 3681 enum bool SERVERBOUND = false; 3682 3683 enum string[] __fields = ["rules"]; 3684 3685 soupply.bedrock201.types.Rule[] rules; 3686 3687 this() pure nothrow @safe @nogc {} 3688 3689 this(soupply.bedrock201.types.Rule[] rules) pure nothrow @safe @nogc 3690 { 3691 this.rules = rules; 3692 } 3693 3694 mixin Make; 3695 3696 public static typeof(this) fromBuffer(ubyte[] buffer) 3697 { 3698 GameRulesChanged ret = new GameRulesChanged(); 3699 ret.decode(buffer); 3700 return ret; 3701 } 3702 3703 override string toString() 3704 { 3705 return "GameRulesChanged(rules: " ~ std.conv.to!string(this.rules) ~ ")"; 3706 } 3707 3708 } 3709 3710 class Camera : Bedrock201Packet 3711 { 3712 3713 enum uint ID = 73; 3714 3715 enum bool CLIENTBOUND = true; 3716 enum bool SERVERBOUND = false; 3717 3718 enum string[] __fields = ["unknown0", "unknown1"]; 3719 3720 @Var long unknown0; 3721 @Var long unknown1; 3722 3723 this() pure nothrow @safe @nogc {} 3724 3725 this(long unknown0, long unknown1=long.init) pure nothrow @safe @nogc 3726 { 3727 this.unknown0 = unknown0; 3728 this.unknown1 = unknown1; 3729 } 3730 3731 mixin Make; 3732 3733 public static typeof(this) fromBuffer(ubyte[] buffer) 3734 { 3735 Camera ret = new Camera(); 3736 ret.decode(buffer); 3737 return ret; 3738 } 3739 3740 override string toString() 3741 { 3742 return "Camera(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ")"; 3743 } 3744 3745 } 3746 3747 class BossEvent : Bedrock201Packet 3748 { 3749 3750 enum uint ID = 74; 3751 3752 enum bool CLIENTBOUND = true; 3753 enum bool SERVERBOUND = false; 3754 3755 // event id 3756 enum uint ADD = 0; 3757 enum uint UPDATE = 1; 3758 enum uint REMOVE = 2; 3759 3760 enum string[] __fields = ["entityId", "eventId"]; 3761 3762 @Var long entityId; 3763 @Var uint eventId; 3764 3765 this() pure nothrow @safe @nogc {} 3766 3767 this(long entityId, uint eventId=uint.init) pure nothrow @safe @nogc 3768 { 3769 this.entityId = entityId; 3770 this.eventId = eventId; 3771 } 3772 3773 mixin Make; 3774 3775 public static typeof(this) fromBuffer(ubyte[] buffer) 3776 { 3777 BossEvent ret = new BossEvent(); 3778 ret.decode(buffer); 3779 return ret; 3780 } 3781 3782 override string toString() 3783 { 3784 return "BossEvent(entityId: " ~ std.conv.to!string(this.entityId) ~ ", eventId: " ~ std.conv.to!string(this.eventId) ~ ")"; 3785 } 3786 3787 } 3788 3789 class ShowCredits : Bedrock201Packet 3790 { 3791 3792 enum uint ID = 75; 3793 3794 enum bool CLIENTBOUND = true; 3795 enum bool SERVERBOUND = true; 3796 3797 // status 3798 enum int START = 0; 3799 enum int END = 1; 3800 3801 enum string[] __fields = ["entityId", "status"]; 3802 3803 @Var long entityId; 3804 @Var int status; 3805 3806 this() pure nothrow @safe @nogc {} 3807 3808 this(long entityId, int status=int.init) pure nothrow @safe @nogc 3809 { 3810 this.entityId = entityId; 3811 this.status = status; 3812 } 3813 3814 mixin Make; 3815 3816 public static typeof(this) fromBuffer(ubyte[] buffer) 3817 { 3818 ShowCredits ret = new ShowCredits(); 3819 ret.decode(buffer); 3820 return ret; 3821 } 3822 3823 override string toString() 3824 { 3825 return "ShowCredits(entityId: " ~ std.conv.to!string(this.entityId) ~ ", status: " ~ std.conv.to!string(this.status) ~ ")"; 3826 } 3827 3828 } 3829 3830 class AvailableCommands : Bedrock201Packet 3831 { 3832 3833 enum uint ID = 76; 3834 3835 enum bool CLIENTBOUND = true; 3836 enum bool SERVERBOUND = false; 3837 3838 enum string[] __fields = ["enumValues", "unknown1", "enums", "commands"]; 3839 3840 string[] enumValues; 3841 string[] unknown1; 3842 soupply.bedrock201.types.Enum[] enums; 3843 soupply.bedrock201.types.Command[] commands; 3844 3845 this() pure nothrow @safe @nogc {} 3846 3847 this(string[] enumValues, string[] unknown1=(string[]).init, soupply.bedrock201.types.Enum[] enums=(soupply.bedrock201.types.Enum[]).init, soupply.bedrock201.types.Command[] commands=(soupply.bedrock201.types.Command[]).init) pure nothrow @safe @nogc 3848 { 3849 this.enumValues = enumValues; 3850 this.unknown1 = unknown1; 3851 this.enums = enums; 3852 this.commands = commands; 3853 } 3854 3855 mixin Make; 3856 3857 public static typeof(this) fromBuffer(ubyte[] buffer) 3858 { 3859 AvailableCommands ret = new AvailableCommands(); 3860 ret.decode(buffer); 3861 return ret; 3862 } 3863 3864 override string toString() 3865 { 3866 return "AvailableCommands(enumValues: " ~ std.conv.to!string(this.enumValues) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ", enums: " ~ std.conv.to!string(this.enums) ~ ", commands: " ~ std.conv.to!string(this.commands) ~ ")"; 3867 } 3868 3869 } 3870 3871 class CommandRequest : Bedrock201Packet 3872 { 3873 3874 enum uint ID = 77; 3875 3876 enum bool CLIENTBOUND = false; 3877 enum bool SERVERBOUND = true; 3878 3879 // type 3880 enum uint PLAYER = 0; 3881 enum uint COMMAND_BLOCK = 1; 3882 enum uint MINECART_COMMAND_BLOCK = 2; 3883 enum uint DEV_CONSOLE = 3; 3884 3885 enum string[] __fields = ["command", "type", "uuid", "requestId", "playerId", "internal"]; 3886 3887 string command; 3888 @Var uint type; 3889 soupply.bedrock201.types.McpeUuid uuid; 3890 string requestId; 3891 @Condition("type==3") @Var int playerId; 3892 bool internal; 3893 3894 this() pure nothrow @safe @nogc {} 3895 3896 this(string command, uint type=uint.init, soupply.bedrock201.types.McpeUuid uuid=soupply.bedrock201.types.McpeUuid.init, string requestId=string.init, int playerId=int.init, bool internal=bool.init) pure nothrow @safe @nogc 3897 { 3898 this.command = command; 3899 this.type = type; 3900 this.uuid = uuid; 3901 this.requestId = requestId; 3902 this.playerId = playerId; 3903 this.internal = internal; 3904 } 3905 3906 mixin Make; 3907 3908 public static typeof(this) fromBuffer(ubyte[] buffer) 3909 { 3910 CommandRequest ret = new CommandRequest(); 3911 ret.decode(buffer); 3912 return ret; 3913 } 3914 3915 override string toString() 3916 { 3917 return "CommandRequest(command: " ~ std.conv.to!string(this.command) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", uuid: " ~ std.conv.to!string(this.uuid) ~ ", requestId: " ~ std.conv.to!string(this.requestId) ~ ", playerId: " ~ std.conv.to!string(this.playerId) ~ ", internal: " ~ std.conv.to!string(this.internal) ~ ")"; 3918 } 3919 3920 } 3921 3922 class CommandBlockUpdate : Bedrock201Packet 3923 { 3924 3925 enum uint ID = 78; 3926 3927 enum bool CLIENTBOUND = true; 3928 enum bool SERVERBOUND = true; 3929 3930 enum string[] __fields = ["updateBlock", "position", "mode", "redstoneMode", "conditional", "minecart", "command", "lastOutput", "hover", "trackOutput"]; 3931 3932 bool updateBlock; 3933 @Condition("updateBlock==true") soupply.bedrock201.types.BlockPosition position; 3934 @Condition("updateBlock==true") @Var uint mode; 3935 @Condition("updateBlock==true") bool redstoneMode; 3936 @Condition("updateBlock==true") bool conditional; 3937 @Condition("updateBlock==false") @Var long minecart; 3938 string command; 3939 string lastOutput; 3940 string hover; 3941 bool trackOutput; 3942 3943 this() pure nothrow @safe @nogc {} 3944 3945 this(bool updateBlock, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, uint mode=uint.init, bool redstoneMode=bool.init, bool conditional=bool.init, long minecart=long.init, string command=string.init, string lastOutput=string.init, string hover=string.init, bool trackOutput=bool.init) pure nothrow @safe @nogc 3946 { 3947 this.updateBlock = updateBlock; 3948 this.position = position; 3949 this.mode = mode; 3950 this.redstoneMode = redstoneMode; 3951 this.conditional = conditional; 3952 this.minecart = minecart; 3953 this.command = command; 3954 this.lastOutput = lastOutput; 3955 this.hover = hover; 3956 this.trackOutput = trackOutput; 3957 } 3958 3959 mixin Make; 3960 3961 public static typeof(this) fromBuffer(ubyte[] buffer) 3962 { 3963 CommandBlockUpdate ret = new CommandBlockUpdate(); 3964 ret.decode(buffer); 3965 return ret; 3966 } 3967 3968 override string toString() 3969 { 3970 return "CommandBlockUpdate(updateBlock: " ~ std.conv.to!string(this.updateBlock) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ", redstoneMode: " ~ std.conv.to!string(this.redstoneMode) ~ ", conditional: " ~ std.conv.to!string(this.conditional) ~ ", minecart: " ~ std.conv.to!string(this.minecart) ~ ", command: " ~ std.conv.to!string(this.command) ~ ", lastOutput: " ~ std.conv.to!string(this.lastOutput) ~ ", hover: " ~ std.conv.to!string(this.hover) ~ ", trackOutput: " ~ std.conv.to!string(this.trackOutput) ~ ")"; 3971 } 3972 3973 } 3974 3975 class UpdateTrade : Bedrock201Packet 3976 { 3977 3978 enum uint ID = 80; 3979 3980 enum bool CLIENTBOUND = true; 3981 enum bool SERVERBOUND = false; 3982 3983 enum string[] __fields = ["window", "windowType", "unknown2", "unknown3", "willing", "trader", "player", "displayName", "offers"]; 3984 3985 ubyte window; 3986 ubyte windowType = 15; 3987 @Var int unknown2; 3988 @Var int unknown3; 3989 bool willing; 3990 @Var long trader; 3991 @Var long player; 3992 string displayName; 3993 @NoLength ubyte[] offers; 3994 3995 this() pure nothrow @safe @nogc {} 3996 3997 this(ubyte window, ubyte windowType=15, int unknown2=int.init, int unknown3=int.init, bool willing=bool.init, long trader=long.init, long player=long.init, string displayName=string.init, ubyte[] offers=(ubyte[]).init) pure nothrow @safe @nogc 3998 { 3999 this.window = window; 4000 this.windowType = windowType; 4001 this.unknown2 = unknown2; 4002 this.unknown3 = unknown3; 4003 this.willing = willing; 4004 this.trader = trader; 4005 this.player = player; 4006 this.displayName = displayName; 4007 this.offers = offers; 4008 } 4009 4010 mixin Make; 4011 4012 public static typeof(this) fromBuffer(ubyte[] buffer) 4013 { 4014 UpdateTrade ret = new UpdateTrade(); 4015 ret.decode(buffer); 4016 return ret; 4017 } 4018 4019 override string toString() 4020 { 4021 return "UpdateTrade(window: " ~ std.conv.to!string(this.window) ~ ", windowType: " ~ std.conv.to!string(this.windowType) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ", unknown3: " ~ std.conv.to!string(this.unknown3) ~ ", willing: " ~ std.conv.to!string(this.willing) ~ ", trader: " ~ std.conv.to!string(this.trader) ~ ", player: " ~ std.conv.to!string(this.player) ~ ", displayName: " ~ std.conv.to!string(this.displayName) ~ ", offers: " ~ std.conv.to!string(this.offers) ~ ")"; 4022 } 4023 4024 } 4025 4026 class UpdateEquip : Bedrock201Packet 4027 { 4028 4029 enum uint ID = 81; 4030 4031 enum bool CLIENTBOUND = true; 4032 enum bool SERVERBOUND = false; 4033 4034 enum string[] __fields = []; 4035 4036 mixin Make; 4037 4038 public static typeof(this) fromBuffer(ubyte[] buffer) 4039 { 4040 UpdateEquip ret = new UpdateEquip(); 4041 ret.decode(buffer); 4042 return ret; 4043 } 4044 4045 override string toString() 4046 { 4047 return "UpdateEquip()"; 4048 } 4049 4050 } 4051 4052 class ResourcePackDataInfo : Bedrock201Packet 4053 { 4054 4055 enum uint ID = 82; 4056 4057 enum bool CLIENTBOUND = true; 4058 enum bool SERVERBOUND = false; 4059 4060 enum string[] __fields = ["id", "maxChunkSize", "chunkCount", "compressedPackSize", "sha256"]; 4061 4062 string id; 4063 uint maxChunkSize; 4064 uint chunkCount; 4065 ulong compressedPackSize; 4066 string sha256; 4067 4068 this() pure nothrow @safe @nogc {} 4069 4070 this(string id, uint maxChunkSize=uint.init, uint chunkCount=uint.init, ulong compressedPackSize=ulong.init, string sha256=string.init) pure nothrow @safe @nogc 4071 { 4072 this.id = id; 4073 this.maxChunkSize = maxChunkSize; 4074 this.chunkCount = chunkCount; 4075 this.compressedPackSize = compressedPackSize; 4076 this.sha256 = sha256; 4077 } 4078 4079 mixin Make; 4080 4081 public static typeof(this) fromBuffer(ubyte[] buffer) 4082 { 4083 ResourcePackDataInfo ret = new ResourcePackDataInfo(); 4084 ret.decode(buffer); 4085 return ret; 4086 } 4087 4088 override string toString() 4089 { 4090 return "ResourcePackDataInfo(id: " ~ std.conv.to!string(this.id) ~ ", maxChunkSize: " ~ std.conv.to!string(this.maxChunkSize) ~ ", chunkCount: " ~ std.conv.to!string(this.chunkCount) ~ ", compressedPackSize: " ~ std.conv.to!string(this.compressedPackSize) ~ ", sha256: " ~ std.conv.to!string(this.sha256) ~ ")"; 4091 } 4092 4093 } 4094 4095 class ResourcePackChunkData : Bedrock201Packet 4096 { 4097 4098 enum uint ID = 83; 4099 4100 enum bool CLIENTBOUND = true; 4101 enum bool SERVERBOUND = false; 4102 4103 enum string[] __fields = ["id", "chunkIndex", "progress", "data"]; 4104 4105 string id; 4106 uint chunkIndex; 4107 ulong progress; 4108 @Length!uint ubyte[] data; 4109 4110 this() pure nothrow @safe @nogc {} 4111 4112 this(string id, uint chunkIndex=uint.init, ulong progress=ulong.init, ubyte[] data=(ubyte[]).init) pure nothrow @safe @nogc 4113 { 4114 this.id = id; 4115 this.chunkIndex = chunkIndex; 4116 this.progress = progress; 4117 this.data = data; 4118 } 4119 4120 mixin Make; 4121 4122 public static typeof(this) fromBuffer(ubyte[] buffer) 4123 { 4124 ResourcePackChunkData ret = new ResourcePackChunkData(); 4125 ret.decode(buffer); 4126 return ret; 4127 } 4128 4129 override string toString() 4130 { 4131 return "ResourcePackChunkData(id: " ~ std.conv.to!string(this.id) ~ ", chunkIndex: " ~ std.conv.to!string(this.chunkIndex) ~ ", progress: " ~ std.conv.to!string(this.progress) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 4132 } 4133 4134 } 4135 4136 class ResourcePackChunkRequest : Bedrock201Packet 4137 { 4138 4139 enum uint ID = 84; 4140 4141 enum bool CLIENTBOUND = false; 4142 enum bool SERVERBOUND = true; 4143 4144 enum string[] __fields = ["id", "chunkIndex"]; 4145 4146 string id; 4147 uint chunkIndex; 4148 4149 this() pure nothrow @safe @nogc {} 4150 4151 this(string id, uint chunkIndex=uint.init) pure nothrow @safe @nogc 4152 { 4153 this.id = id; 4154 this.chunkIndex = chunkIndex; 4155 } 4156 4157 mixin Make; 4158 4159 public static typeof(this) fromBuffer(ubyte[] buffer) 4160 { 4161 ResourcePackChunkRequest ret = new ResourcePackChunkRequest(); 4162 ret.decode(buffer); 4163 return ret; 4164 } 4165 4166 override string toString() 4167 { 4168 return "ResourcePackChunkRequest(id: " ~ std.conv.to!string(this.id) ~ ", chunkIndex: " ~ std.conv.to!string(this.chunkIndex) ~ ")"; 4169 } 4170 4171 } 4172 4173 class Transfer : Bedrock201Packet 4174 { 4175 4176 enum uint ID = 85; 4177 4178 enum bool CLIENTBOUND = true; 4179 enum bool SERVERBOUND = false; 4180 4181 enum string[] __fields = ["ip", "port"]; 4182 4183 string ip; 4184 ushort port = 19132; 4185 4186 this() pure nothrow @safe @nogc {} 4187 4188 this(string ip, ushort port=19132) pure nothrow @safe @nogc 4189 { 4190 this.ip = ip; 4191 this.port = port; 4192 } 4193 4194 mixin Make; 4195 4196 public static typeof(this) fromBuffer(ubyte[] buffer) 4197 { 4198 Transfer ret = new Transfer(); 4199 ret.decode(buffer); 4200 return ret; 4201 } 4202 4203 override string toString() 4204 { 4205 return "Transfer(ip: " ~ std.conv.to!string(this.ip) ~ ", port: " ~ std.conv.to!string(this.port) ~ ")"; 4206 } 4207 4208 } 4209 4210 class PlaySound : Bedrock201Packet 4211 { 4212 4213 enum uint ID = 86; 4214 4215 enum bool CLIENTBOUND = true; 4216 enum bool SERVERBOUND = false; 4217 4218 enum string[] __fields = ["name", "position", "volume", "pitch"]; 4219 4220 string name; 4221 soupply.bedrock201.types.BlockPosition position; 4222 float volume; 4223 float pitch; 4224 4225 this() pure nothrow @safe @nogc {} 4226 4227 this(string name, soupply.bedrock201.types.BlockPosition position=soupply.bedrock201.types.BlockPosition.init, float volume=float.init, float pitch=float.init) pure nothrow @safe @nogc 4228 { 4229 this.name = name; 4230 this.position = position; 4231 this.volume = volume; 4232 this.pitch = pitch; 4233 } 4234 4235 mixin Make; 4236 4237 public static typeof(this) fromBuffer(ubyte[] buffer) 4238 { 4239 PlaySound ret = new PlaySound(); 4240 ret.decode(buffer); 4241 return ret; 4242 } 4243 4244 override string toString() 4245 { 4246 return "PlaySound(name: " ~ std.conv.to!string(this.name) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", volume: " ~ std.conv.to!string(this.volume) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ")"; 4247 } 4248 4249 } 4250 4251 class StopSound : Bedrock201Packet 4252 { 4253 4254 enum uint ID = 87; 4255 4256 enum bool CLIENTBOUND = true; 4257 enum bool SERVERBOUND = false; 4258 4259 enum string[] __fields = ["name", "stopAll"]; 4260 4261 string name; 4262 bool stopAll; 4263 4264 this() pure nothrow @safe @nogc {} 4265 4266 this(string name, bool stopAll=bool.init) pure nothrow @safe @nogc 4267 { 4268 this.name = name; 4269 this.stopAll = stopAll; 4270 } 4271 4272 mixin Make; 4273 4274 public static typeof(this) fromBuffer(ubyte[] buffer) 4275 { 4276 StopSound ret = new StopSound(); 4277 ret.decode(buffer); 4278 return ret; 4279 } 4280 4281 override string toString() 4282 { 4283 return "StopSound(name: " ~ std.conv.to!string(this.name) ~ ", stopAll: " ~ std.conv.to!string(this.stopAll) ~ ")"; 4284 } 4285 4286 } 4287 4288 class SetTitle : Bedrock201Packet 4289 { 4290 4291 enum uint ID = 88; 4292 4293 enum bool CLIENTBOUND = true; 4294 enum bool SERVERBOUND = false; 4295 4296 // action 4297 enum int HIDE = 0; 4298 enum int RESET = 1; 4299 enum int SET_TITLE = 2; 4300 enum int SET_SUBTITLE = 3; 4301 enum int SET_ACTION_BAR = 4; 4302 enum int SET_TIMINGS = 5; 4303 4304 enum string[] __fields = ["action", "text", "fadeIn", "stay", "fadeOut"]; 4305 4306 @Var int action; 4307 string text; 4308 @Var int fadeIn; 4309 @Var int stay; 4310 @Var int fadeOut; 4311 4312 this() pure nothrow @safe @nogc {} 4313 4314 this(int action, string text=string.init, int fadeIn=int.init, int stay=int.init, int fadeOut=int.init) pure nothrow @safe @nogc 4315 { 4316 this.action = action; 4317 this.text = text; 4318 this.fadeIn = fadeIn; 4319 this.stay = stay; 4320 this.fadeOut = fadeOut; 4321 } 4322 4323 mixin Make; 4324 4325 public static typeof(this) fromBuffer(ubyte[] buffer) 4326 { 4327 SetTitle ret = new SetTitle(); 4328 ret.decode(buffer); 4329 return ret; 4330 } 4331 4332 override string toString() 4333 { 4334 return "SetTitle(action: " ~ std.conv.to!string(this.action) ~ ", text: " ~ std.conv.to!string(this.text) ~ ", fadeIn: " ~ std.conv.to!string(this.fadeIn) ~ ", stay: " ~ std.conv.to!string(this.stay) ~ ", fadeOut: " ~ std.conv.to!string(this.fadeOut) ~ ")"; 4335 } 4336 4337 } 4338 4339 class AddBehaviorTree : Bedrock201Packet 4340 { 4341 4342 enum uint ID = 89; 4343 4344 enum bool CLIENTBOUND = true; 4345 enum bool SERVERBOUND = false; 4346 4347 enum string[] __fields = ["unknown0"]; 4348 4349 string unknown0; 4350 4351 this() pure nothrow @safe @nogc {} 4352 4353 this(string unknown0) pure nothrow @safe @nogc 4354 { 4355 this.unknown0 = unknown0; 4356 } 4357 4358 mixin Make; 4359 4360 public static typeof(this) fromBuffer(ubyte[] buffer) 4361 { 4362 AddBehaviorTree ret = new AddBehaviorTree(); 4363 ret.decode(buffer); 4364 return ret; 4365 } 4366 4367 override string toString() 4368 { 4369 return "AddBehaviorTree(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ")"; 4370 } 4371 4372 } 4373 4374 class StructureBlockUpdate : Bedrock201Packet 4375 { 4376 4377 enum uint ID = 90; 4378 4379 enum bool CLIENTBOUND = true; 4380 enum bool SERVERBOUND = false; 4381 4382 enum string[] __fields = []; 4383 4384 mixin Make; 4385 4386 public static typeof(this) fromBuffer(ubyte[] buffer) 4387 { 4388 StructureBlockUpdate ret = new StructureBlockUpdate(); 4389 ret.decode(buffer); 4390 return ret; 4391 } 4392 4393 override string toString() 4394 { 4395 return "StructureBlockUpdate()"; 4396 } 4397 4398 } 4399 4400 class ShowStoreOffer : Bedrock201Packet 4401 { 4402 4403 enum uint ID = 91; 4404 4405 enum bool CLIENTBOUND = true; 4406 enum bool SERVERBOUND = false; 4407 4408 enum string[] __fields = ["unknown0", "unknown1", "unknown2"]; 4409 4410 string unknown0; 4411 bool unknown1; 4412 string unknown2; 4413 4414 this() pure nothrow @safe @nogc {} 4415 4416 this(string unknown0, bool unknown1=bool.init, string unknown2=string.init) pure nothrow @safe @nogc 4417 { 4418 this.unknown0 = unknown0; 4419 this.unknown1 = unknown1; 4420 this.unknown2 = unknown2; 4421 } 4422 4423 mixin Make; 4424 4425 public static typeof(this) fromBuffer(ubyte[] buffer) 4426 { 4427 ShowStoreOffer ret = new ShowStoreOffer(); 4428 ret.decode(buffer); 4429 return ret; 4430 } 4431 4432 override string toString() 4433 { 4434 return "ShowStoreOffer(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 4435 } 4436 4437 } 4438 4439 class PurchaseReceipt : Bedrock201Packet 4440 { 4441 4442 enum uint ID = 92; 4443 4444 enum bool CLIENTBOUND = false; 4445 enum bool SERVERBOUND = true; 4446 4447 enum string[] __fields = ["unknown0"]; 4448 4449 string[] unknown0; 4450 4451 this() pure nothrow @safe @nogc {} 4452 4453 this(string[] unknown0) pure nothrow @safe @nogc 4454 { 4455 this.unknown0 = unknown0; 4456 } 4457 4458 mixin Make; 4459 4460 public static typeof(this) fromBuffer(ubyte[] buffer) 4461 { 4462 PurchaseReceipt ret = new PurchaseReceipt(); 4463 ret.decode(buffer); 4464 return ret; 4465 } 4466 4467 override string toString() 4468 { 4469 return "PurchaseReceipt(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ")"; 4470 } 4471 4472 } 4473 4474 class PlayerSkin : Bedrock201Packet 4475 { 4476 4477 enum uint ID = 93; 4478 4479 enum bool CLIENTBOUND = true; 4480 enum bool SERVERBOUND = false; 4481 4482 enum string[] __fields = ["uuid", "skinId", "skinName", "unknown3", "skinData", "capeData", "geometryModel", "geometryData"]; 4483 4484 soupply.bedrock201.types.McpeUuid uuid; 4485 string skinId; 4486 string skinName; 4487 string unknown3; 4488 ubyte[] skinData; 4489 ubyte[] capeData; 4490 string geometryModel; 4491 ubyte[] geometryData; 4492 4493 this() pure nothrow @safe @nogc {} 4494 4495 this(soupply.bedrock201.types.McpeUuid uuid, string skinId=string.init, string skinName=string.init, string unknown3=string.init, ubyte[] skinData=(ubyte[]).init, ubyte[] capeData=(ubyte[]).init, string geometryModel=string.init, ubyte[] geometryData=(ubyte[]).init) pure nothrow @safe @nogc 4496 { 4497 this.uuid = uuid; 4498 this.skinId = skinId; 4499 this.skinName = skinName; 4500 this.unknown3 = unknown3; 4501 this.skinData = skinData; 4502 this.capeData = capeData; 4503 this.geometryModel = geometryModel; 4504 this.geometryData = geometryData; 4505 } 4506 4507 mixin Make; 4508 4509 public static typeof(this) fromBuffer(ubyte[] buffer) 4510 { 4511 PlayerSkin ret = new PlayerSkin(); 4512 ret.decode(buffer); 4513 return ret; 4514 } 4515 4516 override string toString() 4517 { 4518 return "PlayerSkin(uuid: " ~ std.conv.to!string(this.uuid) ~ ", skinId: " ~ std.conv.to!string(this.skinId) ~ ", skinName: " ~ std.conv.to!string(this.skinName) ~ ", unknown3: " ~ std.conv.to!string(this.unknown3) ~ ", skinData: " ~ std.conv.to!string(this.skinData) ~ ", capeData: " ~ std.conv.to!string(this.capeData) ~ ", geometryModel: " ~ std.conv.to!string(this.geometryModel) ~ ", geometryData: " ~ std.conv.to!string(this.geometryData) ~ ")"; 4519 } 4520 4521 } 4522 4523 class SubClientLogin : Bedrock201Packet 4524 { 4525 4526 enum uint ID = 94; 4527 4528 enum bool CLIENTBOUND = true; 4529 enum bool SERVERBOUND = false; 4530 4531 enum string[] __fields = []; 4532 4533 mixin Make; 4534 4535 public static typeof(this) fromBuffer(ubyte[] buffer) 4536 { 4537 SubClientLogin ret = new SubClientLogin(); 4538 ret.decode(buffer); 4539 return ret; 4540 } 4541 4542 override string toString() 4543 { 4544 return "SubClientLogin()"; 4545 } 4546 4547 } 4548 4549 class InitiateWebSocketConnection : Bedrock201Packet 4550 { 4551 4552 enum uint ID = 95; 4553 4554 enum bool CLIENTBOUND = false; 4555 enum bool SERVERBOUND = false; 4556 4557 enum string[] __fields = ["unknown0"]; 4558 4559 string unknown0; 4560 4561 this() pure nothrow @safe @nogc {} 4562 4563 this(string unknown0) pure nothrow @safe @nogc 4564 { 4565 this.unknown0 = unknown0; 4566 } 4567 4568 mixin Make; 4569 4570 public static typeof(this) fromBuffer(ubyte[] buffer) 4571 { 4572 InitiateWebSocketConnection ret = new InitiateWebSocketConnection(); 4573 ret.decode(buffer); 4574 return ret; 4575 } 4576 4577 override string toString() 4578 { 4579 return "InitiateWebSocketConnection(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ")"; 4580 } 4581 4582 } 4583 4584 class SetLastHurtBy : Bedrock201Packet 4585 { 4586 4587 enum uint ID = 96; 4588 4589 enum bool CLIENTBOUND = true; 4590 enum bool SERVERBOUND = false; 4591 4592 enum string[] __fields = ["unknown0"]; 4593 4594 @Var int unknown0; 4595 4596 this() pure nothrow @safe @nogc {} 4597 4598 this(int unknown0) pure nothrow @safe @nogc 4599 { 4600 this.unknown0 = unknown0; 4601 } 4602 4603 mixin Make; 4604 4605 public static typeof(this) fromBuffer(ubyte[] buffer) 4606 { 4607 SetLastHurtBy ret = new SetLastHurtBy(); 4608 ret.decode(buffer); 4609 return ret; 4610 } 4611 4612 override string toString() 4613 { 4614 return "SetLastHurtBy(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ")"; 4615 } 4616 4617 } 4618 4619 class BookEdit : Bedrock201Packet 4620 { 4621 4622 enum uint ID = 97; 4623 4624 enum bool CLIENTBOUND = true; 4625 enum bool SERVERBOUND = true; 4626 4627 enum string[] __fields = ["type", "slot"]; 4628 4629 ubyte type; 4630 ubyte slot; 4631 4632 this() pure nothrow @safe @nogc {} 4633 4634 this(ubyte type, ubyte slot=ubyte.init) pure nothrow @safe @nogc 4635 { 4636 this.type = type; 4637 this.slot = slot; 4638 } 4639 4640 mixin Make; 4641 4642 public static typeof(this) fromBuffer(ubyte[] buffer) 4643 { 4644 BookEdit ret = new BookEdit(); 4645 ret.decode(buffer); 4646 return ret; 4647 } 4648 4649 override string toString() 4650 { 4651 return "BookEdit(type: " ~ std.conv.to!string(this.type) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ")"; 4652 } 4653 4654 enum string variantField = "type"; 4655 4656 alias Variants = TypeTuple!(ReplacePage, AddPage, DeletePage, SwapPages, Sign); 4657 4658 class ReplacePage : Bedrock201Packet 4659 { 4660 4661 enum typeof(type) TYPE = 0; 4662 4663 enum string[] __fields = ["pageNumber", "unknown1", "unknown2"]; 4664 4665 ubyte pageNumber; 4666 string unknown1; 4667 string unknown2; 4668 4669 this() pure nothrow @safe @nogc {} 4670 4671 this(ubyte pageNumber, string unknown1=string.init, string unknown2=string.init) pure nothrow @safe @nogc 4672 { 4673 this.pageNumber = pageNumber; 4674 this.unknown1 = unknown1; 4675 this.unknown2 = unknown2; 4676 } 4677 4678 mixin Make; 4679 4680 override string toString() 4681 { 4682 return "BookEdit.ReplacePage(pageNumber: " ~ std.conv.to!string(this.pageNumber) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 4683 } 4684 4685 } 4686 4687 class AddPage : Bedrock201Packet 4688 { 4689 4690 enum typeof(type) TYPE = 1; 4691 4692 enum string[] __fields = ["pageNumber", "unknown1", "unknown2"]; 4693 4694 ubyte pageNumber; 4695 string unknown1; 4696 string unknown2; 4697 4698 this() pure nothrow @safe @nogc {} 4699 4700 this(ubyte pageNumber, string unknown1=string.init, string unknown2=string.init) pure nothrow @safe @nogc 4701 { 4702 this.pageNumber = pageNumber; 4703 this.unknown1 = unknown1; 4704 this.unknown2 = unknown2; 4705 } 4706 4707 mixin Make; 4708 4709 override string toString() 4710 { 4711 return "BookEdit.AddPage(pageNumber: " ~ std.conv.to!string(this.pageNumber) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 4712 } 4713 4714 } 4715 4716 class DeletePage : Bedrock201Packet 4717 { 4718 4719 enum typeof(type) TYPE = 2; 4720 4721 enum string[] __fields = ["pageNumber"]; 4722 4723 ubyte pageNumber; 4724 4725 this() pure nothrow @safe @nogc {} 4726 4727 this(ubyte pageNumber) pure nothrow @safe @nogc 4728 { 4729 this.pageNumber = pageNumber; 4730 } 4731 4732 mixin Make; 4733 4734 override string toString() 4735 { 4736 return "BookEdit.DeletePage(pageNumber: " ~ std.conv.to!string(this.pageNumber) ~ ")"; 4737 } 4738 4739 } 4740 4741 class SwapPages : Bedrock201Packet 4742 { 4743 4744 enum typeof(type) TYPE = 3; 4745 4746 enum string[] __fields = ["page1", "page2"]; 4747 4748 ubyte page1; 4749 ubyte page2; 4750 4751 this() pure nothrow @safe @nogc {} 4752 4753 this(ubyte page1, ubyte page2=ubyte.init) pure nothrow @safe @nogc 4754 { 4755 this.page1 = page1; 4756 this.page2 = page2; 4757 } 4758 4759 mixin Make; 4760 4761 override string toString() 4762 { 4763 return "BookEdit.SwapPages(page1: " ~ std.conv.to!string(this.page1) ~ ", page2: " ~ std.conv.to!string(this.page2) ~ ")"; 4764 } 4765 4766 } 4767 4768 class Sign : Bedrock201Packet 4769 { 4770 4771 enum typeof(type) TYPE = 4; 4772 4773 enum string[] __fields = ["title", "author"]; 4774 4775 string title; 4776 string author; 4777 4778 this() pure nothrow @safe @nogc {} 4779 4780 this(string title, string author=string.init) pure nothrow @safe @nogc 4781 { 4782 this.title = title; 4783 this.author = author; 4784 } 4785 4786 mixin Make; 4787 4788 override string toString() 4789 { 4790 return "BookEdit.Sign(title: " ~ std.conv.to!string(this.title) ~ ", author: " ~ std.conv.to!string(this.author) ~ ")"; 4791 } 4792 4793 } 4794 4795 } 4796 4797 class NpcRequest : Bedrock201Packet 4798 { 4799 4800 enum uint ID = 98; 4801 4802 enum bool CLIENTBOUND = false; 4803 enum bool SERVERBOUND = true; 4804 4805 enum string[] __fields = ["entityId", "requestType", "command", "actionType"]; 4806 4807 @Var long entityId; 4808 ubyte requestType; 4809 string command; 4810 ubyte actionType; 4811 4812 this() pure nothrow @safe @nogc {} 4813 4814 this(long entityId, ubyte requestType=ubyte.init, string command=string.init, ubyte actionType=ubyte.init) pure nothrow @safe @nogc 4815 { 4816 this.entityId = entityId; 4817 this.requestType = requestType; 4818 this.command = command; 4819 this.actionType = actionType; 4820 } 4821 4822 mixin Make; 4823 4824 public static typeof(this) fromBuffer(ubyte[] buffer) 4825 { 4826 NpcRequest ret = new NpcRequest(); 4827 ret.decode(buffer); 4828 return ret; 4829 } 4830 4831 override string toString() 4832 { 4833 return "NpcRequest(entityId: " ~ std.conv.to!string(this.entityId) ~ ", requestType: " ~ std.conv.to!string(this.requestType) ~ ", command: " ~ std.conv.to!string(this.command) ~ ", actionType: " ~ std.conv.to!string(this.actionType) ~ ")"; 4834 } 4835 4836 } 4837 4838 class PhotoTransfer : Bedrock201Packet 4839 { 4840 4841 enum uint ID = 99; 4842 4843 enum bool CLIENTBOUND = false; 4844 enum bool SERVERBOUND = true; 4845 4846 enum string[] __fields = ["unknown0", "unknown1", "unknown2"]; 4847 4848 string unknown0; 4849 string unknown1; 4850 string unknown2; 4851 4852 this() pure nothrow @safe @nogc {} 4853 4854 this(string unknown0, string unknown1=string.init, string unknown2=string.init) pure nothrow @safe @nogc 4855 { 4856 this.unknown0 = unknown0; 4857 this.unknown1 = unknown1; 4858 this.unknown2 = unknown2; 4859 } 4860 4861 mixin Make; 4862 4863 public static typeof(this) fromBuffer(ubyte[] buffer) 4864 { 4865 PhotoTransfer ret = new PhotoTransfer(); 4866 ret.decode(buffer); 4867 return ret; 4868 } 4869 4870 override string toString() 4871 { 4872 return "PhotoTransfer(unknown0: " ~ std.conv.to!string(this.unknown0) ~ ", unknown1: " ~ std.conv.to!string(this.unknown1) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")"; 4873 } 4874 4875 } 4876 4877 class ModalFormRequest : Bedrock201Packet 4878 { 4879 4880 enum uint ID = 100; 4881 4882 enum bool CLIENTBOUND = true; 4883 enum bool SERVERBOUND = false; 4884 4885 enum string[] __fields = ["formId", "data"]; 4886 4887 @Var uint formId; 4888 string data; 4889 4890 this() pure nothrow @safe @nogc {} 4891 4892 this(uint formId, string data=string.init) pure nothrow @safe @nogc 4893 { 4894 this.formId = formId; 4895 this.data = data; 4896 } 4897 4898 mixin Make; 4899 4900 public static typeof(this) fromBuffer(ubyte[] buffer) 4901 { 4902 ModalFormRequest ret = new ModalFormRequest(); 4903 ret.decode(buffer); 4904 return ret; 4905 } 4906 4907 override string toString() 4908 { 4909 return "ModalFormRequest(formId: " ~ std.conv.to!string(this.formId) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 4910 } 4911 4912 } 4913 4914 class ModalFormResponse : Bedrock201Packet 4915 { 4916 4917 enum uint ID = 101; 4918 4919 enum bool CLIENTBOUND = true; 4920 enum bool SERVERBOUND = false; 4921 4922 enum string[] __fields = ["formId", "data"]; 4923 4924 @Var uint formId; 4925 string data; 4926 4927 this() pure nothrow @safe @nogc {} 4928 4929 this(uint formId, string data=string.init) pure nothrow @safe @nogc 4930 { 4931 this.formId = formId; 4932 this.data = data; 4933 } 4934 4935 mixin Make; 4936 4937 public static typeof(this) fromBuffer(ubyte[] buffer) 4938 { 4939 ModalFormResponse ret = new ModalFormResponse(); 4940 ret.decode(buffer); 4941 return ret; 4942 } 4943 4944 override string toString() 4945 { 4946 return "ModalFormResponse(formId: " ~ std.conv.to!string(this.formId) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 4947 } 4948 4949 } 4950 4951 class ServerSettingsRequest : Bedrock201Packet 4952 { 4953 4954 enum uint ID = 102; 4955 4956 enum bool CLIENTBOUND = false; 4957 enum bool SERVERBOUND = true; 4958 4959 enum string[] __fields = []; 4960 4961 mixin Make; 4962 4963 public static typeof(this) fromBuffer(ubyte[] buffer) 4964 { 4965 ServerSettingsRequest ret = new ServerSettingsRequest(); 4966 ret.decode(buffer); 4967 return ret; 4968 } 4969 4970 override string toString() 4971 { 4972 return "ServerSettingsRequest()"; 4973 } 4974 4975 } 4976 4977 class ServerSettingsResponse : Bedrock201Packet 4978 { 4979 4980 enum uint ID = 103; 4981 4982 enum bool CLIENTBOUND = true; 4983 enum bool SERVERBOUND = false; 4984 4985 enum string[] __fields = ["formId", "data"]; 4986 4987 @Var uint formId; 4988 string data; 4989 4990 this() pure nothrow @safe @nogc {} 4991 4992 this(uint formId, string data=string.init) pure nothrow @safe @nogc 4993 { 4994 this.formId = formId; 4995 this.data = data; 4996 } 4997 4998 mixin Make; 4999 5000 public static typeof(this) fromBuffer(ubyte[] buffer) 5001 { 5002 ServerSettingsResponse ret = new ServerSettingsResponse(); 5003 ret.decode(buffer); 5004 return ret; 5005 } 5006 5007 override string toString() 5008 { 5009 return "ServerSettingsResponse(formId: " ~ std.conv.to!string(this.formId) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")"; 5010 } 5011 5012 } 5013 5014 class ShowProfile : Bedrock201Packet 5015 { 5016 5017 enum uint ID = 104; 5018 5019 enum bool CLIENTBOUND = true; 5020 enum bool SERVERBOUND = false; 5021 5022 enum string[] __fields = []; 5023 5024 mixin Make; 5025 5026 public static typeof(this) fromBuffer(ubyte[] buffer) 5027 { 5028 ShowProfile ret = new ShowProfile(); 5029 ret.decode(buffer); 5030 return ret; 5031 } 5032 5033 override string toString() 5034 { 5035 return "ShowProfile()"; 5036 } 5037 5038 } 5039 5040 class SetDefaultGameType : Bedrock201Packet 5041 { 5042 5043 enum uint ID = 105; 5044 5045 enum bool CLIENTBOUND = true; 5046 enum bool SERVERBOUND = false; 5047 5048 // game type 5049 enum uint SURVIVAL = 0; 5050 enum uint CREATIVE = 1; 5051 enum uint ADVENTURE = 2; 5052 5053 enum string[] __fields = ["gameType"]; 5054 5055 @Var uint gameType; 5056 5057 this() pure nothrow @safe @nogc {} 5058 5059 this(uint gameType) pure nothrow @safe @nogc 5060 { 5061 this.gameType = gameType; 5062 } 5063 5064 mixin Make; 5065 5066 public static typeof(this) fromBuffer(ubyte[] buffer) 5067 { 5068 SetDefaultGameType ret = new SetDefaultGameType(); 5069 ret.decode(buffer); 5070 return ret; 5071 } 5072 5073 override string toString() 5074 { 5075 return "SetDefaultGameType(gameType: " ~ std.conv.to!string(this.gameType) ~ ")"; 5076 } 5077 5078 }