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