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