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