1 /*
2  * This file has been automatically generated by Soupply and released under the MIT license.
3  * Generated from data/java340.xml
4  */
5 module soupply.java340.protocol.clientbound;
6 
7 static import std.conv;
8 import std.typetuple : TypeTuple;
9 import xpacket;
10 
11 import soupply.util;
12 import soupply.java340.metadata : Metadata;
13 import soupply.java340.packet : Java340Packet;
14 
15 static import soupply.java340.types;
16 
17 alias Packets = TypeTuple!(SpawnObject, SpawnExperienceOrb, SpawnGlobalEntity, SpawnMob, SpawnPainting, SpawnPlayer, Animation, Statistics, BlockBreakAnimation, UpdateBlockEntity, BlockAction, BlockChange, BossBar, ServerDifficulty, TabComplete, ChatMessage, MultiBlockChange, ConfirmTransaction, CloseWindow, OpenWindow, WindowItems, WindowProperty, SetSlot, SetCooldown, PluginMessage, NamedSoundEffect, Disconnect, EntityStatus, Explosion, UnloadChunk, ChangeGameState, KeepAlive, ChunkData, Effect, Particle, JoinGame, Map, Entity, EntityRelativeMove, EntityLookAndRelativeMove, EntityLook, VehicleMove, OpenSignEditor, CraftRecipeResponse, PlayerAbilities, CombatEvent, PlayerListItem, PlayerPositionAndLook, UseBed, UnlockRecipes, DestroyEntities, RemoveEntityEffect, ResourcePackSend, Respawn, EntityHeadLook, AdvancementProgress, WorldBorder, Camera, HeldItemChange, DisplayScoreboard, EntityMetadata, AttachEntity, EntityVelocity, EntityEquipment, SetExperience, UpdateHealth, ScoreboardObjective, SetPassengers, Teams, UpdateScore, SpawnPosition, TimeUpdate, Title, SoundEffect, PlayerListHeaderAndFooter, CollectItem, EntityTeleport, Advencements, EntityProperties, EntityEffect);
18 
19 class SpawnObject : Java340Packet
20 {
21 
22     enum uint ID = 0;
23 
24     enum bool CLIENTBOUND = true;
25     enum bool SERVERBOUND = false;
26 
27     enum string[] __fields = ["entityId", "uuid", "type", "position", "pitch", "yaw", "data", "velocity"];
28 
29     @Var uint entityId;
30     UUID uuid;
31     ubyte type;
32     Vector!(double, "xyz") position;
33     ubyte pitch;
34     ubyte yaw;
35     int data;
36     Vector!(short, "xyz") velocity;
37 
38     this() pure nothrow @safe @nogc {}
39 
40     this(uint entityId, UUID uuid=UUID.init, ubyte type=ubyte.init, Vector!(double, "xyz") position=Vector!(double, "xyz").init, ubyte pitch=ubyte.init, ubyte yaw=ubyte.init, int data=int.init, Vector!(short, "xyz") velocity=Vector!(short, "xyz").init) pure nothrow @safe @nogc
41     {
42         this.entityId = entityId;
43         this.uuid = uuid;
44         this.type = type;
45         this.position = position;
46         this.pitch = pitch;
47         this.yaw = yaw;
48         this.data = data;
49         this.velocity = velocity;
50     }
51 
52     mixin Make;
53 
54     public static typeof(this) fromBuffer(ubyte[] buffer)
55     {
56         SpawnObject ret = new SpawnObject();
57         ret.decode(buffer);
58         return ret;
59     }
60 
61     override string toString()
62     {
63         return "SpawnObject(entityId: " ~ std.conv.to!string(this.entityId) ~ ", uuid: " ~ std.conv.to!string(this.uuid) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", data: " ~ std.conv.to!string(this.data) ~ ", velocity: " ~ std.conv.to!string(this.velocity) ~ ")";
64     }
65 
66 }
67 
68 class SpawnExperienceOrb : Java340Packet
69 {
70 
71     enum uint ID = 1;
72 
73     enum bool CLIENTBOUND = true;
74     enum bool SERVERBOUND = false;
75 
76     enum string[] __fields = ["entityId", "position", "count"];
77 
78     @Var uint entityId;
79     Vector!(double, "xyz") position;
80     ushort count;
81 
82     this() pure nothrow @safe @nogc {}
83 
84     this(uint entityId, Vector!(double, "xyz") position=Vector!(double, "xyz").init, ushort count=ushort.init) pure nothrow @safe @nogc
85     {
86         this.entityId = entityId;
87         this.position = position;
88         this.count = count;
89     }
90 
91     mixin Make;
92 
93     public static typeof(this) fromBuffer(ubyte[] buffer)
94     {
95         SpawnExperienceOrb ret = new SpawnExperienceOrb();
96         ret.decode(buffer);
97         return ret;
98     }
99 
100     override string toString()
101     {
102         return "SpawnExperienceOrb(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", count: " ~ std.conv.to!string(this.count) ~ ")";
103     }
104 
105 }
106 
107 class SpawnGlobalEntity : Java340Packet
108 {
109 
110     enum uint ID = 2;
111 
112     enum bool CLIENTBOUND = true;
113     enum bool SERVERBOUND = false;
114 
115     // type
116     enum ubyte THUNDERBOLT = 1;
117 
118     enum string[] __fields = ["entityId", "type", "position"];
119 
120     @Var uint entityId;
121     ubyte type;
122     Vector!(double, "xyz") position;
123 
124     this() pure nothrow @safe @nogc {}
125 
126     this(uint entityId, ubyte type=ubyte.init, Vector!(double, "xyz") position=Vector!(double, "xyz").init) pure nothrow @safe @nogc
127     {
128         this.entityId = entityId;
129         this.type = type;
130         this.position = position;
131     }
132 
133     mixin Make;
134 
135     public static typeof(this) fromBuffer(ubyte[] buffer)
136     {
137         SpawnGlobalEntity ret = new SpawnGlobalEntity();
138         ret.decode(buffer);
139         return ret;
140     }
141 
142     override string toString()
143     {
144         return "SpawnGlobalEntity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", position: " ~ std.conv.to!string(this.position) ~ ")";
145     }
146 
147 }
148 
149 class SpawnMob : Java340Packet
150 {
151 
152     enum uint ID = 3;
153 
154     enum bool CLIENTBOUND = true;
155     enum bool SERVERBOUND = false;
156 
157     enum string[] __fields = ["entityId", "uuid", "type", "position", "yaw", "pitch", "headPitch", "velocity", "metadata"];
158 
159     @Var uint entityId;
160     UUID uuid;
161     @Var uint type;
162     Vector!(double, "xyz") position;
163     ubyte yaw;
164     ubyte pitch;
165     ubyte headPitch;
166     Vector!(short, "xyz") velocity;
167     Metadata metadata;
168 
169     this() pure nothrow @safe @nogc {}
170 
171     this(uint entityId, UUID uuid=UUID.init, uint type=uint.init, Vector!(double, "xyz") position=Vector!(double, "xyz").init, ubyte yaw=ubyte.init, ubyte pitch=ubyte.init, ubyte headPitch=ubyte.init, Vector!(short, "xyz") velocity=Vector!(short, "xyz").init, Metadata metadata=Metadata.init) pure nothrow @safe @nogc
172     {
173         this.entityId = entityId;
174         this.uuid = uuid;
175         this.type = type;
176         this.position = position;
177         this.yaw = yaw;
178         this.pitch = pitch;
179         this.headPitch = headPitch;
180         this.velocity = velocity;
181         this.metadata = metadata;
182     }
183 
184     mixin Make;
185 
186     public static typeof(this) fromBuffer(ubyte[] buffer)
187     {
188         SpawnMob ret = new SpawnMob();
189         ret.decode(buffer);
190         return ret;
191     }
192 
193     override string toString()
194     {
195         return "SpawnMob(entityId: " ~ std.conv.to!string(this.entityId) ~ ", uuid: " ~ std.conv.to!string(this.uuid) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", headPitch: " ~ std.conv.to!string(this.headPitch) ~ ", velocity: " ~ std.conv.to!string(this.velocity) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ")";
196     }
197 
198 }
199 
200 class SpawnPainting : Java340Packet
201 {
202 
203     enum uint ID = 4;
204 
205     enum bool CLIENTBOUND = true;
206     enum bool SERVERBOUND = false;
207 
208     // direction
209     enum ubyte SOUTH = 0;
210     enum ubyte WEST = 1;
211     enum ubyte NORTH = 2;
212     enum ubyte EAST = 3;
213 
214     enum string[] __fields = ["entityId", "uuid", "title", "position", "direction"];
215 
216     @Var uint entityId;
217     UUID uuid;
218     string title;
219     ulong position;
220     ubyte direction;
221 
222     this() pure nothrow @safe @nogc {}
223 
224     this(uint entityId, UUID uuid=UUID.init, string title=string.init, ulong position=ulong.init, ubyte direction=ubyte.init) pure nothrow @safe @nogc
225     {
226         this.entityId = entityId;
227         this.uuid = uuid;
228         this.title = title;
229         this.position = position;
230         this.direction = direction;
231     }
232 
233     mixin Make;
234 
235     public static typeof(this) fromBuffer(ubyte[] buffer)
236     {
237         SpawnPainting ret = new SpawnPainting();
238         ret.decode(buffer);
239         return ret;
240     }
241 
242     override string toString()
243     {
244         return "SpawnPainting(entityId: " ~ std.conv.to!string(this.entityId) ~ ", uuid: " ~ std.conv.to!string(this.uuid) ~ ", title: " ~ std.conv.to!string(this.title) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", direction: " ~ std.conv.to!string(this.direction) ~ ")";
245     }
246 
247 }
248 
249 class SpawnPlayer : Java340Packet
250 {
251 
252     enum uint ID = 5;
253 
254     enum bool CLIENTBOUND = true;
255     enum bool SERVERBOUND = false;
256 
257     enum string[] __fields = ["entityId", "uuid", "position", "yaw", "pitch", "metadata"];
258 
259     @Var uint entityId;
260     UUID uuid;
261     Vector!(double, "xyz") position;
262     ubyte yaw;
263     ubyte pitch;
264     Metadata metadata;
265 
266     this() pure nothrow @safe @nogc {}
267 
268     this(uint entityId, UUID uuid=UUID.init, Vector!(double, "xyz") position=Vector!(double, "xyz").init, ubyte yaw=ubyte.init, ubyte pitch=ubyte.init, Metadata metadata=Metadata.init) pure nothrow @safe @nogc
269     {
270         this.entityId = entityId;
271         this.uuid = uuid;
272         this.position = position;
273         this.yaw = yaw;
274         this.pitch = pitch;
275         this.metadata = metadata;
276     }
277 
278     mixin Make;
279 
280     public static typeof(this) fromBuffer(ubyte[] buffer)
281     {
282         SpawnPlayer ret = new SpawnPlayer();
283         ret.decode(buffer);
284         return ret;
285     }
286 
287     override string toString()
288     {
289         return "SpawnPlayer(entityId: " ~ std.conv.to!string(this.entityId) ~ ", uuid: " ~ std.conv.to!string(this.uuid) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ")";
290     }
291 
292 }
293 
294 class Animation : Java340Packet
295 {
296 
297     enum uint ID = 6;
298 
299     enum bool CLIENTBOUND = true;
300     enum bool SERVERBOUND = false;
301 
302     // animation
303     enum ubyte SWING_MAIN_ARM = 0;
304     enum ubyte TAKE_DAMAGE = 1;
305     enum ubyte LEAVE_BED = 2;
306     enum ubyte SWING_OFFHAND = 3;
307     enum ubyte CRITICAL_EFFECT = 4;
308     enum ubyte MAGICAL_CRITICAL_EFFECT = 5;
309 
310     enum string[] __fields = ["entityId", "animation"];
311 
312     @Var uint entityId;
313     ubyte animation;
314 
315     this() pure nothrow @safe @nogc {}
316 
317     this(uint entityId, ubyte animation=ubyte.init) pure nothrow @safe @nogc
318     {
319         this.entityId = entityId;
320         this.animation = animation;
321     }
322 
323     mixin Make;
324 
325     public static typeof(this) fromBuffer(ubyte[] buffer)
326     {
327         Animation ret = new Animation();
328         ret.decode(buffer);
329         return ret;
330     }
331 
332     override string toString()
333     {
334         return "Animation(entityId: " ~ std.conv.to!string(this.entityId) ~ ", animation: " ~ std.conv.to!string(this.animation) ~ ")";
335     }
336 
337 }
338 
339 class Statistics : Java340Packet
340 {
341 
342     enum uint ID = 7;
343 
344     enum bool CLIENTBOUND = true;
345     enum bool SERVERBOUND = false;
346 
347     enum string[] __fields = ["statistics"];
348 
349     soupply.java340.types.Statistic[] statistics;
350 
351     this() pure nothrow @safe @nogc {}
352 
353     this(soupply.java340.types.Statistic[] statistics) pure nothrow @safe @nogc
354     {
355         this.statistics = statistics;
356     }
357 
358     mixin Make;
359 
360     public static typeof(this) fromBuffer(ubyte[] buffer)
361     {
362         Statistics ret = new Statistics();
363         ret.decode(buffer);
364         return ret;
365     }
366 
367     override string toString()
368     {
369         return "Statistics(statistics: " ~ std.conv.to!string(this.statistics) ~ ")";
370     }
371 
372 }
373 
374 class BlockBreakAnimation : Java340Packet
375 {
376 
377     enum uint ID = 8;
378 
379     enum bool CLIENTBOUND = true;
380     enum bool SERVERBOUND = false;
381 
382     enum string[] __fields = ["entityId", "position", "stage"];
383 
384     @Var uint entityId;
385     ulong position;
386     ubyte stage;
387 
388     this() pure nothrow @safe @nogc {}
389 
390     this(uint entityId, ulong position=ulong.init, ubyte stage=ubyte.init) pure nothrow @safe @nogc
391     {
392         this.entityId = entityId;
393         this.position = position;
394         this.stage = stage;
395     }
396 
397     mixin Make;
398 
399     public static typeof(this) fromBuffer(ubyte[] buffer)
400     {
401         BlockBreakAnimation ret = new BlockBreakAnimation();
402         ret.decode(buffer);
403         return ret;
404     }
405 
406     override string toString()
407     {
408         return "BlockBreakAnimation(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", stage: " ~ std.conv.to!string(this.stage) ~ ")";
409     }
410 
411 }
412 
413 class UpdateBlockEntity : Java340Packet
414 {
415 
416     enum uint ID = 9;
417 
418     enum bool CLIENTBOUND = true;
419     enum bool SERVERBOUND = false;
420 
421     // action
422     enum ubyte MOB_SPAWNER_DATA = 1;
423     enum ubyte COMMAND_BLOCK_TEXT = 2;
424     enum ubyte BEACON_POWERS = 3;
425     enum ubyte MOB_HEAD_DATA = 4;
426     enum ubyte FLOWER_POT_FLOWER = 5;
427     enum ubyte BANNER_DATA = 6;
428     enum ubyte STRUCTURE_DATA = 7;
429     enum ubyte END_GATEWAY_DESTINATION = 8;
430     enum ubyte SIGN_TEXT = 9;
431     enum ubyte SHULKER_BOX_DECLARATION = 10;
432     enum ubyte BED_COLOR = 11;
433 
434     enum string[] __fields = ["position", "action", "nbt"];
435 
436     ulong position;
437     ubyte action;
438     @NoLength ubyte[] nbt;
439 
440     this() pure nothrow @safe @nogc {}
441 
442     this(ulong position, ubyte action=ubyte.init, ubyte[] nbt=(ubyte[]).init) pure nothrow @safe @nogc
443     {
444         this.position = position;
445         this.action = action;
446         this.nbt = nbt;
447     }
448 
449     mixin Make;
450 
451     public static typeof(this) fromBuffer(ubyte[] buffer)
452     {
453         UpdateBlockEntity ret = new UpdateBlockEntity();
454         ret.decode(buffer);
455         return ret;
456     }
457 
458     override string toString()
459     {
460         return "UpdateBlockEntity(position: " ~ std.conv.to!string(this.position) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", nbt: " ~ std.conv.to!string(this.nbt) ~ ")";
461     }
462 
463 }
464 
465 class BlockAction : Java340Packet
466 {
467 
468     enum uint ID = 10;
469 
470     enum bool CLIENTBOUND = true;
471     enum bool SERVERBOUND = false;
472 
473     // action
474     enum ubyte NOTE_BLOCK_HARP = 0;
475     enum ubyte NOTE_BLOCK_BASS_DRUM = 1;
476     enum ubyte NOTE_BLOCK_SNARE_DRUM = 2;
477     enum ubyte NOTE_BLOCK_CLICKS = 3;
478     enum ubyte NOTE_BLOCK_STICKS = 3;
479     enum ubyte NOTE_BLOCK_BASS_GUITAR = 4;
480     enum ubyte PISTON_EXTEND = 0;
481     enum ubyte PISTON_RETRACT = 1;
482     enum ubyte CHEST_WATCHERS = 1;
483     enum ubyte BEACON_RECALCULATE = 1;
484     enum ubyte MOB_SPAWNER_RESET_DELAY = 1;
485     enum ubyte END_GATEWAY_YELLOW_BEAM = 1;
486 
487     // parameter
488     enum ubyte PISTON_DOWN = 0;
489     enum ubyte PISTON_UP = 1;
490     enum ubyte PISTON_SOUTH = 2;
491     enum ubyte PISTON_WEST = 3;
492     enum ubyte PISTON_NORTH = 4;
493     enum ubyte PISTON_EAST = 5;
494 
495     enum string[] __fields = ["position", "action", "parameter", "blockType"];
496 
497     ulong position;
498     ubyte action;
499     ubyte parameter;
500     @Var uint blockType;
501 
502     this() pure nothrow @safe @nogc {}
503 
504     this(ulong position, ubyte action=ubyte.init, ubyte parameter=ubyte.init, uint blockType=uint.init) pure nothrow @safe @nogc
505     {
506         this.position = position;
507         this.action = action;
508         this.parameter = parameter;
509         this.blockType = blockType;
510     }
511 
512     mixin Make;
513 
514     public static typeof(this) fromBuffer(ubyte[] buffer)
515     {
516         BlockAction ret = new BlockAction();
517         ret.decode(buffer);
518         return ret;
519     }
520 
521     override string toString()
522     {
523         return "BlockAction(position: " ~ std.conv.to!string(this.position) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", parameter: " ~ std.conv.to!string(this.parameter) ~ ", blockType: " ~ std.conv.to!string(this.blockType) ~ ")";
524     }
525 
526 }
527 
528 class BlockChange : Java340Packet
529 {
530 
531     enum uint ID = 11;
532 
533     enum bool CLIENTBOUND = true;
534     enum bool SERVERBOUND = false;
535 
536     enum string[] __fields = ["position", "block"];
537 
538     ulong position;
539     @Var uint block;
540 
541     this() pure nothrow @safe @nogc {}
542 
543     this(ulong position, uint block=uint.init) pure nothrow @safe @nogc
544     {
545         this.position = position;
546         this.block = block;
547     }
548 
549     mixin Make;
550 
551     public static typeof(this) fromBuffer(ubyte[] buffer)
552     {
553         BlockChange ret = new BlockChange();
554         ret.decode(buffer);
555         return ret;
556     }
557 
558     override string toString()
559     {
560         return "BlockChange(position: " ~ std.conv.to!string(this.position) ~ ", block: " ~ std.conv.to!string(this.block) ~ ")";
561     }
562 
563 }
564 
565 class BossBar : Java340Packet
566 {
567 
568     enum uint ID = 12;
569 
570     enum bool CLIENTBOUND = true;
571     enum bool SERVERBOUND = false;
572 
573     enum string[] __fields = ["uuid", "action"];
574 
575     UUID uuid;
576     @Var uint action;
577 
578     this() pure nothrow @safe @nogc {}
579 
580     this(UUID uuid, uint action=uint.init) pure nothrow @safe @nogc
581     {
582         this.uuid = uuid;
583         this.action = action;
584     }
585 
586     mixin Make;
587 
588     public static typeof(this) fromBuffer(ubyte[] buffer)
589     {
590         BossBar ret = new BossBar();
591         ret.decode(buffer);
592         return ret;
593     }
594 
595     override string toString()
596     {
597         return "BossBar(uuid: " ~ std.conv.to!string(this.uuid) ~ ", action: " ~ std.conv.to!string(this.action) ~ ")";
598     }
599 
600     enum string variantField = "action";
601 
602     alias Variants = TypeTuple!(Add, Remove, UpdateHealth, UpdateTitle, UpdateStyle, UpdateFlags);
603 
604     class Add : Java340Packet
605     {
606 
607         enum typeof(action) ACTION = 0;
608 
609         // color
610         enum uint PINK = 0;
611         enum uint BLUE = 1;
612         enum uint RED = 2;
613         enum uint GREEN = 3;
614         enum uint YELLOW = 4;
615         enum uint PURPLE = 5;
616         enum uint WHITE = 6;
617 
618         // division
619         enum uint NO_DIVISION = 0;
620         enum uint SIX_NOTCHES = 1;
621         enum uint TEN_NOTCHES = 2;
622         enum uint TWELVE_NOTCHES = 3;
623         enum uint TWENTY_NOTCHES = 4;
624 
625         // flags
626         enum ubyte DARK_SKY = 1;
627         enum ubyte IS_DRAGON_BAR = 2;
628 
629         enum string[] __fields = ["title", "health", "color", "division", "flags"];
630 
631         string title;
632         float health;
633         @Var uint color;
634         @Var uint division;
635         ubyte flags;
636 
637         this() pure nothrow @safe @nogc {}
638 
639         this(string title, float health=float.init, uint color=uint.init, uint division=uint.init, ubyte flags=ubyte.init) pure nothrow @safe @nogc
640         {
641             this.title = title;
642             this.health = health;
643             this.color = color;
644             this.division = division;
645             this.flags = flags;
646         }
647 
648         mixin Make;
649 
650         override string toString()
651         {
652             return "BossBar.Add(title: " ~ std.conv.to!string(this.title) ~ ", health: " ~ std.conv.to!string(this.health) ~ ", color: " ~ std.conv.to!string(this.color) ~ ", division: " ~ std.conv.to!string(this.division) ~ ", flags: " ~ std.conv.to!string(this.flags) ~ ")";
653         }
654 
655     }
656 
657     class Remove : Java340Packet
658     {
659 
660         enum typeof(action) ACTION = 1;
661 
662         enum string[] __fields = [];
663 
664         mixin Make;
665 
666         override string toString()
667         {
668             return "BossBar.Remove()";
669         }
670 
671     }
672 
673     class UpdateHealth : Java340Packet
674     {
675 
676         enum typeof(action) ACTION = 2;
677 
678         enum string[] __fields = ["health"];
679 
680         float health;
681 
682         this() pure nothrow @safe @nogc {}
683 
684         this(float health) pure nothrow @safe @nogc
685         {
686             this.health = health;
687         }
688 
689         mixin Make;
690 
691         override string toString()
692         {
693             return "BossBar.UpdateHealth(health: " ~ std.conv.to!string(this.health) ~ ")";
694         }
695 
696     }
697 
698     class UpdateTitle : Java340Packet
699     {
700 
701         enum typeof(action) ACTION = 3;
702 
703         enum string[] __fields = ["title"];
704 
705         string title;
706 
707         this() pure nothrow @safe @nogc {}
708 
709         this(string title) pure nothrow @safe @nogc
710         {
711             this.title = title;
712         }
713 
714         mixin Make;
715 
716         override string toString()
717         {
718             return "BossBar.UpdateTitle(title: " ~ std.conv.to!string(this.title) ~ ")";
719         }
720 
721     }
722 
723     class UpdateStyle : Java340Packet
724     {
725 
726         enum typeof(action) ACTION = 4;
727 
728         // color
729         enum uint PINK = 0;
730         enum uint BLUE = 1;
731         enum uint RED = 2;
732         enum uint GREEN = 3;
733         enum uint YELLOW = 4;
734         enum uint PURPLE = 5;
735         enum uint WHITE = 6;
736 
737         // division
738         enum uint NO_DIVISION = 0;
739         enum uint SIX_NOTCHES = 1;
740         enum uint TEN_NOTCHES = 2;
741         enum uint TWELVE_NOTCHES = 3;
742         enum uint TWENTY_NOTCHES = 4;
743 
744         enum string[] __fields = ["color", "division"];
745 
746         @Var uint color;
747         @Var uint division;
748 
749         this() pure nothrow @safe @nogc {}
750 
751         this(uint color, uint division=uint.init) pure nothrow @safe @nogc
752         {
753             this.color = color;
754             this.division = division;
755         }
756 
757         mixin Make;
758 
759         override string toString()
760         {
761             return "BossBar.UpdateStyle(color: " ~ std.conv.to!string(this.color) ~ ", division: " ~ std.conv.to!string(this.division) ~ ")";
762         }
763 
764     }
765 
766     class UpdateFlags : Java340Packet
767     {
768 
769         enum typeof(action) ACTION = 5;
770 
771         // flags
772         enum ubyte DARK_SKY = 1;
773         enum ubyte IS_DRAGON_BAR = 2;
774 
775         enum string[] __fields = ["flags"];
776 
777         ubyte flags;
778 
779         this() pure nothrow @safe @nogc {}
780 
781         this(ubyte flags) pure nothrow @safe @nogc
782         {
783             this.flags = flags;
784         }
785 
786         mixin Make;
787 
788         override string toString()
789         {
790             return "BossBar.UpdateFlags(flags: " ~ std.conv.to!string(this.flags) ~ ")";
791         }
792 
793     }
794 
795 }
796 
797 class ServerDifficulty : Java340Packet
798 {
799 
800     enum uint ID = 13;
801 
802     enum bool CLIENTBOUND = true;
803     enum bool SERVERBOUND = false;
804 
805     // difficulty
806     enum ubyte PEACEFUL = 0;
807     enum ubyte EASY = 1;
808     enum ubyte NORMAL = 2;
809     enum ubyte HARD = 3;
810 
811     enum string[] __fields = ["difficulty"];
812 
813     ubyte difficulty;
814 
815     this() pure nothrow @safe @nogc {}
816 
817     this(ubyte difficulty) pure nothrow @safe @nogc
818     {
819         this.difficulty = difficulty;
820     }
821 
822     mixin Make;
823 
824     public static typeof(this) fromBuffer(ubyte[] buffer)
825     {
826         ServerDifficulty ret = new ServerDifficulty();
827         ret.decode(buffer);
828         return ret;
829     }
830 
831     override string toString()
832     {
833         return "ServerDifficulty(difficulty: " ~ std.conv.to!string(this.difficulty) ~ ")";
834     }
835 
836 }
837 
838 class TabComplete : Java340Packet
839 {
840 
841     enum uint ID = 14;
842 
843     enum bool CLIENTBOUND = true;
844     enum bool SERVERBOUND = false;
845 
846     enum string[] __fields = ["matches"];
847 
848     string[] matches;
849 
850     this() pure nothrow @safe @nogc {}
851 
852     this(string[] matches) pure nothrow @safe @nogc
853     {
854         this.matches = matches;
855     }
856 
857     mixin Make;
858 
859     public static typeof(this) fromBuffer(ubyte[] buffer)
860     {
861         TabComplete ret = new TabComplete();
862         ret.decode(buffer);
863         return ret;
864     }
865 
866     override string toString()
867     {
868         return "TabComplete(matches: " ~ std.conv.to!string(this.matches) ~ ")";
869     }
870 
871 }
872 
873 class ChatMessage : Java340Packet
874 {
875 
876     enum uint ID = 15;
877 
878     enum bool CLIENTBOUND = true;
879     enum bool SERVERBOUND = false;
880 
881     // position
882     enum ubyte CHAT = 0;
883     enum ubyte SYSTEM_MESSAGE = 1;
884     enum ubyte ABOVE_HOTBAR = 2;
885 
886     enum string[] __fields = ["message", "position"];
887 
888     string message;
889     ubyte position;
890 
891     this() pure nothrow @safe @nogc {}
892 
893     this(string message, ubyte position=ubyte.init) pure nothrow @safe @nogc
894     {
895         this.message = message;
896         this.position = position;
897     }
898 
899     mixin Make;
900 
901     public static typeof(this) fromBuffer(ubyte[] buffer)
902     {
903         ChatMessage ret = new ChatMessage();
904         ret.decode(buffer);
905         return ret;
906     }
907 
908     override string toString()
909     {
910         return "ChatMessage(message: " ~ std.conv.to!string(this.message) ~ ", position: " ~ std.conv.to!string(this.position) ~ ")";
911     }
912 
913 }
914 
915 class MultiBlockChange : Java340Packet
916 {
917 
918     enum uint ID = 16;
919 
920     enum bool CLIENTBOUND = true;
921     enum bool SERVERBOUND = false;
922 
923     enum string[] __fields = ["chunk", "changes"];
924 
925     Vector!(int, "xz") chunk;
926     soupply.java340.types.BlockChange[] changes;
927 
928     this() pure nothrow @safe @nogc {}
929 
930     this(Vector!(int, "xz") chunk, soupply.java340.types.BlockChange[] changes=(soupply.java340.types.BlockChange[]).init) pure nothrow @safe @nogc
931     {
932         this.chunk = chunk;
933         this.changes = changes;
934     }
935 
936     mixin Make;
937 
938     public static typeof(this) fromBuffer(ubyte[] buffer)
939     {
940         MultiBlockChange ret = new MultiBlockChange();
941         ret.decode(buffer);
942         return ret;
943     }
944 
945     override string toString()
946     {
947         return "MultiBlockChange(chunk: " ~ std.conv.to!string(this.chunk) ~ ", changes: " ~ std.conv.to!string(this.changes) ~ ")";
948     }
949 
950 }
951 
952 class ConfirmTransaction : Java340Packet
953 {
954 
955     enum uint ID = 17;
956 
957     enum bool CLIENTBOUND = true;
958     enum bool SERVERBOUND = false;
959 
960     enum string[] __fields = ["window", "action", "accepted"];
961 
962     ubyte window;
963     ushort action;
964     bool accepted;
965 
966     this() pure nothrow @safe @nogc {}
967 
968     this(ubyte window, ushort action=ushort.init, bool accepted=bool.init) pure nothrow @safe @nogc
969     {
970         this.window = window;
971         this.action = action;
972         this.accepted = accepted;
973     }
974 
975     mixin Make;
976 
977     public static typeof(this) fromBuffer(ubyte[] buffer)
978     {
979         ConfirmTransaction ret = new ConfirmTransaction();
980         ret.decode(buffer);
981         return ret;
982     }
983 
984     override string toString()
985     {
986         return "ConfirmTransaction(window: " ~ std.conv.to!string(this.window) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", accepted: " ~ std.conv.to!string(this.accepted) ~ ")";
987     }
988 
989 }
990 
991 class CloseWindow : Java340Packet
992 {
993 
994     enum uint ID = 18;
995 
996     enum bool CLIENTBOUND = true;
997     enum bool SERVERBOUND = false;
998 
999     enum string[] __fields = ["window"];
1000 
1001     ubyte window;
1002 
1003     this() pure nothrow @safe @nogc {}
1004 
1005     this(ubyte window) pure nothrow @safe @nogc
1006     {
1007         this.window = window;
1008     }
1009 
1010     mixin Make;
1011 
1012     public static typeof(this) fromBuffer(ubyte[] buffer)
1013     {
1014         CloseWindow ret = new CloseWindow();
1015         ret.decode(buffer);
1016         return ret;
1017     }
1018 
1019     override string toString()
1020     {
1021         return "CloseWindow(window: " ~ std.conv.to!string(this.window) ~ ")";
1022     }
1023 
1024 }
1025 
1026 class OpenWindow : Java340Packet
1027 {
1028 
1029     enum uint ID = 19;
1030 
1031     enum bool CLIENTBOUND = true;
1032     enum bool SERVERBOUND = false;
1033 
1034     enum string[] __fields = ["window", "type", "title", "slots"];
1035 
1036     ubyte window;
1037     string type;
1038     string title;
1039     ubyte slots;
1040 
1041     this() pure nothrow @safe @nogc {}
1042 
1043     this(ubyte window, string type=string.init, string title=string.init, ubyte slots=ubyte.init) pure nothrow @safe @nogc
1044     {
1045         this.window = window;
1046         this.type = type;
1047         this.title = title;
1048         this.slots = slots;
1049     }
1050 
1051     mixin Make;
1052 
1053     public static typeof(this) fromBuffer(ubyte[] buffer)
1054     {
1055         OpenWindow ret = new OpenWindow();
1056         ret.decode(buffer);
1057         return ret;
1058     }
1059 
1060     override string toString()
1061     {
1062         return "OpenWindow(window: " ~ std.conv.to!string(this.window) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", title: " ~ std.conv.to!string(this.title) ~ ", slots: " ~ std.conv.to!string(this.slots) ~ ")";
1063     }
1064 
1065 }
1066 
1067 class WindowItems : Java340Packet
1068 {
1069 
1070     enum uint ID = 20;
1071 
1072     enum bool CLIENTBOUND = true;
1073     enum bool SERVERBOUND = false;
1074 
1075     enum string[] __fields = ["window", "slots"];
1076 
1077     ubyte window;
1078     @Length!ushort soupply.java340.types.Slot[] slots;
1079 
1080     this() pure nothrow @safe @nogc {}
1081 
1082     this(ubyte window, soupply.java340.types.Slot[] slots=(soupply.java340.types.Slot[]).init) pure nothrow @safe @nogc
1083     {
1084         this.window = window;
1085         this.slots = slots;
1086     }
1087 
1088     mixin Make;
1089 
1090     public static typeof(this) fromBuffer(ubyte[] buffer)
1091     {
1092         WindowItems ret = new WindowItems();
1093         ret.decode(buffer);
1094         return ret;
1095     }
1096 
1097     override string toString()
1098     {
1099         return "WindowItems(window: " ~ std.conv.to!string(this.window) ~ ", slots: " ~ std.conv.to!string(this.slots) ~ ")";
1100     }
1101 
1102 }
1103 
1104 class WindowProperty : Java340Packet
1105 {
1106 
1107     enum uint ID = 21;
1108 
1109     enum bool CLIENTBOUND = true;
1110     enum bool SERVERBOUND = false;
1111 
1112     // property
1113     enum ushort FURNANCE_FIRE_ICON = 0;
1114     enum ushort FURNACE_MAX_FUEL_BURN_TIME = 1;
1115     enum ushort FURNACE_PROGRESS_ARROW = 2;
1116     enum ushort FURNCE_MAX_PROGRESS = 3;
1117     enum ushort ENCHANTMENT_LEVEL_REQUIREMENT_TOP = 0;
1118     enum ushort ENCHANTMENT_LEVEL_REQUIREMENT_MIDDLE = 1;
1119     enum ushort ENCHANTMENT_LEVEL_REQUIREMENT_BOTTOM = 2;
1120     enum ushort ENCHANTMENT_SEED = 3;
1121     enum ushort ENCHANTMENT_ID_TOP = 4;
1122     enum ushort ENCHANTMENT_ID_MIDDLE = 5;
1123     enum ushort ENCHANTMENT_ID_BOTTOM = 6;
1124     enum ushort ENCHANTMENT_LEVEL_TOP = 7;
1125     enum ushort ENCHANTMENT_LEVEL_MIDDLE = 8;
1126     enum ushort ENCHANTMENT_LEVEL_BOTTOM = 9;
1127     enum ushort BEACON_POWER_LEVEL = 0;
1128     enum ushort BEACON_FIRST_EFFECT = 1;
1129     enum ushort BEACON_SECOND_EFFECT = 2;
1130     enum ushort ANVIL_REPAIR_COST = 0;
1131     enum ushort BREWING_STAND_BREW_TIME = 0;
1132 
1133     enum string[] __fields = ["window", "property", "value"];
1134 
1135     ubyte window;
1136     ushort property;
1137     short value;
1138 
1139     this() pure nothrow @safe @nogc {}
1140 
1141     this(ubyte window, ushort property=ushort.init, short value=short.init) pure nothrow @safe @nogc
1142     {
1143         this.window = window;
1144         this.property = property;
1145         this.value = value;
1146     }
1147 
1148     mixin Make;
1149 
1150     public static typeof(this) fromBuffer(ubyte[] buffer)
1151     {
1152         WindowProperty ret = new WindowProperty();
1153         ret.decode(buffer);
1154         return ret;
1155     }
1156 
1157     override string toString()
1158     {
1159         return "WindowProperty(window: " ~ std.conv.to!string(this.window) ~ ", property: " ~ std.conv.to!string(this.property) ~ ", value: " ~ std.conv.to!string(this.value) ~ ")";
1160     }
1161 
1162 }
1163 
1164 class SetSlot : Java340Packet
1165 {
1166 
1167     enum uint ID = 22;
1168 
1169     enum bool CLIENTBOUND = true;
1170     enum bool SERVERBOUND = false;
1171 
1172     enum string[] __fields = ["window", "slot", "item"];
1173 
1174     ubyte window;
1175     ushort slot;
1176     soupply.java340.types.Slot item;
1177 
1178     this() pure nothrow @safe @nogc {}
1179 
1180     this(ubyte window, ushort slot=ushort.init, soupply.java340.types.Slot item=soupply.java340.types.Slot.init) pure nothrow @safe @nogc
1181     {
1182         this.window = window;
1183         this.slot = slot;
1184         this.item = item;
1185     }
1186 
1187     mixin Make;
1188 
1189     public static typeof(this) fromBuffer(ubyte[] buffer)
1190     {
1191         SetSlot ret = new SetSlot();
1192         ret.decode(buffer);
1193         return ret;
1194     }
1195 
1196     override string toString()
1197     {
1198         return "SetSlot(window: " ~ std.conv.to!string(this.window) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ", item: " ~ std.conv.to!string(this.item) ~ ")";
1199     }
1200 
1201 }
1202 
1203 class SetCooldown : Java340Packet
1204 {
1205 
1206     enum uint ID = 23;
1207 
1208     enum bool CLIENTBOUND = true;
1209     enum bool SERVERBOUND = false;
1210 
1211     enum string[] __fields = ["item", "cooldown"];
1212 
1213     @Var uint item;
1214     @Var uint cooldown;
1215 
1216     this() pure nothrow @safe @nogc {}
1217 
1218     this(uint item, uint cooldown=uint.init) pure nothrow @safe @nogc
1219     {
1220         this.item = item;
1221         this.cooldown = cooldown;
1222     }
1223 
1224     mixin Make;
1225 
1226     public static typeof(this) fromBuffer(ubyte[] buffer)
1227     {
1228         SetCooldown ret = new SetCooldown();
1229         ret.decode(buffer);
1230         return ret;
1231     }
1232 
1233     override string toString()
1234     {
1235         return "SetCooldown(item: " ~ std.conv.to!string(this.item) ~ ", cooldown: " ~ std.conv.to!string(this.cooldown) ~ ")";
1236     }
1237 
1238 }
1239 
1240 class PluginMessage : Java340Packet
1241 {
1242 
1243     enum uint ID = 24;
1244 
1245     enum bool CLIENTBOUND = true;
1246     enum bool SERVERBOUND = false;
1247 
1248     enum string[] __fields = ["channel", "data"];
1249 
1250     string channel;
1251     @NoLength ubyte[] data;
1252 
1253     this() pure nothrow @safe @nogc {}
1254 
1255     this(string channel, ubyte[] data=(ubyte[]).init) pure nothrow @safe @nogc
1256     {
1257         this.channel = channel;
1258         this.data = data;
1259     }
1260 
1261     mixin Make;
1262 
1263     public static typeof(this) fromBuffer(ubyte[] buffer)
1264     {
1265         PluginMessage ret = new PluginMessage();
1266         ret.decode(buffer);
1267         return ret;
1268     }
1269 
1270     override string toString()
1271     {
1272         return "PluginMessage(channel: " ~ std.conv.to!string(this.channel) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")";
1273     }
1274 
1275 }
1276 
1277 class NamedSoundEffect : Java340Packet
1278 {
1279 
1280     enum uint ID = 25;
1281 
1282     enum bool CLIENTBOUND = true;
1283     enum bool SERVERBOUND = false;
1284 
1285     enum string[] __fields = ["name", "category", "position", "volume", "pitch"];
1286 
1287     string name;
1288     @Var uint category;
1289     Vector!(int, "xyz") position;
1290     float volume;
1291     float pitch;
1292 
1293     this() pure nothrow @safe @nogc {}
1294 
1295     this(string name, uint category=uint.init, Vector!(int, "xyz") position=Vector!(int, "xyz").init, float volume=float.init, float pitch=float.init) pure nothrow @safe @nogc
1296     {
1297         this.name = name;
1298         this.category = category;
1299         this.position = position;
1300         this.volume = volume;
1301         this.pitch = pitch;
1302     }
1303 
1304     mixin Make;
1305 
1306     public static typeof(this) fromBuffer(ubyte[] buffer)
1307     {
1308         NamedSoundEffect ret = new NamedSoundEffect();
1309         ret.decode(buffer);
1310         return ret;
1311     }
1312 
1313     override string toString()
1314     {
1315         return "NamedSoundEffect(name: " ~ std.conv.to!string(this.name) ~ ", category: " ~ std.conv.to!string(this.category) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", volume: " ~ std.conv.to!string(this.volume) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ")";
1316     }
1317 
1318 }
1319 
1320 class Disconnect : Java340Packet
1321 {
1322 
1323     enum uint ID = 26;
1324 
1325     enum bool CLIENTBOUND = true;
1326     enum bool SERVERBOUND = false;
1327 
1328     enum string[] __fields = ["reason"];
1329 
1330     string reason;
1331 
1332     this() pure nothrow @safe @nogc {}
1333 
1334     this(string reason) pure nothrow @safe @nogc
1335     {
1336         this.reason = reason;
1337     }
1338 
1339     mixin Make;
1340 
1341     public static typeof(this) fromBuffer(ubyte[] buffer)
1342     {
1343         Disconnect ret = new Disconnect();
1344         ret.decode(buffer);
1345         return ret;
1346     }
1347 
1348     override string toString()
1349     {
1350         return "Disconnect(reason: " ~ std.conv.to!string(this.reason) ~ ")";
1351     }
1352 
1353 }
1354 
1355 class EntityStatus : Java340Packet
1356 {
1357 
1358     enum uint ID = 27;
1359 
1360     enum bool CLIENTBOUND = true;
1361     enum bool SERVERBOUND = false;
1362 
1363     // status
1364     enum ubyte SPAWN_TIPPED_ARROW_PARTICLE_EFFECTS = 0;
1365     enum ubyte PLAY_JUMPING_ANIMATION_AND_PARTICLES = 1;
1366     enum ubyte RESET_SPAWNER_DELAY = 1;
1367     enum ubyte PLAY_HURT_ANIMATION_AND_SOUND = 2;
1368     enum ubyte PLAY_DEATH_ANIMATION_AND_SOUND = 3;
1369     enum ubyte PLAY_ATTACK_ANIMATION_AND_SOUND = 4;
1370     enum ubyte SPAWN_SMOKE_PARTICLES = 6;
1371     enum ubyte SPAWN_HEART_PARTICLES = 7;
1372     enum ubyte PLAY_SHAKING_WATER_ANIMATION = 8;
1373     enum ubyte FINISHED_CONSUMING = 9;
1374     enum ubyte PLAY_EATING_GRASS_ANIMATION = 10;
1375     enum ubyte IGNITE_MINECART_TNT = 10;
1376     enum ubyte HOLD_POPPY = 11;
1377     enum ubyte SPAWN_VILLAGER_MATING_HEART_PARTICLES = 12;
1378     enum ubyte SPAWN_VILLAGER_ANGRY_PARTICLES = 13;
1379     enum ubyte SPAWN_VILLAGER_HAPPY_PARTICLES = 14;
1380     enum ubyte SPAWN_WITCH_MAGIC_PARTICLES = 15;
1381     enum ubyte PLAY_ZOMBIE_CURE_FINISHED_SOUND = 16;
1382     enum ubyte SPAWN_FIREWORK_EXPLOSION_EFFECT = 17;
1383     enum ubyte SPAWN_LOVE_PARTICLES = 18;
1384     enum ubyte RESET_SQUID_ROTATION = 19;
1385     enum ubyte SPAWN_EXPLOSION_PARTICLES = 20;
1386     enum ubyte PLAY_GUARDIAN_SOUND_EFFECT = 21;
1387     enum ubyte ENABLE_REDUCED_DEBUG_SCREEN = 22;
1388     enum ubyte DISABLE_REDUCED_DEBUG_SCREEN = 23;
1389     enum ubyte SET_OP_PERMISSION_LEVEL_0 = 24;
1390     enum ubyte SET_OP_PERMISSION_LEVEL_1 = 25;
1391     enum ubyte SET_OP_PERMISSION_LEVEL_2 = 26;
1392     enum ubyte SET_OP_PERMISSION_LEVEL_3 = 27;
1393     enum ubyte SET_OP_PERMISSION_LEVEL_4 = 28;
1394     enum ubyte PLAY_SHIELD_BLOCK_SOUND = 29;
1395     enum ubyte PLAY_SHIELD_BREAK_SOUND = 30;
1396     enum ubyte HOOK_KNOCKBACK = 31;
1397     enum ubyte PLAY_HIT_SOUND = 32;
1398     enum ubyte PLAY_THORNS_HURT_ANIMATION_AND_SOUND = 33;
1399     enum ubyte REMOVE_POPPY = 34;
1400     enum ubyte PLAY_TOTEM_UNDYING_ANIMATION = 35;
1401 
1402     enum string[] __fields = ["entityId", "status"];
1403 
1404     uint entityId;
1405     ubyte status;
1406 
1407     this() pure nothrow @safe @nogc {}
1408 
1409     this(uint entityId, ubyte status=ubyte.init) pure nothrow @safe @nogc
1410     {
1411         this.entityId = entityId;
1412         this.status = status;
1413     }
1414 
1415     mixin Make;
1416 
1417     public static typeof(this) fromBuffer(ubyte[] buffer)
1418     {
1419         EntityStatus ret = new EntityStatus();
1420         ret.decode(buffer);
1421         return ret;
1422     }
1423 
1424     override string toString()
1425     {
1426         return "EntityStatus(entityId: " ~ std.conv.to!string(this.entityId) ~ ", status: " ~ std.conv.to!string(this.status) ~ ")";
1427     }
1428 
1429 }
1430 
1431 class Explosion : Java340Packet
1432 {
1433 
1434     enum uint ID = 28;
1435 
1436     enum bool CLIENTBOUND = true;
1437     enum bool SERVERBOUND = false;
1438 
1439     enum string[] __fields = ["position", "radius", "records", "motion"];
1440 
1441     Vector!(float, "xyz") position;
1442     float radius;
1443     @Length!uint Vector!(byte, "xyz")[] records;
1444     Vector!(float, "xyz") motion;
1445 
1446     this() pure nothrow @safe @nogc {}
1447 
1448     this(Vector!(float, "xyz") position, float radius=float.init, Vector!(byte, "xyz")[] records=(Vector!(byte, "xyz")[]).init, Vector!(float, "xyz") motion=Vector!(float, "xyz").init) pure nothrow @safe @nogc
1449     {
1450         this.position = position;
1451         this.radius = radius;
1452         this.records = records;
1453         this.motion = motion;
1454     }
1455 
1456     mixin Make;
1457 
1458     public static typeof(this) fromBuffer(ubyte[] buffer)
1459     {
1460         Explosion ret = new Explosion();
1461         ret.decode(buffer);
1462         return ret;
1463     }
1464 
1465     override string toString()
1466     {
1467         return "Explosion(position: " ~ std.conv.to!string(this.position) ~ ", radius: " ~ std.conv.to!string(this.radius) ~ ", records: " ~ std.conv.to!string(this.records) ~ ", motion: " ~ std.conv.to!string(this.motion) ~ ")";
1468     }
1469 
1470 }
1471 
1472 class UnloadChunk : Java340Packet
1473 {
1474 
1475     enum uint ID = 29;
1476 
1477     enum bool CLIENTBOUND = true;
1478     enum bool SERVERBOUND = false;
1479 
1480     enum string[] __fields = ["position"];
1481 
1482     Vector!(int, "xz") position;
1483 
1484     this() pure nothrow @safe @nogc {}
1485 
1486     this(Vector!(int, "xz") position) pure nothrow @safe @nogc
1487     {
1488         this.position = position;
1489     }
1490 
1491     mixin Make;
1492 
1493     public static typeof(this) fromBuffer(ubyte[] buffer)
1494     {
1495         UnloadChunk ret = new UnloadChunk();
1496         ret.decode(buffer);
1497         return ret;
1498     }
1499 
1500     override string toString()
1501     {
1502         return "UnloadChunk(position: " ~ std.conv.to!string(this.position) ~ ")";
1503     }
1504 
1505 }
1506 
1507 class ChangeGameState : Java340Packet
1508 {
1509 
1510     enum uint ID = 30;
1511 
1512     enum bool CLIENTBOUND = true;
1513     enum bool SERVERBOUND = false;
1514 
1515     // reason
1516     enum ubyte INVALID_BED = 0;
1517     enum ubyte END_RAINING = 1;
1518     enum ubyte BEGIN_RAINING = 2;
1519     enum ubyte CHANGE_GAMEMODE = 3;
1520     enum ubyte EXIT_END = 4;
1521     enum ubyte DEMO_MESSAGE = 5;
1522     enum ubyte ARROW_HITTING_PLAYER = 6;
1523     enum ubyte FADE_VALUE = 7;
1524     enum ubyte FADE_TIME = 8;
1525     enum ubyte PLAY_ELDER_GUARDIAN_MOB_APPEARANCE = 10;
1526 
1527     // value
1528     enum float SURVIVAL = 0;
1529     enum float CREATIVE = 1;
1530     enum float ADVENTURE = 2;
1531     enum float SPECTATOR = 3;
1532     enum float RESPAWN_IMMEDIATELY = 0;
1533     enum float RESPAWN_AFTER_CREDITS = 1;
1534     enum float SHOW_DEMO_SCREEN = 0;
1535     enum float TELL_MOVEMENT_CONTROLS = 101;
1536     enum float TELL_JUMP_CONTROLS = 102;
1537     enum float TELL_INVENTORY_CONTROLS = 103;
1538     enum float BRIGHT = 0;
1539     enum float DARK = 1;
1540 
1541     enum string[] __fields = ["reason", "value"];
1542 
1543     ubyte reason;
1544     float value;
1545 
1546     this() pure nothrow @safe @nogc {}
1547 
1548     this(ubyte reason, float value=float.init) pure nothrow @safe @nogc
1549     {
1550         this.reason = reason;
1551         this.value = value;
1552     }
1553 
1554     mixin Make;
1555 
1556     public static typeof(this) fromBuffer(ubyte[] buffer)
1557     {
1558         ChangeGameState ret = new ChangeGameState();
1559         ret.decode(buffer);
1560         return ret;
1561     }
1562 
1563     override string toString()
1564     {
1565         return "ChangeGameState(reason: " ~ std.conv.to!string(this.reason) ~ ", value: " ~ std.conv.to!string(this.value) ~ ")";
1566     }
1567 
1568 }
1569 
1570 class KeepAlive : Java340Packet
1571 {
1572 
1573     enum uint ID = 31;
1574 
1575     enum bool CLIENTBOUND = true;
1576     enum bool SERVERBOUND = false;
1577 
1578     enum string[] __fields = ["id"];
1579 
1580     long id;
1581 
1582     this() pure nothrow @safe @nogc {}
1583 
1584     this(long id) pure nothrow @safe @nogc
1585     {
1586         this.id = id;
1587     }
1588 
1589     mixin Make;
1590 
1591     public static typeof(this) fromBuffer(ubyte[] buffer)
1592     {
1593         KeepAlive ret = new KeepAlive();
1594         ret.decode(buffer);
1595         return ret;
1596     }
1597 
1598     override string toString()
1599     {
1600         return "KeepAlive(id: " ~ std.conv.to!string(this.id) ~ ")";
1601     }
1602 
1603 }
1604 
1605 class ChunkData : Java340Packet
1606 {
1607 
1608     enum uint ID = 32;
1609 
1610     enum bool CLIENTBOUND = true;
1611     enum bool SERVERBOUND = false;
1612 
1613     enum string[] __fields = ["position", "full", "sections", "data", "tilesCount", "tiles"];
1614 
1615     Vector!(int, "xz") position;
1616     bool full;
1617     @Var uint sections;
1618     ubyte[] data;
1619     @Var uint tilesCount;
1620     @NoLength ubyte[] tiles;
1621 
1622     this() pure nothrow @safe @nogc {}
1623 
1624     this(Vector!(int, "xz") position, bool full=bool.init, uint sections=uint.init, ubyte[] data=(ubyte[]).init, uint tilesCount=uint.init, ubyte[] tiles=(ubyte[]).init) pure nothrow @safe @nogc
1625     {
1626         this.position = position;
1627         this.full = full;
1628         this.sections = sections;
1629         this.data = data;
1630         this.tilesCount = tilesCount;
1631         this.tiles = tiles;
1632     }
1633 
1634     mixin Make;
1635 
1636     public static typeof(this) fromBuffer(ubyte[] buffer)
1637     {
1638         ChunkData ret = new ChunkData();
1639         ret.decode(buffer);
1640         return ret;
1641     }
1642 
1643     override string toString()
1644     {
1645         return "ChunkData(position: " ~ std.conv.to!string(this.position) ~ ", full: " ~ std.conv.to!string(this.full) ~ ", sections: " ~ std.conv.to!string(this.sections) ~ ", data: " ~ std.conv.to!string(this.data) ~ ", tilesCount: " ~ std.conv.to!string(this.tilesCount) ~ ", tiles: " ~ std.conv.to!string(this.tiles) ~ ")";
1646     }
1647 
1648 }
1649 
1650 class Effect : Java340Packet
1651 {
1652 
1653     enum uint ID = 33;
1654 
1655     enum bool CLIENTBOUND = true;
1656     enum bool SERVERBOUND = false;
1657 
1658     // effect id
1659     enum uint DISPENSER_DISPENSE = 1000;
1660     enum uint DISPENSER_FAIL_DISPENSE = 1001;
1661     enum uint DISPENSER_SHOOT = 1002;
1662     enum uint ENDER_EYE_LAUNCH = 1003;
1663     enum uint FIREWORK_SHOT = 1004;
1664     enum uint IRON_DOOR_OPEN = 1005;
1665     enum uint WOODEN_DOOR_OPEN = 1006;
1666     enum uint WOODEN_TRAPDOOR_OPEN = 1007;
1667     enum uint FENCE_GATE_OPEN = 1008;
1668     enum uint FIRE_EXTINGUISH = 1009;
1669     enum uint PLAY_RECORD = 1010;
1670     enum uint IRON_DOOR_CLOSE = 1011;
1671     enum uint WOODEN_DOOR_CLOSE = 1012;
1672     enum uint WOODEN_TRAPDOOR_CLOSE = 1013;
1673     enum uint FENCE_GATE_CLOSE = 1014;
1674     enum uint GHAST_WARN = 1015;
1675     enum uint GHAST_SHOOT = 1016;
1676     enum uint ENDERDRAGON_SHOOT = 1017;
1677     enum uint BLAZE_SHOOT = 1018;
1678     enum uint ZOMBIE_ATTACK_WOOD_DOOR = 1019;
1679     enum uint ZOMBIE_ATTACK_IRON_DOOR = 1020;
1680     enum uint ZOMBIE_BREAK_WOOD_DOOR = 1021;
1681     enum uint WITHER_BREAK_BLOCK = 1022;
1682     enum uint WITHER_SPAWN = 1023;
1683     enum uint WITHER_SHOOT = 1024;
1684     enum uint BAT_TAKE_OFF = 1025;
1685     enum uint ZOMBIE_INFECT_VILLAGER = 1026;
1686     enum uint ZOMBIE_VILLAGER_CONVERT = 1027;
1687     enum uint ENDER_DRAGON_BREATH = 1028;
1688     enum uint ANVIL_BREAK = 1029;
1689     enum uint ANVIL_USE = 1030;
1690     enum uint ANVIL_LAND = 1031;
1691     enum uint PORTAL_TRAVEL = 1032;
1692     enum uint CHORUS_FLOWER_GROW = 1033;
1693     enum uint CHORUS_FLOWER_DIE = 1034;
1694     enum uint BREWING_STAND_BREW = 1035;
1695     enum uint IRON_TRAPDOOR_OPEN = 1036;
1696     enum uint IRON_TRAPDOOR_CLOSE = 1037;
1697     enum uint SPAWN_10_SMOKE_PARTICLES = 2000;
1698     enum uint BREAK_BREAK_PARTICLES_AND_SOUND = 2001;
1699     enum uint SPLASH_POTION_PARTICLES_AND_SOUND = 2002;
1700     enum uint ENDER_EYE_BREAK_PARTICLES_AND_SOUND = 2003;
1701     enum uint MOB_SPAWN_PARTICLES = 2004;
1702     enum uint BONEMEAL_PARTICLES = 2005;
1703     enum uint DRAGON_BREATH = 2006;
1704     enum uint END_GATEWAY_SPAWN = 3000;
1705     enum uint ENDERDRAGON_GROWL = 3001;
1706 
1707     enum string[] __fields = ["effectId", "position", "data", "disableVolume"];
1708 
1709     uint effectId;
1710     ulong position;
1711     uint data;
1712     bool disableVolume;
1713 
1714     this() pure nothrow @safe @nogc {}
1715 
1716     this(uint effectId, ulong position=ulong.init, uint data=uint.init, bool disableVolume=bool.init) pure nothrow @safe @nogc
1717     {
1718         this.effectId = effectId;
1719         this.position = position;
1720         this.data = data;
1721         this.disableVolume = disableVolume;
1722     }
1723 
1724     mixin Make;
1725 
1726     public static typeof(this) fromBuffer(ubyte[] buffer)
1727     {
1728         Effect ret = new Effect();
1729         ret.decode(buffer);
1730         return ret;
1731     }
1732 
1733     override string toString()
1734     {
1735         return "Effect(effectId: " ~ std.conv.to!string(this.effectId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", data: " ~ std.conv.to!string(this.data) ~ ", disableVolume: " ~ std.conv.to!string(this.disableVolume) ~ ")";
1736     }
1737 
1738 }
1739 
1740 class Particle : Java340Packet
1741 {
1742 
1743     enum uint ID = 34;
1744 
1745     enum bool CLIENTBOUND = true;
1746     enum bool SERVERBOUND = false;
1747 
1748     // particle id
1749     enum uint EXPLODE = 0;
1750     enum uint LARGE_EXPLOSION = 1;
1751     enum uint HUGE_EXPLOSION = 2;
1752     enum uint FIREWORK_SPARK = 3;
1753     enum uint BUBBLE = 4;
1754     enum uint SPLASH = 5;
1755     enum uint WAKE = 6;
1756     enum uint SUSPENDED = 7;
1757     enum uint DEPTH_SUSPEND = 8;
1758     enum uint CRIT = 9;
1759     enum uint MAGIC_CRIT = 10;
1760     enum uint SMOKE = 11;
1761     enum uint LARGE_SMOKE = 12;
1762     enum uint SPELL = 13;
1763     enum uint INSTANT_SPELL = 14;
1764     enum uint MOB_SPELL = 15;
1765     enum uint MOB_SPELL_AMBIENT = 16;
1766     enum uint WITCH_MAGIC = 17;
1767     enum uint DRIP_WATER = 18;
1768     enum uint DRIP_LAVA = 19;
1769     enum uint ANGRY_VILLAGER = 20;
1770     enum uint HAPPY_VILLAGER = 21;
1771     enum uint TOWN_AURA = 22;
1772     enum uint NOTE = 23;
1773     enum uint PORTAL = 24;
1774     enum uint ENCHANTMENT_TABLE = 25;
1775     enum uint FLAME = 26;
1776     enum uint LAVA = 27;
1777     enum uint FOOTSTEP = 28;
1778     enum uint CLOUD = 29;
1779     enum uint RED_DUST = 30;
1780     enum uint SNOWBALL_POOF = 31;
1781     enum uint SNOW_SHOVEL = 32;
1782     enum uint SLIME = 33;
1783     enum uint HEART = 34;
1784     enum uint BARRIER = 35;
1785     enum uint ITEM_CRACK = 36;
1786     enum uint BLOCK_CRACK = 37;
1787     enum uint BLOCK_DUST = 38;
1788     enum uint DROPLET = 39;
1789     enum uint TAKE = 40;
1790     enum uint MOB_APPEARANCE = 41;
1791     enum uint DRAGON_BREATH = 42;
1792     enum uint ENDROD = 43;
1793     enum uint DAMAGE_INDICATOR = 44;
1794     enum uint SWEEP_ATTACK = 45;
1795     enum uint FALLING_DUST = 46;
1796 
1797     enum string[] __fields = ["particleId", "longDistance", "position", "offset", "data", "count", "additionalData"];
1798 
1799     uint particleId;
1800     bool longDistance;
1801     Vector!(float, "xyz") position;
1802     Vector!(float, "xyz") offset;
1803     float data;
1804     uint count;
1805     @Var uint[2] additionalData;
1806 
1807     this() pure nothrow @safe @nogc {}
1808 
1809     this(uint particleId, bool longDistance=bool.init, Vector!(float, "xyz") position=Vector!(float, "xyz").init, Vector!(float, "xyz") offset=Vector!(float, "xyz").init, float data=float.init, uint count=uint.init, uint[2] additionalData=(uint[2]).init) pure nothrow @safe @nogc
1810     {
1811         this.particleId = particleId;
1812         this.longDistance = longDistance;
1813         this.position = position;
1814         this.offset = offset;
1815         this.data = data;
1816         this.count = count;
1817         this.additionalData = additionalData;
1818     }
1819 
1820     mixin Make;
1821 
1822     public static typeof(this) fromBuffer(ubyte[] buffer)
1823     {
1824         Particle ret = new Particle();
1825         ret.decode(buffer);
1826         return ret;
1827     }
1828 
1829     override string toString()
1830     {
1831         return "Particle(particleId: " ~ std.conv.to!string(this.particleId) ~ ", longDistance: " ~ std.conv.to!string(this.longDistance) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", offset: " ~ std.conv.to!string(this.offset) ~ ", data: " ~ std.conv.to!string(this.data) ~ ", count: " ~ std.conv.to!string(this.count) ~ ", additionalData: " ~ std.conv.to!string(this.additionalData) ~ ")";
1832     }
1833 
1834 }
1835 
1836 class JoinGame : Java340Packet
1837 {
1838 
1839     enum uint ID = 35;
1840 
1841     enum bool CLIENTBOUND = true;
1842     enum bool SERVERBOUND = false;
1843 
1844     // gamemode
1845     enum ubyte SURVIVAL = 0;
1846     enum ubyte CREATIVE = 1;
1847     enum ubyte ADVENTURE = 2;
1848     enum ubyte SPECTATOR = 3;
1849 
1850     // dimension
1851     enum int NETHER = -1;
1852     enum int OVERWORLD = 0;
1853     enum int END = 1;
1854 
1855     // difficulty
1856     enum ubyte PEACEFUL = 0;
1857     enum ubyte EASY = 1;
1858     enum ubyte NORMAL = 2;
1859     enum ubyte HARD = 3;
1860 
1861     // level type
1862     enum string INFINITY = "default";
1863     enum string FLAT = "flat";
1864     enum string AMPLIFIED = "amplified";
1865     enum string LARGE_BIOMES = "largeBiomes";
1866 
1867     enum string[] __fields = ["entityId", "gamemode", "dimension", "difficulty", "maxPlayers", "levelType", "reducedDebug"];
1868 
1869     uint entityId;
1870     ubyte gamemode;
1871     int dimension;
1872     ubyte difficulty;
1873     ubyte maxPlayers;
1874     string levelType;
1875     bool reducedDebug;
1876 
1877     this() pure nothrow @safe @nogc {}
1878 
1879     this(uint entityId, ubyte gamemode=ubyte.init, int dimension=int.init, ubyte difficulty=ubyte.init, ubyte maxPlayers=ubyte.init, string levelType=string.init, bool reducedDebug=bool.init) pure nothrow @safe @nogc
1880     {
1881         this.entityId = entityId;
1882         this.gamemode = gamemode;
1883         this.dimension = dimension;
1884         this.difficulty = difficulty;
1885         this.maxPlayers = maxPlayers;
1886         this.levelType = levelType;
1887         this.reducedDebug = reducedDebug;
1888     }
1889 
1890     mixin Make;
1891 
1892     public static typeof(this) fromBuffer(ubyte[] buffer)
1893     {
1894         JoinGame ret = new JoinGame();
1895         ret.decode(buffer);
1896         return ret;
1897     }
1898 
1899     override string toString()
1900     {
1901         return "JoinGame(entityId: " ~ std.conv.to!string(this.entityId) ~ ", gamemode: " ~ std.conv.to!string(this.gamemode) ~ ", dimension: " ~ std.conv.to!string(this.dimension) ~ ", difficulty: " ~ std.conv.to!string(this.difficulty) ~ ", maxPlayers: " ~ std.conv.to!string(this.maxPlayers) ~ ", levelType: " ~ std.conv.to!string(this.levelType) ~ ", reducedDebug: " ~ std.conv.to!string(this.reducedDebug) ~ ")";
1902     }
1903 
1904 }
1905 
1906 class Map : Java340Packet
1907 {
1908 
1909     enum uint ID = 36;
1910 
1911     enum bool CLIENTBOUND = true;
1912     enum bool SERVERBOUND = false;
1913 
1914     enum string[] __fields = ["mapId", "scale", "showIcons", "icons", "colums", "rows", "offset", "data"];
1915 
1916     @Var uint mapId;
1917     ubyte scale;
1918     bool showIcons;
1919     soupply.java340.types.Icon[] icons;
1920     ubyte colums;
1921     ubyte rows;
1922     Vector!(ubyte, "xz") offset;
1923     ubyte[] data;
1924 
1925     this() pure nothrow @safe @nogc {}
1926 
1927     this(uint mapId, ubyte scale=ubyte.init, bool showIcons=bool.init, soupply.java340.types.Icon[] icons=(soupply.java340.types.Icon[]).init, ubyte colums=ubyte.init, ubyte rows=ubyte.init, Vector!(ubyte, "xz") offset=Vector!(ubyte, "xz").init, ubyte[] data=(ubyte[]).init) pure nothrow @safe @nogc
1928     {
1929         this.mapId = mapId;
1930         this.scale = scale;
1931         this.showIcons = showIcons;
1932         this.icons = icons;
1933         this.colums = colums;
1934         this.rows = rows;
1935         this.offset = offset;
1936         this.data = data;
1937     }
1938 
1939     mixin Make;
1940 
1941     public static typeof(this) fromBuffer(ubyte[] buffer)
1942     {
1943         Map ret = new Map();
1944         ret.decode(buffer);
1945         return ret;
1946     }
1947 
1948     override string toString()
1949     {
1950         return "Map(mapId: " ~ std.conv.to!string(this.mapId) ~ ", scale: " ~ std.conv.to!string(this.scale) ~ ", showIcons: " ~ std.conv.to!string(this.showIcons) ~ ", icons: " ~ std.conv.to!string(this.icons) ~ ", colums: " ~ std.conv.to!string(this.colums) ~ ", rows: " ~ std.conv.to!string(this.rows) ~ ", offset: " ~ std.conv.to!string(this.offset) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")";
1951     }
1952 
1953 }
1954 
1955 class Entity : Java340Packet
1956 {
1957 
1958     enum uint ID = 37;
1959 
1960     enum bool CLIENTBOUND = true;
1961     enum bool SERVERBOUND = false;
1962 
1963     enum string[] __fields = ["entityId"];
1964 
1965     @Var uint entityId;
1966 
1967     this() pure nothrow @safe @nogc {}
1968 
1969     this(uint entityId) pure nothrow @safe @nogc
1970     {
1971         this.entityId = entityId;
1972     }
1973 
1974     mixin Make;
1975 
1976     public static typeof(this) fromBuffer(ubyte[] buffer)
1977     {
1978         Entity ret = new Entity();
1979         ret.decode(buffer);
1980         return ret;
1981     }
1982 
1983     override string toString()
1984     {
1985         return "Entity(entityId: " ~ std.conv.to!string(this.entityId) ~ ")";
1986     }
1987 
1988 }
1989 
1990 class EntityRelativeMove : Java340Packet
1991 {
1992 
1993     enum uint ID = 38;
1994 
1995     enum bool CLIENTBOUND = true;
1996     enum bool SERVERBOUND = false;
1997 
1998     enum string[] __fields = ["entityId", "delta", "onGround"];
1999 
2000     @Var uint entityId;
2001     Vector!(short, "xyz") delta;
2002     bool onGround;
2003 
2004     this() pure nothrow @safe @nogc {}
2005 
2006     this(uint entityId, Vector!(short, "xyz") delta=Vector!(short, "xyz").init, bool onGround=bool.init) pure nothrow @safe @nogc
2007     {
2008         this.entityId = entityId;
2009         this.delta = delta;
2010         this.onGround = onGround;
2011     }
2012 
2013     mixin Make;
2014 
2015     public static typeof(this) fromBuffer(ubyte[] buffer)
2016     {
2017         EntityRelativeMove ret = new EntityRelativeMove();
2018         ret.decode(buffer);
2019         return ret;
2020     }
2021 
2022     override string toString()
2023     {
2024         return "EntityRelativeMove(entityId: " ~ std.conv.to!string(this.entityId) ~ ", delta: " ~ std.conv.to!string(this.delta) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")";
2025     }
2026 
2027 }
2028 
2029 class EntityLookAndRelativeMove : Java340Packet
2030 {
2031 
2032     enum uint ID = 39;
2033 
2034     enum bool CLIENTBOUND = true;
2035     enum bool SERVERBOUND = false;
2036 
2037     enum string[] __fields = ["entityId", "delta", "yaw", "pitch", "onGround"];
2038 
2039     @Var uint entityId;
2040     Vector!(short, "xyz") delta;
2041     ubyte yaw;
2042     ubyte pitch;
2043     bool onGround;
2044 
2045     this() pure nothrow @safe @nogc {}
2046 
2047     this(uint entityId, Vector!(short, "xyz") delta=Vector!(short, "xyz").init, ubyte yaw=ubyte.init, ubyte pitch=ubyte.init, bool onGround=bool.init) pure nothrow @safe @nogc
2048     {
2049         this.entityId = entityId;
2050         this.delta = delta;
2051         this.yaw = yaw;
2052         this.pitch = pitch;
2053         this.onGround = onGround;
2054     }
2055 
2056     mixin Make;
2057 
2058     public static typeof(this) fromBuffer(ubyte[] buffer)
2059     {
2060         EntityLookAndRelativeMove ret = new EntityLookAndRelativeMove();
2061         ret.decode(buffer);
2062         return ret;
2063     }
2064 
2065     override string toString()
2066     {
2067         return "EntityLookAndRelativeMove(entityId: " ~ std.conv.to!string(this.entityId) ~ ", delta: " ~ std.conv.to!string(this.delta) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")";
2068     }
2069 
2070 }
2071 
2072 class EntityLook : Java340Packet
2073 {
2074 
2075     enum uint ID = 40;
2076 
2077     enum bool CLIENTBOUND = true;
2078     enum bool SERVERBOUND = false;
2079 
2080     enum string[] __fields = ["entityId", "yaw", "pitch", "onGround"];
2081 
2082     @Var uint entityId;
2083     ubyte yaw;
2084     ubyte pitch;
2085     bool onGround;
2086 
2087     this() pure nothrow @safe @nogc {}
2088 
2089     this(uint entityId, ubyte yaw=ubyte.init, ubyte pitch=ubyte.init, bool onGround=bool.init) pure nothrow @safe @nogc
2090     {
2091         this.entityId = entityId;
2092         this.yaw = yaw;
2093         this.pitch = pitch;
2094         this.onGround = onGround;
2095     }
2096 
2097     mixin Make;
2098 
2099     public static typeof(this) fromBuffer(ubyte[] buffer)
2100     {
2101         EntityLook ret = new EntityLook();
2102         ret.decode(buffer);
2103         return ret;
2104     }
2105 
2106     override string toString()
2107     {
2108         return "EntityLook(entityId: " ~ std.conv.to!string(this.entityId) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")";
2109     }
2110 
2111 }
2112 
2113 class VehicleMove : Java340Packet
2114 {
2115 
2116     enum uint ID = 41;
2117 
2118     enum bool CLIENTBOUND = true;
2119     enum bool SERVERBOUND = false;
2120 
2121     enum string[] __fields = ["position", "yaw", "pitch"];
2122 
2123     Vector!(double, "xyz") position;
2124     float yaw;
2125     float pitch;
2126 
2127     this() pure nothrow @safe @nogc {}
2128 
2129     this(Vector!(double, "xyz") position, float yaw=float.init, float pitch=float.init) pure nothrow @safe @nogc
2130     {
2131         this.position = position;
2132         this.yaw = yaw;
2133         this.pitch = pitch;
2134     }
2135 
2136     mixin Make;
2137 
2138     public static typeof(this) fromBuffer(ubyte[] buffer)
2139     {
2140         VehicleMove ret = new VehicleMove();
2141         ret.decode(buffer);
2142         return ret;
2143     }
2144 
2145     override string toString()
2146     {
2147         return "VehicleMove(position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ")";
2148     }
2149 
2150 }
2151 
2152 class OpenSignEditor : Java340Packet
2153 {
2154 
2155     enum uint ID = 42;
2156 
2157     enum bool CLIENTBOUND = true;
2158     enum bool SERVERBOUND = false;
2159 
2160     enum string[] __fields = ["position"];
2161 
2162     ulong position;
2163 
2164     this() pure nothrow @safe @nogc {}
2165 
2166     this(ulong position) pure nothrow @safe @nogc
2167     {
2168         this.position = position;
2169     }
2170 
2171     mixin Make;
2172 
2173     public static typeof(this) fromBuffer(ubyte[] buffer)
2174     {
2175         OpenSignEditor ret = new OpenSignEditor();
2176         ret.decode(buffer);
2177         return ret;
2178     }
2179 
2180     override string toString()
2181     {
2182         return "OpenSignEditor(position: " ~ std.conv.to!string(this.position) ~ ")";
2183     }
2184 
2185 }
2186 
2187 class CraftRecipeResponse : Java340Packet
2188 {
2189 
2190     enum uint ID = 43;
2191 
2192     enum bool CLIENTBOUND = true;
2193     enum bool SERVERBOUND = false;
2194 
2195     enum string[] __fields = ["window", "recipe"];
2196 
2197     ubyte window;
2198     @Var uint recipe;
2199 
2200     this() pure nothrow @safe @nogc {}
2201 
2202     this(ubyte window, uint recipe=uint.init) pure nothrow @safe @nogc
2203     {
2204         this.window = window;
2205         this.recipe = recipe;
2206     }
2207 
2208     mixin Make;
2209 
2210     public static typeof(this) fromBuffer(ubyte[] buffer)
2211     {
2212         CraftRecipeResponse ret = new CraftRecipeResponse();
2213         ret.decode(buffer);
2214         return ret;
2215     }
2216 
2217     override string toString()
2218     {
2219         return "CraftRecipeResponse(window: " ~ std.conv.to!string(this.window) ~ ", recipe: " ~ std.conv.to!string(this.recipe) ~ ")";
2220     }
2221 
2222 }
2223 
2224 class PlayerAbilities : Java340Packet
2225 {
2226 
2227     enum uint ID = 44;
2228 
2229     enum bool CLIENTBOUND = true;
2230     enum bool SERVERBOUND = false;
2231 
2232     // flags
2233     enum ubyte INVULNERABLE = 1;
2234     enum ubyte FLYING = 2;
2235     enum ubyte ALLOW_FLYING = 4;
2236     enum ubyte CREATIVE_MODE = 8;
2237 
2238     enum string[] __fields = ["flags", "flyingSpeed", "fovModifier"];
2239 
2240     ubyte flags;
2241     float flyingSpeed;
2242     float fovModifier;
2243 
2244     this() pure nothrow @safe @nogc {}
2245 
2246     this(ubyte flags, float flyingSpeed=float.init, float fovModifier=float.init) pure nothrow @safe @nogc
2247     {
2248         this.flags = flags;
2249         this.flyingSpeed = flyingSpeed;
2250         this.fovModifier = fovModifier;
2251     }
2252 
2253     mixin Make;
2254 
2255     public static typeof(this) fromBuffer(ubyte[] buffer)
2256     {
2257         PlayerAbilities ret = new PlayerAbilities();
2258         ret.decode(buffer);
2259         return ret;
2260     }
2261 
2262     override string toString()
2263     {
2264         return "PlayerAbilities(flags: " ~ std.conv.to!string(this.flags) ~ ", flyingSpeed: " ~ std.conv.to!string(this.flyingSpeed) ~ ", fovModifier: " ~ std.conv.to!string(this.fovModifier) ~ ")";
2265     }
2266 
2267 }
2268 
2269 class CombatEvent : Java340Packet
2270 {
2271 
2272     enum uint ID = 45;
2273 
2274     enum bool CLIENTBOUND = true;
2275     enum bool SERVERBOUND = false;
2276 
2277     enum string[] __fields = ["eventId"];
2278 
2279     ubyte eventId;
2280 
2281     this() pure nothrow @safe @nogc {}
2282 
2283     this(ubyte eventId) pure nothrow @safe @nogc
2284     {
2285         this.eventId = eventId;
2286     }
2287 
2288     mixin Make;
2289 
2290     public static typeof(this) fromBuffer(ubyte[] buffer)
2291     {
2292         CombatEvent ret = new CombatEvent();
2293         ret.decode(buffer);
2294         return ret;
2295     }
2296 
2297     override string toString()
2298     {
2299         return "CombatEvent(eventId: " ~ std.conv.to!string(this.eventId) ~ ")";
2300     }
2301 
2302     enum string variantField = "eventId";
2303 
2304     alias Variants = TypeTuple!(EnterCombat, EndCombat, EntityDead);
2305 
2306     class EnterCombat : Java340Packet
2307     {
2308 
2309         enum typeof(eventId) EVENT_ID = 0;
2310 
2311         enum string[] __fields = [];
2312 
2313         mixin Make;
2314 
2315         override string toString()
2316         {
2317             return "CombatEvent.EnterCombat()";
2318         }
2319 
2320     }
2321 
2322     class EndCombat : Java340Packet
2323     {
2324 
2325         enum typeof(eventId) EVENT_ID = 1;
2326 
2327         enum string[] __fields = ["duration", "entityId"];
2328 
2329         @Var uint duration;
2330         uint entityId;
2331 
2332         this() pure nothrow @safe @nogc {}
2333 
2334         this(uint duration, uint entityId=uint.init) pure nothrow @safe @nogc
2335         {
2336             this.duration = duration;
2337             this.entityId = entityId;
2338         }
2339 
2340         mixin Make;
2341 
2342         override string toString()
2343         {
2344             return "CombatEvent.EndCombat(duration: " ~ std.conv.to!string(this.duration) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ")";
2345         }
2346 
2347     }
2348 
2349     class EntityDead : Java340Packet
2350     {
2351 
2352         enum typeof(eventId) EVENT_ID = 2;
2353 
2354         enum string[] __fields = ["playerId", "entityId", "message"];
2355 
2356         @Var uint playerId;
2357         uint entityId;
2358         string message;
2359 
2360         this() pure nothrow @safe @nogc {}
2361 
2362         this(uint playerId, uint entityId=uint.init, string message=string.init) pure nothrow @safe @nogc
2363         {
2364             this.playerId = playerId;
2365             this.entityId = entityId;
2366             this.message = message;
2367         }
2368 
2369         mixin Make;
2370 
2371         override string toString()
2372         {
2373             return "CombatEvent.EntityDead(playerId: " ~ std.conv.to!string(this.playerId) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ", message: " ~ std.conv.to!string(this.message) ~ ")";
2374         }
2375 
2376     }
2377 
2378 }
2379 
2380 class PlayerListItem : Java340Packet
2381 {
2382 
2383     enum uint ID = 46;
2384 
2385     enum bool CLIENTBOUND = true;
2386     enum bool SERVERBOUND = false;
2387 
2388     enum string[] __fields = ["action"];
2389 
2390     @Var uint action;
2391 
2392     this() pure nothrow @safe @nogc {}
2393 
2394     this(uint action) pure nothrow @safe @nogc
2395     {
2396         this.action = action;
2397     }
2398 
2399     mixin Make;
2400 
2401     public static typeof(this) fromBuffer(ubyte[] buffer)
2402     {
2403         PlayerListItem ret = new PlayerListItem();
2404         ret.decode(buffer);
2405         return ret;
2406     }
2407 
2408     override string toString()
2409     {
2410         return "PlayerListItem(action: " ~ std.conv.to!string(this.action) ~ ")";
2411     }
2412 
2413     enum string variantField = "action";
2414 
2415     alias Variants = TypeTuple!(AddPlayer, UpdateGamemode, UpdateLatency, UpdateDisplayName, RemovePlayer);
2416 
2417     class AddPlayer : Java340Packet
2418     {
2419 
2420         enum typeof(action) ACTION = 0;
2421 
2422         enum string[] __fields = ["players"];
2423 
2424         soupply.java340.types.ListAddPlayer[] players;
2425 
2426         this() pure nothrow @safe @nogc {}
2427 
2428         this(soupply.java340.types.ListAddPlayer[] players) pure nothrow @safe @nogc
2429         {
2430             this.players = players;
2431         }
2432 
2433         mixin Make;
2434 
2435         override string toString()
2436         {
2437             return "PlayerListItem.AddPlayer(players: " ~ std.conv.to!string(this.players) ~ ")";
2438         }
2439 
2440     }
2441 
2442     class UpdateGamemode : Java340Packet
2443     {
2444 
2445         enum typeof(action) ACTION = 1;
2446 
2447         enum string[] __fields = ["players"];
2448 
2449         soupply.java340.types.ListUpdateGamemode[] players;
2450 
2451         this() pure nothrow @safe @nogc {}
2452 
2453         this(soupply.java340.types.ListUpdateGamemode[] players) pure nothrow @safe @nogc
2454         {
2455             this.players = players;
2456         }
2457 
2458         mixin Make;
2459 
2460         override string toString()
2461         {
2462             return "PlayerListItem.UpdateGamemode(players: " ~ std.conv.to!string(this.players) ~ ")";
2463         }
2464 
2465     }
2466 
2467     class UpdateLatency : Java340Packet
2468     {
2469 
2470         enum typeof(action) ACTION = 2;
2471 
2472         enum string[] __fields = ["players"];
2473 
2474         soupply.java340.types.ListUpdateLatency[] players;
2475 
2476         this() pure nothrow @safe @nogc {}
2477 
2478         this(soupply.java340.types.ListUpdateLatency[] players) pure nothrow @safe @nogc
2479         {
2480             this.players = players;
2481         }
2482 
2483         mixin Make;
2484 
2485         override string toString()
2486         {
2487             return "PlayerListItem.UpdateLatency(players: " ~ std.conv.to!string(this.players) ~ ")";
2488         }
2489 
2490     }
2491 
2492     class UpdateDisplayName : Java340Packet
2493     {
2494 
2495         enum typeof(action) ACTION = 3;
2496 
2497         enum string[] __fields = ["players"];
2498 
2499         soupply.java340.types.ListUpdateDisplayName[] players;
2500 
2501         this() pure nothrow @safe @nogc {}
2502 
2503         this(soupply.java340.types.ListUpdateDisplayName[] players) pure nothrow @safe @nogc
2504         {
2505             this.players = players;
2506         }
2507 
2508         mixin Make;
2509 
2510         override string toString()
2511         {
2512             return "PlayerListItem.UpdateDisplayName(players: " ~ std.conv.to!string(this.players) ~ ")";
2513         }
2514 
2515     }
2516 
2517     class RemovePlayer : Java340Packet
2518     {
2519 
2520         enum typeof(action) ACTION = 4;
2521 
2522         enum string[] __fields = ["players"];
2523 
2524         UUID[] players;
2525 
2526         this() pure nothrow @safe @nogc {}
2527 
2528         this(UUID[] players) pure nothrow @safe @nogc
2529         {
2530             this.players = players;
2531         }
2532 
2533         mixin Make;
2534 
2535         override string toString()
2536         {
2537             return "PlayerListItem.RemovePlayer(players: " ~ std.conv.to!string(this.players) ~ ")";
2538         }
2539 
2540     }
2541 
2542 }
2543 
2544 class PlayerPositionAndLook : Java340Packet
2545 {
2546 
2547     enum uint ID = 47;
2548 
2549     enum bool CLIENTBOUND = true;
2550     enum bool SERVERBOUND = false;
2551 
2552     // flags
2553     enum ubyte X = 1;
2554     enum ubyte Y = 2;
2555     enum ubyte Z = 4;
2556     enum ubyte Y_ROTATION = 8;
2557     enum ubyte X_ROTATION = 16;
2558 
2559     enum string[] __fields = ["position", "yaw", "pitch", "flags", "teleportId"];
2560 
2561     Vector!(double, "xyz") position;
2562     float yaw;
2563     float pitch;
2564     ubyte flags;
2565     @Var uint teleportId;
2566 
2567     this() pure nothrow @safe @nogc {}
2568 
2569     this(Vector!(double, "xyz") position, float yaw=float.init, float pitch=float.init, ubyte flags=ubyte.init, uint teleportId=uint.init) pure nothrow @safe @nogc
2570     {
2571         this.position = position;
2572         this.yaw = yaw;
2573         this.pitch = pitch;
2574         this.flags = flags;
2575         this.teleportId = teleportId;
2576     }
2577 
2578     mixin Make;
2579 
2580     public static typeof(this) fromBuffer(ubyte[] buffer)
2581     {
2582         PlayerPositionAndLook ret = new PlayerPositionAndLook();
2583         ret.decode(buffer);
2584         return ret;
2585     }
2586 
2587     override string toString()
2588     {
2589         return "PlayerPositionAndLook(position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", flags: " ~ std.conv.to!string(this.flags) ~ ", teleportId: " ~ std.conv.to!string(this.teleportId) ~ ")";
2590     }
2591 
2592 }
2593 
2594 class UseBed : Java340Packet
2595 {
2596 
2597     enum uint ID = 48;
2598 
2599     enum bool CLIENTBOUND = true;
2600     enum bool SERVERBOUND = false;
2601 
2602     enum string[] __fields = ["entityId", "position"];
2603 
2604     @Var uint entityId;
2605     ulong position;
2606 
2607     this() pure nothrow @safe @nogc {}
2608 
2609     this(uint entityId, ulong position=ulong.init) pure nothrow @safe @nogc
2610     {
2611         this.entityId = entityId;
2612         this.position = position;
2613     }
2614 
2615     mixin Make;
2616 
2617     public static typeof(this) fromBuffer(ubyte[] buffer)
2618     {
2619         UseBed ret = new UseBed();
2620         ret.decode(buffer);
2621         return ret;
2622     }
2623 
2624     override string toString()
2625     {
2626         return "UseBed(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ")";
2627     }
2628 
2629 }
2630 
2631 class UnlockRecipes : Java340Packet
2632 {
2633 
2634     enum uint ID = 49;
2635 
2636     enum bool CLIENTBOUND = true;
2637     enum bool SERVERBOUND = false;
2638 
2639     // action
2640     enum uint ADD = 1;
2641     enum uint REMOVE = 2;
2642     enum uint ADD_WITHOUT_NOTIFICATION = 3;
2643 
2644     enum string[] __fields = ["action", "openBook", "filtering", "recipes", "bookRecipes"];
2645 
2646     @Var uint action;
2647     bool openBook;
2648     bool filtering;
2649     @Var uint[] recipes;
2650     @Condition("action==1||action==3") @Var uint[] bookRecipes;
2651 
2652     this() pure nothrow @safe @nogc {}
2653 
2654     this(uint action, bool openBook=bool.init, bool filtering=bool.init, uint[] recipes=(uint[]).init, uint[] bookRecipes=(uint[]).init) pure nothrow @safe @nogc
2655     {
2656         this.action = action;
2657         this.openBook = openBook;
2658         this.filtering = filtering;
2659         this.recipes = recipes;
2660         this.bookRecipes = bookRecipes;
2661     }
2662 
2663     mixin Make;
2664 
2665     public static typeof(this) fromBuffer(ubyte[] buffer)
2666     {
2667         UnlockRecipes ret = new UnlockRecipes();
2668         ret.decode(buffer);
2669         return ret;
2670     }
2671 
2672     override string toString()
2673     {
2674         return "UnlockRecipes(action: " ~ std.conv.to!string(this.action) ~ ", openBook: " ~ std.conv.to!string(this.openBook) ~ ", filtering: " ~ std.conv.to!string(this.filtering) ~ ", recipes: " ~ std.conv.to!string(this.recipes) ~ ", bookRecipes: " ~ std.conv.to!string(this.bookRecipes) ~ ")";
2675     }
2676 
2677 }
2678 
2679 class DestroyEntities : Java340Packet
2680 {
2681 
2682     enum uint ID = 50;
2683 
2684     enum bool CLIENTBOUND = true;
2685     enum bool SERVERBOUND = false;
2686 
2687     enum string[] __fields = ["entityIds"];
2688 
2689     @Var uint[] entityIds;
2690 
2691     this() pure nothrow @safe @nogc {}
2692 
2693     this(uint[] entityIds) pure nothrow @safe @nogc
2694     {
2695         this.entityIds = entityIds;
2696     }
2697 
2698     mixin Make;
2699 
2700     public static typeof(this) fromBuffer(ubyte[] buffer)
2701     {
2702         DestroyEntities ret = new DestroyEntities();
2703         ret.decode(buffer);
2704         return ret;
2705     }
2706 
2707     override string toString()
2708     {
2709         return "DestroyEntities(entityIds: " ~ std.conv.to!string(this.entityIds) ~ ")";
2710     }
2711 
2712 }
2713 
2714 class RemoveEntityEffect : Java340Packet
2715 {
2716 
2717     enum uint ID = 51;
2718 
2719     enum bool CLIENTBOUND = true;
2720     enum bool SERVERBOUND = false;
2721 
2722     enum string[] __fields = ["entityId", "effectId"];
2723 
2724     @Var uint entityId;
2725     ubyte effectId;
2726 
2727     this() pure nothrow @safe @nogc {}
2728 
2729     this(uint entityId, ubyte effectId=ubyte.init) pure nothrow @safe @nogc
2730     {
2731         this.entityId = entityId;
2732         this.effectId = effectId;
2733     }
2734 
2735     mixin Make;
2736 
2737     public static typeof(this) fromBuffer(ubyte[] buffer)
2738     {
2739         RemoveEntityEffect ret = new RemoveEntityEffect();
2740         ret.decode(buffer);
2741         return ret;
2742     }
2743 
2744     override string toString()
2745     {
2746         return "RemoveEntityEffect(entityId: " ~ std.conv.to!string(this.entityId) ~ ", effectId: " ~ std.conv.to!string(this.effectId) ~ ")";
2747     }
2748 
2749 }
2750 
2751 class ResourcePackSend : Java340Packet
2752 {
2753 
2754     enum uint ID = 52;
2755 
2756     enum bool CLIENTBOUND = true;
2757     enum bool SERVERBOUND = false;
2758 
2759     enum string[] __fields = ["url", "hash"];
2760 
2761     string url;
2762     string hash;
2763 
2764     this() pure nothrow @safe @nogc {}
2765 
2766     this(string url, string hash=string.init) pure nothrow @safe @nogc
2767     {
2768         this.url = url;
2769         this.hash = hash;
2770     }
2771 
2772     mixin Make;
2773 
2774     public static typeof(this) fromBuffer(ubyte[] buffer)
2775     {
2776         ResourcePackSend ret = new ResourcePackSend();
2777         ret.decode(buffer);
2778         return ret;
2779     }
2780 
2781     override string toString()
2782     {
2783         return "ResourcePackSend(url: " ~ std.conv.to!string(this.url) ~ ", hash: " ~ std.conv.to!string(this.hash) ~ ")";
2784     }
2785 
2786 }
2787 
2788 class Respawn : Java340Packet
2789 {
2790 
2791     enum uint ID = 53;
2792 
2793     enum bool CLIENTBOUND = true;
2794     enum bool SERVERBOUND = false;
2795 
2796     // dimension
2797     enum int NETHER = -1;
2798     enum int OVERWORLD = 0;
2799     enum int END = 1;
2800 
2801     // difficulty
2802     enum ubyte PEACEFUL = 0;
2803     enum ubyte EASY = 1;
2804     enum ubyte NORMAL = 2;
2805     enum ubyte HARD = 3;
2806 
2807     // gamemode
2808     enum ubyte SURVIVAL = 0;
2809     enum ubyte CREATIVE = 1;
2810     enum ubyte ADVENTURE = 2;
2811     enum ubyte SPECTATOR = 3;
2812 
2813     // level type
2814     enum string INFINITY = "default";
2815     enum string FLAT = "flat";
2816     enum string AMPLIFIED = "amplified";
2817     enum string LARGE_BIOMES = "largeBiomes";
2818 
2819     enum string[] __fields = ["dimension", "difficulty", "gamemode", "levelType"];
2820 
2821     int dimension;
2822     ubyte difficulty;
2823     ubyte gamemode;
2824     string levelType;
2825 
2826     this() pure nothrow @safe @nogc {}
2827 
2828     this(int dimension, ubyte difficulty=ubyte.init, ubyte gamemode=ubyte.init, string levelType=string.init) pure nothrow @safe @nogc
2829     {
2830         this.dimension = dimension;
2831         this.difficulty = difficulty;
2832         this.gamemode = gamemode;
2833         this.levelType = levelType;
2834     }
2835 
2836     mixin Make;
2837 
2838     public static typeof(this) fromBuffer(ubyte[] buffer)
2839     {
2840         Respawn ret = new Respawn();
2841         ret.decode(buffer);
2842         return ret;
2843     }
2844 
2845     override string toString()
2846     {
2847         return "Respawn(dimension: " ~ std.conv.to!string(this.dimension) ~ ", difficulty: " ~ std.conv.to!string(this.difficulty) ~ ", gamemode: " ~ std.conv.to!string(this.gamemode) ~ ", levelType: " ~ std.conv.to!string(this.levelType) ~ ")";
2848     }
2849 
2850 }
2851 
2852 class EntityHeadLook : Java340Packet
2853 {
2854 
2855     enum uint ID = 54;
2856 
2857     enum bool CLIENTBOUND = true;
2858     enum bool SERVERBOUND = false;
2859 
2860     enum string[] __fields = ["entityId", "headYaw"];
2861 
2862     @Var uint entityId;
2863     ubyte headYaw;
2864 
2865     this() pure nothrow @safe @nogc {}
2866 
2867     this(uint entityId, ubyte headYaw=ubyte.init) pure nothrow @safe @nogc
2868     {
2869         this.entityId = entityId;
2870         this.headYaw = headYaw;
2871     }
2872 
2873     mixin Make;
2874 
2875     public static typeof(this) fromBuffer(ubyte[] buffer)
2876     {
2877         EntityHeadLook ret = new EntityHeadLook();
2878         ret.decode(buffer);
2879         return ret;
2880     }
2881 
2882     override string toString()
2883     {
2884         return "EntityHeadLook(entityId: " ~ std.conv.to!string(this.entityId) ~ ", headYaw: " ~ std.conv.to!string(this.headYaw) ~ ")";
2885     }
2886 
2887 }
2888 
2889 class AdvancementProgress : Java340Packet
2890 {
2891 
2892     enum uint ID = 55;
2893 
2894     enum bool CLIENTBOUND = true;
2895     enum bool SERVERBOUND = false;
2896 
2897     enum string[] __fields = ["notEmpty", "identifier"];
2898 
2899     bool notEmpty;
2900     @Condition("notEmpty==true") string identifier;
2901 
2902     this() pure nothrow @safe @nogc {}
2903 
2904     this(bool notEmpty, string identifier=string.init) pure nothrow @safe @nogc
2905     {
2906         this.notEmpty = notEmpty;
2907         this.identifier = identifier;
2908     }
2909 
2910     mixin Make;
2911 
2912     public static typeof(this) fromBuffer(ubyte[] buffer)
2913     {
2914         AdvancementProgress ret = new AdvancementProgress();
2915         ret.decode(buffer);
2916         return ret;
2917     }
2918 
2919     override string toString()
2920     {
2921         return "AdvancementProgress(notEmpty: " ~ std.conv.to!string(this.notEmpty) ~ ", identifier: " ~ std.conv.to!string(this.identifier) ~ ")";
2922     }
2923 
2924 }
2925 
2926 class WorldBorder : Java340Packet
2927 {
2928 
2929     enum uint ID = 56;
2930 
2931     enum bool CLIENTBOUND = true;
2932     enum bool SERVERBOUND = false;
2933 
2934     enum string[] __fields = ["action"];
2935 
2936     @Var uint action;
2937 
2938     this() pure nothrow @safe @nogc {}
2939 
2940     this(uint action) pure nothrow @safe @nogc
2941     {
2942         this.action = action;
2943     }
2944 
2945     mixin Make;
2946 
2947     public static typeof(this) fromBuffer(ubyte[] buffer)
2948     {
2949         WorldBorder ret = new WorldBorder();
2950         ret.decode(buffer);
2951         return ret;
2952     }
2953 
2954     override string toString()
2955     {
2956         return "WorldBorder(action: " ~ std.conv.to!string(this.action) ~ ")";
2957     }
2958 
2959     enum string variantField = "action";
2960 
2961     alias Variants = TypeTuple!(SetSize, LerpSize, SetCenter, Initialize, SetWarningTime, SetWarningBlocks);
2962 
2963     class SetSize : Java340Packet
2964     {
2965 
2966         enum typeof(action) ACTION = 0;
2967 
2968         enum string[] __fields = ["diameter"];
2969 
2970         double diameter;
2971 
2972         this() pure nothrow @safe @nogc {}
2973 
2974         this(double diameter) pure nothrow @safe @nogc
2975         {
2976             this.diameter = diameter;
2977         }
2978 
2979         mixin Make;
2980 
2981         override string toString()
2982         {
2983             return "WorldBorder.SetSize(diameter: " ~ std.conv.to!string(this.diameter) ~ ")";
2984         }
2985 
2986     }
2987 
2988     class LerpSize : Java340Packet
2989     {
2990 
2991         enum typeof(action) ACTION = 1;
2992 
2993         enum string[] __fields = ["oldDiameter", "newDiameter", "speed"];
2994 
2995         double oldDiameter;
2996         double newDiameter;
2997         @Var ulong speed;
2998 
2999         this() pure nothrow @safe @nogc {}
3000 
3001         this(double oldDiameter, double newDiameter=double.init, ulong speed=ulong.init) pure nothrow @safe @nogc
3002         {
3003             this.oldDiameter = oldDiameter;
3004             this.newDiameter = newDiameter;
3005             this.speed = speed;
3006         }
3007 
3008         mixin Make;
3009 
3010         override string toString()
3011         {
3012             return "WorldBorder.LerpSize(oldDiameter: " ~ std.conv.to!string(this.oldDiameter) ~ ", newDiameter: " ~ std.conv.to!string(this.newDiameter) ~ ", speed: " ~ std.conv.to!string(this.speed) ~ ")";
3013         }
3014 
3015     }
3016 
3017     class SetCenter : Java340Packet
3018     {
3019 
3020         enum typeof(action) ACTION = 2;
3021 
3022         enum string[] __fields = ["center"];
3023 
3024         Vector!(double, "xyz") center;
3025 
3026         this() pure nothrow @safe @nogc {}
3027 
3028         this(Vector!(double, "xyz") center) pure nothrow @safe @nogc
3029         {
3030             this.center = center;
3031         }
3032 
3033         mixin Make;
3034 
3035         override string toString()
3036         {
3037             return "WorldBorder.SetCenter(center: " ~ std.conv.to!string(this.center) ~ ")";
3038         }
3039 
3040     }
3041 
3042     class Initialize : Java340Packet
3043     {
3044 
3045         enum typeof(action) ACTION = 3;
3046 
3047         enum string[] __fields = ["center", "oldDiameter", "newDiameter", "speed", "portalTeleportBoundary", "warningTime", "warningBlocks"];
3048 
3049         Vector!(double, "xyz") center;
3050         double oldDiameter;
3051         double newDiameter;
3052         @Var ulong speed;
3053         @Var uint portalTeleportBoundary;
3054         @Var uint warningTime;
3055         @Var uint warningBlocks;
3056 
3057         this() pure nothrow @safe @nogc {}
3058 
3059         this(Vector!(double, "xyz") center, double oldDiameter=double.init, double newDiameter=double.init, ulong speed=ulong.init, uint portalTeleportBoundary=uint.init, uint warningTime=uint.init, uint warningBlocks=uint.init) pure nothrow @safe @nogc
3060         {
3061             this.center = center;
3062             this.oldDiameter = oldDiameter;
3063             this.newDiameter = newDiameter;
3064             this.speed = speed;
3065             this.portalTeleportBoundary = portalTeleportBoundary;
3066             this.warningTime = warningTime;
3067             this.warningBlocks = warningBlocks;
3068         }
3069 
3070         mixin Make;
3071 
3072         override string toString()
3073         {
3074             return "WorldBorder.Initialize(center: " ~ std.conv.to!string(this.center) ~ ", oldDiameter: " ~ std.conv.to!string(this.oldDiameter) ~ ", newDiameter: " ~ std.conv.to!string(this.newDiameter) ~ ", speed: " ~ std.conv.to!string(this.speed) ~ ", portalTeleportBoundary: " ~ std.conv.to!string(this.portalTeleportBoundary) ~ ", warningTime: " ~ std.conv.to!string(this.warningTime) ~ ", warningBlocks: " ~ std.conv.to!string(this.warningBlocks) ~ ")";
3075         }
3076 
3077     }
3078 
3079     class SetWarningTime : Java340Packet
3080     {
3081 
3082         enum typeof(action) ACTION = 4;
3083 
3084         enum string[] __fields = ["warningTime"];
3085 
3086         @Var uint warningTime;
3087 
3088         this() pure nothrow @safe @nogc {}
3089 
3090         this(uint warningTime) pure nothrow @safe @nogc
3091         {
3092             this.warningTime = warningTime;
3093         }
3094 
3095         mixin Make;
3096 
3097         override string toString()
3098         {
3099             return "WorldBorder.SetWarningTime(warningTime: " ~ std.conv.to!string(this.warningTime) ~ ")";
3100         }
3101 
3102     }
3103 
3104     class SetWarningBlocks : Java340Packet
3105     {
3106 
3107         enum typeof(action) ACTION = 5;
3108 
3109         enum string[] __fields = ["warningBlocks"];
3110 
3111         @Var uint warningBlocks;
3112 
3113         this() pure nothrow @safe @nogc {}
3114 
3115         this(uint warningBlocks) pure nothrow @safe @nogc
3116         {
3117             this.warningBlocks = warningBlocks;
3118         }
3119 
3120         mixin Make;
3121 
3122         override string toString()
3123         {
3124             return "WorldBorder.SetWarningBlocks(warningBlocks: " ~ std.conv.to!string(this.warningBlocks) ~ ")";
3125         }
3126 
3127     }
3128 
3129 }
3130 
3131 class Camera : Java340Packet
3132 {
3133 
3134     enum uint ID = 57;
3135 
3136     enum bool CLIENTBOUND = true;
3137     enum bool SERVERBOUND = false;
3138 
3139     enum string[] __fields = ["entityId"];
3140 
3141     @Var uint entityId;
3142 
3143     this() pure nothrow @safe @nogc {}
3144 
3145     this(uint entityId) pure nothrow @safe @nogc
3146     {
3147         this.entityId = entityId;
3148     }
3149 
3150     mixin Make;
3151 
3152     public static typeof(this) fromBuffer(ubyte[] buffer)
3153     {
3154         Camera ret = new Camera();
3155         ret.decode(buffer);
3156         return ret;
3157     }
3158 
3159     override string toString()
3160     {
3161         return "Camera(entityId: " ~ std.conv.to!string(this.entityId) ~ ")";
3162     }
3163 
3164 }
3165 
3166 class HeldItemChange : Java340Packet
3167 {
3168 
3169     enum uint ID = 58;
3170 
3171     enum bool CLIENTBOUND = true;
3172     enum bool SERVERBOUND = false;
3173 
3174     enum string[] __fields = ["slot"];
3175 
3176     ubyte slot;
3177 
3178     this() pure nothrow @safe @nogc {}
3179 
3180     this(ubyte slot) pure nothrow @safe @nogc
3181     {
3182         this.slot = slot;
3183     }
3184 
3185     mixin Make;
3186 
3187     public static typeof(this) fromBuffer(ubyte[] buffer)
3188     {
3189         HeldItemChange ret = new HeldItemChange();
3190         ret.decode(buffer);
3191         return ret;
3192     }
3193 
3194     override string toString()
3195     {
3196         return "HeldItemChange(slot: " ~ std.conv.to!string(this.slot) ~ ")";
3197     }
3198 
3199 }
3200 
3201 class DisplayScoreboard : Java340Packet
3202 {
3203 
3204     enum uint ID = 59;
3205 
3206     enum bool CLIENTBOUND = true;
3207     enum bool SERVERBOUND = false;
3208 
3209     // position
3210     enum ubyte LIST = 0;
3211     enum ubyte SIDEBAR = 1;
3212     enum ubyte BELOW_NAME = 2;
3213 
3214     enum string[] __fields = ["position", "scoreName"];
3215 
3216     ubyte position;
3217     string scoreName;
3218 
3219     this() pure nothrow @safe @nogc {}
3220 
3221     this(ubyte position, string scoreName=string.init) pure nothrow @safe @nogc
3222     {
3223         this.position = position;
3224         this.scoreName = scoreName;
3225     }
3226 
3227     mixin Make;
3228 
3229     public static typeof(this) fromBuffer(ubyte[] buffer)
3230     {
3231         DisplayScoreboard ret = new DisplayScoreboard();
3232         ret.decode(buffer);
3233         return ret;
3234     }
3235 
3236     override string toString()
3237     {
3238         return "DisplayScoreboard(position: " ~ std.conv.to!string(this.position) ~ ", scoreName: " ~ std.conv.to!string(this.scoreName) ~ ")";
3239     }
3240 
3241 }
3242 
3243 class EntityMetadata : Java340Packet
3244 {
3245 
3246     enum uint ID = 60;
3247 
3248     enum bool CLIENTBOUND = true;
3249     enum bool SERVERBOUND = false;
3250 
3251     enum string[] __fields = ["entityId", "metadata"];
3252 
3253     @Var uint entityId;
3254     Metadata metadata;
3255 
3256     this() pure nothrow @safe @nogc {}
3257 
3258     this(uint entityId, Metadata metadata=Metadata.init) pure nothrow @safe @nogc
3259     {
3260         this.entityId = entityId;
3261         this.metadata = metadata;
3262     }
3263 
3264     mixin Make;
3265 
3266     public static typeof(this) fromBuffer(ubyte[] buffer)
3267     {
3268         EntityMetadata ret = new EntityMetadata();
3269         ret.decode(buffer);
3270         return ret;
3271     }
3272 
3273     override string toString()
3274     {
3275         return "EntityMetadata(entityId: " ~ std.conv.to!string(this.entityId) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ")";
3276     }
3277 
3278 }
3279 
3280 class AttachEntity : Java340Packet
3281 {
3282 
3283     enum uint ID = 61;
3284 
3285     enum bool CLIENTBOUND = true;
3286     enum bool SERVERBOUND = false;
3287 
3288     enum string[] __fields = ["target", "holder"];
3289 
3290     uint target;
3291     uint holder;
3292 
3293     this() pure nothrow @safe @nogc {}
3294 
3295     this(uint target, uint holder=uint.init) pure nothrow @safe @nogc
3296     {
3297         this.target = target;
3298         this.holder = holder;
3299     }
3300 
3301     mixin Make;
3302 
3303     public static typeof(this) fromBuffer(ubyte[] buffer)
3304     {
3305         AttachEntity ret = new AttachEntity();
3306         ret.decode(buffer);
3307         return ret;
3308     }
3309 
3310     override string toString()
3311     {
3312         return "AttachEntity(target: " ~ std.conv.to!string(this.target) ~ ", holder: " ~ std.conv.to!string(this.holder) ~ ")";
3313     }
3314 
3315 }
3316 
3317 class EntityVelocity : Java340Packet
3318 {
3319 
3320     enum uint ID = 62;
3321 
3322     enum bool CLIENTBOUND = true;
3323     enum bool SERVERBOUND = false;
3324 
3325     enum string[] __fields = ["entityId", "velocity"];
3326 
3327     @Var uint entityId;
3328     Vector!(short, "xyz") velocity;
3329 
3330     this() pure nothrow @safe @nogc {}
3331 
3332     this(uint entityId, Vector!(short, "xyz") velocity=Vector!(short, "xyz").init) pure nothrow @safe @nogc
3333     {
3334         this.entityId = entityId;
3335         this.velocity = velocity;
3336     }
3337 
3338     mixin Make;
3339 
3340     public static typeof(this) fromBuffer(ubyte[] buffer)
3341     {
3342         EntityVelocity ret = new EntityVelocity();
3343         ret.decode(buffer);
3344         return ret;
3345     }
3346 
3347     override string toString()
3348     {
3349         return "EntityVelocity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", velocity: " ~ std.conv.to!string(this.velocity) ~ ")";
3350     }
3351 
3352 }
3353 
3354 class EntityEquipment : Java340Packet
3355 {
3356 
3357     enum uint ID = 63;
3358 
3359     enum bool CLIENTBOUND = true;
3360     enum bool SERVERBOUND = false;
3361 
3362     enum string[] __fields = ["entityId", "slot", "item"];
3363 
3364     @Var uint entityId;
3365     @Var uint slot;
3366     soupply.java340.types.Slot item;
3367 
3368     this() pure nothrow @safe @nogc {}
3369 
3370     this(uint entityId, uint slot=uint.init, soupply.java340.types.Slot item=soupply.java340.types.Slot.init) pure nothrow @safe @nogc
3371     {
3372         this.entityId = entityId;
3373         this.slot = slot;
3374         this.item = item;
3375     }
3376 
3377     mixin Make;
3378 
3379     public static typeof(this) fromBuffer(ubyte[] buffer)
3380     {
3381         EntityEquipment ret = new EntityEquipment();
3382         ret.decode(buffer);
3383         return ret;
3384     }
3385 
3386     override string toString()
3387     {
3388         return "EntityEquipment(entityId: " ~ std.conv.to!string(this.entityId) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ", item: " ~ std.conv.to!string(this.item) ~ ")";
3389     }
3390 
3391 }
3392 
3393 class SetExperience : Java340Packet
3394 {
3395 
3396     enum uint ID = 64;
3397 
3398     enum bool CLIENTBOUND = true;
3399     enum bool SERVERBOUND = false;
3400 
3401     enum string[] __fields = ["experience", "level", "totalExperience"];
3402 
3403     float experience;
3404     @Var uint level;
3405     @Var uint totalExperience;
3406 
3407     this() pure nothrow @safe @nogc {}
3408 
3409     this(float experience, uint level=uint.init, uint totalExperience=uint.init) pure nothrow @safe @nogc
3410     {
3411         this.experience = experience;
3412         this.level = level;
3413         this.totalExperience = totalExperience;
3414     }
3415 
3416     mixin Make;
3417 
3418     public static typeof(this) fromBuffer(ubyte[] buffer)
3419     {
3420         SetExperience ret = new SetExperience();
3421         ret.decode(buffer);
3422         return ret;
3423     }
3424 
3425     override string toString()
3426     {
3427         return "SetExperience(experience: " ~ std.conv.to!string(this.experience) ~ ", level: " ~ std.conv.to!string(this.level) ~ ", totalExperience: " ~ std.conv.to!string(this.totalExperience) ~ ")";
3428     }
3429 
3430 }
3431 
3432 class UpdateHealth : Java340Packet
3433 {
3434 
3435     enum uint ID = 65;
3436 
3437     enum bool CLIENTBOUND = true;
3438     enum bool SERVERBOUND = false;
3439 
3440     enum string[] __fields = ["health", "hunger", "saturation"];
3441 
3442     float health;
3443     @Var uint hunger;
3444     float saturation;
3445 
3446     this() pure nothrow @safe @nogc {}
3447 
3448     this(float health, uint hunger=uint.init, float saturation=float.init) pure nothrow @safe @nogc
3449     {
3450         this.health = health;
3451         this.hunger = hunger;
3452         this.saturation = saturation;
3453     }
3454 
3455     mixin Make;
3456 
3457     public static typeof(this) fromBuffer(ubyte[] buffer)
3458     {
3459         UpdateHealth ret = new UpdateHealth();
3460         ret.decode(buffer);
3461         return ret;
3462     }
3463 
3464     override string toString()
3465     {
3466         return "UpdateHealth(health: " ~ std.conv.to!string(this.health) ~ ", hunger: " ~ std.conv.to!string(this.hunger) ~ ", saturation: " ~ std.conv.to!string(this.saturation) ~ ")";
3467     }
3468 
3469 }
3470 
3471 class ScoreboardObjective : Java340Packet
3472 {
3473 
3474     enum uint ID = 66;
3475 
3476     enum bool CLIENTBOUND = true;
3477     enum bool SERVERBOUND = false;
3478 
3479     // mode
3480     enum ubyte CREATE = 0;
3481     enum ubyte REMOVE = 1;
3482     enum ubyte UPDATE = 2;
3483 
3484     // type
3485     enum string NUMERIC = "integer";
3486     enum string GRAPHIC = "hearts";
3487 
3488     enum string[] __fields = ["name", "mode", "value", "type"];
3489 
3490     string name;
3491     ubyte mode;
3492     @Condition("mode!=1") string value;
3493     @Condition("mode!=1") string type;
3494 
3495     this() pure nothrow @safe @nogc {}
3496 
3497     this(string name, ubyte mode=ubyte.init, string value=string.init, string type=string.init) pure nothrow @safe @nogc
3498     {
3499         this.name = name;
3500         this.mode = mode;
3501         this.value = value;
3502         this.type = type;
3503     }
3504 
3505     mixin Make;
3506 
3507     public static typeof(this) fromBuffer(ubyte[] buffer)
3508     {
3509         ScoreboardObjective ret = new ScoreboardObjective();
3510         ret.decode(buffer);
3511         return ret;
3512     }
3513 
3514     override string toString()
3515     {
3516         return "ScoreboardObjective(name: " ~ std.conv.to!string(this.name) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ", value: " ~ std.conv.to!string(this.value) ~ ", type: " ~ std.conv.to!string(this.type) ~ ")";
3517     }
3518 
3519 }
3520 
3521 class SetPassengers : Java340Packet
3522 {
3523 
3524     enum uint ID = 67;
3525 
3526     enum bool CLIENTBOUND = true;
3527     enum bool SERVERBOUND = false;
3528 
3529     enum string[] __fields = ["entityId", "passengers"];
3530 
3531     @Var uint entityId;
3532     @Var uint[] passengers;
3533 
3534     this() pure nothrow @safe @nogc {}
3535 
3536     this(uint entityId, uint[] passengers=(uint[]).init) pure nothrow @safe @nogc
3537     {
3538         this.entityId = entityId;
3539         this.passengers = passengers;
3540     }
3541 
3542     mixin Make;
3543 
3544     public static typeof(this) fromBuffer(ubyte[] buffer)
3545     {
3546         SetPassengers ret = new SetPassengers();
3547         ret.decode(buffer);
3548         return ret;
3549     }
3550 
3551     override string toString()
3552     {
3553         return "SetPassengers(entityId: " ~ std.conv.to!string(this.entityId) ~ ", passengers: " ~ std.conv.to!string(this.passengers) ~ ")";
3554     }
3555 
3556 }
3557 
3558 class Teams : Java340Packet
3559 {
3560 
3561     enum uint ID = 68;
3562 
3563     enum bool CLIENTBOUND = true;
3564     enum bool SERVERBOUND = false;
3565 
3566     enum string[] __fields = ["name", "mode"];
3567 
3568     string name;
3569     ubyte mode;
3570 
3571     this() pure nothrow @safe @nogc {}
3572 
3573     this(string name, ubyte mode=ubyte.init) pure nothrow @safe @nogc
3574     {
3575         this.name = name;
3576         this.mode = mode;
3577     }
3578 
3579     mixin Make;
3580 
3581     public static typeof(this) fromBuffer(ubyte[] buffer)
3582     {
3583         Teams ret = new Teams();
3584         ret.decode(buffer);
3585         return ret;
3586     }
3587 
3588     override string toString()
3589     {
3590         return "Teams(name: " ~ std.conv.to!string(this.name) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ")";
3591     }
3592 
3593     enum string variantField = "mode";
3594 
3595     alias Variants = TypeTuple!(CreateTeam, RemoveTeam, UpdateTeamInfo, AddPlayers, RemovePlayers);
3596 
3597     class CreateTeam : Java340Packet
3598     {
3599 
3600         enum typeof(mode) MODE = 0;
3601 
3602         // friendly flags
3603         enum ubyte FRIENDLY_FIRE = 1;
3604         enum ubyte SEE_TEAM_INVISIBLE_PLAYERS = 2;
3605 
3606         // nametag visibility
3607         enum string ALWAYS_HIDE = "always";
3608         enum string HIDE_OTHER_TEAMS = "hideOtherTeams";
3609         enum string HIDE_OWN_TEAM = "hideOwnTeam";
3610         enum string NEVER_HIDE = "never";
3611 
3612         // collision rule
3613         enum string ALWAYS_PUSH = "always";
3614         enum string PUSH_OTHER_TEAMS = "pushOtherTeams";
3615         enum string PUSH_OWN_TEAM = "pushOwnTeam";
3616         enum string NEVER_PUSH = "never";
3617 
3618         enum string[] __fields = ["displayName", "prefix", "suffix", "friendlyFlags", "nametagVisibility", "collisionRule", "color", "players"];
3619 
3620         string displayName;
3621         string prefix;
3622         string suffix;
3623         ubyte friendlyFlags;
3624         string nametagVisibility;
3625         string collisionRule;
3626         ubyte color;
3627         string[] players;
3628 
3629         this() pure nothrow @safe @nogc {}
3630 
3631         this(string displayName, string prefix=string.init, string suffix=string.init, ubyte friendlyFlags=ubyte.init, string nametagVisibility=string.init, string collisionRule=string.init, ubyte color=ubyte.init, string[] players=(string[]).init) pure nothrow @safe @nogc
3632         {
3633             this.displayName = displayName;
3634             this.prefix = prefix;
3635             this.suffix = suffix;
3636             this.friendlyFlags = friendlyFlags;
3637             this.nametagVisibility = nametagVisibility;
3638             this.collisionRule = collisionRule;
3639             this.color = color;
3640             this.players = players;
3641         }
3642 
3643         mixin Make;
3644 
3645         override string toString()
3646         {
3647             return "Teams.CreateTeam(displayName: " ~ std.conv.to!string(this.displayName) ~ ", prefix: " ~ std.conv.to!string(this.prefix) ~ ", suffix: " ~ std.conv.to!string(this.suffix) ~ ", friendlyFlags: " ~ std.conv.to!string(this.friendlyFlags) ~ ", nametagVisibility: " ~ std.conv.to!string(this.nametagVisibility) ~ ", collisionRule: " ~ std.conv.to!string(this.collisionRule) ~ ", color: " ~ std.conv.to!string(this.color) ~ ", players: " ~ std.conv.to!string(this.players) ~ ")";
3648         }
3649 
3650     }
3651 
3652     class RemoveTeam : Java340Packet
3653     {
3654 
3655         enum typeof(mode) MODE = 1;
3656 
3657         enum string[] __fields = [];
3658 
3659         mixin Make;
3660 
3661         override string toString()
3662         {
3663             return "Teams.RemoveTeam()";
3664         }
3665 
3666     }
3667 
3668     class UpdateTeamInfo : Java340Packet
3669     {
3670 
3671         enum typeof(mode) MODE = 2;
3672 
3673         // friendly flags
3674         enum ubyte FRIENDLY_FIRE = 1;
3675         enum ubyte SEE_TEAM_INVISIBLE_PLAYERS = 2;
3676 
3677         // nametag visibility
3678         enum string ALWAYS_HIDE = "always";
3679         enum string HIDE_OTHER_TEAMS = "hideOtherTeams";
3680         enum string HIDE_OWN_TEAM = "hideOwnTeam";
3681         enum string NEVER_HIDE = "never";
3682 
3683         // collision rule
3684         enum string ALWAYS_PUSH = "always";
3685         enum string PUSH_OTHER_TEAMS = "pushOtherTeams";
3686         enum string PUSH_OWN_TEAM = "pushOwnTeam";
3687         enum string NEVER_PUSH = "never";
3688 
3689         enum string[] __fields = ["displayName", "prefix", "suffix", "friendlyFlags", "nametagVisibility", "collisionRule", "color"];
3690 
3691         string displayName;
3692         string prefix;
3693         string suffix;
3694         ubyte friendlyFlags;
3695         string nametagVisibility;
3696         string collisionRule;
3697         ubyte color;
3698 
3699         this() pure nothrow @safe @nogc {}
3700 
3701         this(string displayName, string prefix=string.init, string suffix=string.init, ubyte friendlyFlags=ubyte.init, string nametagVisibility=string.init, string collisionRule=string.init, ubyte color=ubyte.init) pure nothrow @safe @nogc
3702         {
3703             this.displayName = displayName;
3704             this.prefix = prefix;
3705             this.suffix = suffix;
3706             this.friendlyFlags = friendlyFlags;
3707             this.nametagVisibility = nametagVisibility;
3708             this.collisionRule = collisionRule;
3709             this.color = color;
3710         }
3711 
3712         mixin Make;
3713 
3714         override string toString()
3715         {
3716             return "Teams.UpdateTeamInfo(displayName: " ~ std.conv.to!string(this.displayName) ~ ", prefix: " ~ std.conv.to!string(this.prefix) ~ ", suffix: " ~ std.conv.to!string(this.suffix) ~ ", friendlyFlags: " ~ std.conv.to!string(this.friendlyFlags) ~ ", nametagVisibility: " ~ std.conv.to!string(this.nametagVisibility) ~ ", collisionRule: " ~ std.conv.to!string(this.collisionRule) ~ ", color: " ~ std.conv.to!string(this.color) ~ ")";
3717         }
3718 
3719     }
3720 
3721     class AddPlayers : Java340Packet
3722     {
3723 
3724         enum typeof(mode) MODE = 3;
3725 
3726         enum string[] __fields = ["players"];
3727 
3728         string[] players;
3729 
3730         this() pure nothrow @safe @nogc {}
3731 
3732         this(string[] players) pure nothrow @safe @nogc
3733         {
3734             this.players = players;
3735         }
3736 
3737         mixin Make;
3738 
3739         override string toString()
3740         {
3741             return "Teams.AddPlayers(players: " ~ std.conv.to!string(this.players) ~ ")";
3742         }
3743 
3744     }
3745 
3746     class RemovePlayers : Java340Packet
3747     {
3748 
3749         enum typeof(mode) MODE = 4;
3750 
3751         enum string[] __fields = ["players"];
3752 
3753         string[] players;
3754 
3755         this() pure nothrow @safe @nogc {}
3756 
3757         this(string[] players) pure nothrow @safe @nogc
3758         {
3759             this.players = players;
3760         }
3761 
3762         mixin Make;
3763 
3764         override string toString()
3765         {
3766             return "Teams.RemovePlayers(players: " ~ std.conv.to!string(this.players) ~ ")";
3767         }
3768 
3769     }
3770 
3771 }
3772 
3773 class UpdateScore : Java340Packet
3774 {
3775 
3776     enum uint ID = 69;
3777 
3778     enum bool CLIENTBOUND = true;
3779     enum bool SERVERBOUND = false;
3780 
3781     // action
3782     enum ubyte UPDATE = 0;
3783     enum ubyte REMOVE = 1;
3784 
3785     enum string[] __fields = ["scoreName", "action", "objectiveName", "value"];
3786 
3787     string scoreName;
3788     ubyte action;
3789     string objectiveName;
3790     @Condition("action==0") @Var uint value;
3791 
3792     this() pure nothrow @safe @nogc {}
3793 
3794     this(string scoreName, ubyte action=ubyte.init, string objectiveName=string.init, uint value=uint.init) pure nothrow @safe @nogc
3795     {
3796         this.scoreName = scoreName;
3797         this.action = action;
3798         this.objectiveName = objectiveName;
3799         this.value = value;
3800     }
3801 
3802     mixin Make;
3803 
3804     public static typeof(this) fromBuffer(ubyte[] buffer)
3805     {
3806         UpdateScore ret = new UpdateScore();
3807         ret.decode(buffer);
3808         return ret;
3809     }
3810 
3811     override string toString()
3812     {
3813         return "UpdateScore(scoreName: " ~ std.conv.to!string(this.scoreName) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", objectiveName: " ~ std.conv.to!string(this.objectiveName) ~ ", value: " ~ std.conv.to!string(this.value) ~ ")";
3814     }
3815 
3816 }
3817 
3818 class SpawnPosition : Java340Packet
3819 {
3820 
3821     enum uint ID = 70;
3822 
3823     enum bool CLIENTBOUND = true;
3824     enum bool SERVERBOUND = false;
3825 
3826     enum string[] __fields = ["position"];
3827 
3828     ulong position;
3829 
3830     this() pure nothrow @safe @nogc {}
3831 
3832     this(ulong position) pure nothrow @safe @nogc
3833     {
3834         this.position = position;
3835     }
3836 
3837     mixin Make;
3838 
3839     public static typeof(this) fromBuffer(ubyte[] buffer)
3840     {
3841         SpawnPosition ret = new SpawnPosition();
3842         ret.decode(buffer);
3843         return ret;
3844     }
3845 
3846     override string toString()
3847     {
3848         return "SpawnPosition(position: " ~ std.conv.to!string(this.position) ~ ")";
3849     }
3850 
3851 }
3852 
3853 class TimeUpdate : Java340Packet
3854 {
3855 
3856     enum uint ID = 71;
3857 
3858     enum bool CLIENTBOUND = true;
3859     enum bool SERVERBOUND = false;
3860 
3861     enum string[] __fields = ["worldAge", "time"];
3862 
3863     ulong worldAge;
3864     long time;
3865 
3866     this() pure nothrow @safe @nogc {}
3867 
3868     this(ulong worldAge, long time=long.init) pure nothrow @safe @nogc
3869     {
3870         this.worldAge = worldAge;
3871         this.time = time;
3872     }
3873 
3874     mixin Make;
3875 
3876     public static typeof(this) fromBuffer(ubyte[] buffer)
3877     {
3878         TimeUpdate ret = new TimeUpdate();
3879         ret.decode(buffer);
3880         return ret;
3881     }
3882 
3883     override string toString()
3884     {
3885         return "TimeUpdate(worldAge: " ~ std.conv.to!string(this.worldAge) ~ ", time: " ~ std.conv.to!string(this.time) ~ ")";
3886     }
3887 
3888 }
3889 
3890 class Title : Java340Packet
3891 {
3892 
3893     enum uint ID = 72;
3894 
3895     enum bool CLIENTBOUND = true;
3896     enum bool SERVERBOUND = false;
3897 
3898     enum string[] __fields = ["action"];
3899 
3900     @Var uint action;
3901 
3902     this() pure nothrow @safe @nogc {}
3903 
3904     this(uint action) pure nothrow @safe @nogc
3905     {
3906         this.action = action;
3907     }
3908 
3909     mixin Make;
3910 
3911     public static typeof(this) fromBuffer(ubyte[] buffer)
3912     {
3913         Title ret = new Title();
3914         ret.decode(buffer);
3915         return ret;
3916     }
3917 
3918     override string toString()
3919     {
3920         return "Title(action: " ~ std.conv.to!string(this.action) ~ ")";
3921     }
3922 
3923     enum string variantField = "action";
3924 
3925     alias Variants = TypeTuple!(SetTitle, SetSubtitle, SetActionBar, SetTimings, Hide, Reset);
3926 
3927     class SetTitle : Java340Packet
3928     {
3929 
3930         enum typeof(action) ACTION = 0;
3931 
3932         enum string[] __fields = ["text"];
3933 
3934         string text;
3935 
3936         this() pure nothrow @safe @nogc {}
3937 
3938         this(string text) pure nothrow @safe @nogc
3939         {
3940             this.text = text;
3941         }
3942 
3943         mixin Make;
3944 
3945         override string toString()
3946         {
3947             return "Title.SetTitle(text: " ~ std.conv.to!string(this.text) ~ ")";
3948         }
3949 
3950     }
3951 
3952     class SetSubtitle : Java340Packet
3953     {
3954 
3955         enum typeof(action) ACTION = 1;
3956 
3957         enum string[] __fields = ["text"];
3958 
3959         string text;
3960 
3961         this() pure nothrow @safe @nogc {}
3962 
3963         this(string text) pure nothrow @safe @nogc
3964         {
3965             this.text = text;
3966         }
3967 
3968         mixin Make;
3969 
3970         override string toString()
3971         {
3972             return "Title.SetSubtitle(text: " ~ std.conv.to!string(this.text) ~ ")";
3973         }
3974 
3975     }
3976 
3977     class SetActionBar : Java340Packet
3978     {
3979 
3980         enum typeof(action) ACTION = 2;
3981 
3982         enum string[] __fields = ["text"];
3983 
3984         string text;
3985 
3986         this() pure nothrow @safe @nogc {}
3987 
3988         this(string text) pure nothrow @safe @nogc
3989         {
3990             this.text = text;
3991         }
3992 
3993         mixin Make;
3994 
3995         override string toString()
3996         {
3997             return "Title.SetActionBar(text: " ~ std.conv.to!string(this.text) ~ ")";
3998         }
3999 
4000     }
4001 
4002     class SetTimings : Java340Packet
4003     {
4004 
4005         enum typeof(action) ACTION = 3;
4006 
4007         enum string[] __fields = ["fadeIn", "stay", "fadeOut"];
4008 
4009         uint fadeIn;
4010         uint stay;
4011         uint fadeOut;
4012 
4013         this() pure nothrow @safe @nogc {}
4014 
4015         this(uint fadeIn, uint stay=uint.init, uint fadeOut=uint.init) pure nothrow @safe @nogc
4016         {
4017             this.fadeIn = fadeIn;
4018             this.stay = stay;
4019             this.fadeOut = fadeOut;
4020         }
4021 
4022         mixin Make;
4023 
4024         override string toString()
4025         {
4026             return "Title.SetTimings(fadeIn: " ~ std.conv.to!string(this.fadeIn) ~ ", stay: " ~ std.conv.to!string(this.stay) ~ ", fadeOut: " ~ std.conv.to!string(this.fadeOut) ~ ")";
4027         }
4028 
4029     }
4030 
4031     class Hide : Java340Packet
4032     {
4033 
4034         enum typeof(action) ACTION = 4;
4035 
4036         enum string[] __fields = [];
4037 
4038         mixin Make;
4039 
4040         override string toString()
4041         {
4042             return "Title.Hide()";
4043         }
4044 
4045     }
4046 
4047     class Reset : Java340Packet
4048     {
4049 
4050         enum typeof(action) ACTION = 5;
4051 
4052         enum string[] __fields = [];
4053 
4054         mixin Make;
4055 
4056         override string toString()
4057         {
4058             return "Title.Reset()";
4059         }
4060 
4061     }
4062 
4063 }
4064 
4065 class SoundEffect : Java340Packet
4066 {
4067 
4068     enum uint ID = 73;
4069 
4070     enum bool CLIENTBOUND = true;
4071     enum bool SERVERBOUND = false;
4072 
4073     enum string[] __fields = ["soundId", "category", "position", "volume", "pitch"];
4074 
4075     @Var uint soundId;
4076     @Var uint category;
4077     Vector!(int, "xyz") position;
4078     float volume;
4079     float pitch;
4080 
4081     this() pure nothrow @safe @nogc {}
4082 
4083     this(uint soundId, uint category=uint.init, Vector!(int, "xyz") position=Vector!(int, "xyz").init, float volume=float.init, float pitch=float.init) pure nothrow @safe @nogc
4084     {
4085         this.soundId = soundId;
4086         this.category = category;
4087         this.position = position;
4088         this.volume = volume;
4089         this.pitch = pitch;
4090     }
4091 
4092     mixin Make;
4093 
4094     public static typeof(this) fromBuffer(ubyte[] buffer)
4095     {
4096         SoundEffect ret = new SoundEffect();
4097         ret.decode(buffer);
4098         return ret;
4099     }
4100 
4101     override string toString()
4102     {
4103         return "SoundEffect(soundId: " ~ std.conv.to!string(this.soundId) ~ ", category: " ~ std.conv.to!string(this.category) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", volume: " ~ std.conv.to!string(this.volume) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ")";
4104     }
4105 
4106 }
4107 
4108 class PlayerListHeaderAndFooter : Java340Packet
4109 {
4110 
4111     enum uint ID = 74;
4112 
4113     enum bool CLIENTBOUND = true;
4114     enum bool SERVERBOUND = false;
4115 
4116     enum string[] __fields = ["header", "footer"];
4117 
4118     string header;
4119     string footer;
4120 
4121     this() pure nothrow @safe @nogc {}
4122 
4123     this(string header, string footer=string.init) pure nothrow @safe @nogc
4124     {
4125         this.header = header;
4126         this.footer = footer;
4127     }
4128 
4129     mixin Make;
4130 
4131     public static typeof(this) fromBuffer(ubyte[] buffer)
4132     {
4133         PlayerListHeaderAndFooter ret = new PlayerListHeaderAndFooter();
4134         ret.decode(buffer);
4135         return ret;
4136     }
4137 
4138     override string toString()
4139     {
4140         return "PlayerListHeaderAndFooter(header: " ~ std.conv.to!string(this.header) ~ ", footer: " ~ std.conv.to!string(this.footer) ~ ")";
4141     }
4142 
4143 }
4144 
4145 class CollectItem : Java340Packet
4146 {
4147 
4148     enum uint ID = 75;
4149 
4150     enum bool CLIENTBOUND = true;
4151     enum bool SERVERBOUND = false;
4152 
4153     enum string[] __fields = ["collected", "collector", "count"];
4154 
4155     @Var uint collected;
4156     @Var uint collector;
4157     @Var uint count;
4158 
4159     this() pure nothrow @safe @nogc {}
4160 
4161     this(uint collected, uint collector=uint.init, uint count=uint.init) pure nothrow @safe @nogc
4162     {
4163         this.collected = collected;
4164         this.collector = collector;
4165         this.count = count;
4166     }
4167 
4168     mixin Make;
4169 
4170     public static typeof(this) fromBuffer(ubyte[] buffer)
4171     {
4172         CollectItem ret = new CollectItem();
4173         ret.decode(buffer);
4174         return ret;
4175     }
4176 
4177     override string toString()
4178     {
4179         return "CollectItem(collected: " ~ std.conv.to!string(this.collected) ~ ", collector: " ~ std.conv.to!string(this.collector) ~ ", count: " ~ std.conv.to!string(this.count) ~ ")";
4180     }
4181 
4182 }
4183 
4184 class EntityTeleport : Java340Packet
4185 {
4186 
4187     enum uint ID = 76;
4188 
4189     enum bool CLIENTBOUND = true;
4190     enum bool SERVERBOUND = false;
4191 
4192     enum string[] __fields = ["entityId", "position", "yaw", "pitch", "onGround"];
4193 
4194     @Var uint entityId;
4195     Vector!(double, "xyz") position;
4196     ubyte yaw;
4197     ubyte pitch;
4198     bool onGround;
4199 
4200     this() pure nothrow @safe @nogc {}
4201 
4202     this(uint entityId, Vector!(double, "xyz") position=Vector!(double, "xyz").init, ubyte yaw=ubyte.init, ubyte pitch=ubyte.init, bool onGround=bool.init) pure nothrow @safe @nogc
4203     {
4204         this.entityId = entityId;
4205         this.position = position;
4206         this.yaw = yaw;
4207         this.pitch = pitch;
4208         this.onGround = onGround;
4209     }
4210 
4211     mixin Make;
4212 
4213     public static typeof(this) fromBuffer(ubyte[] buffer)
4214     {
4215         EntityTeleport ret = new EntityTeleport();
4216         ret.decode(buffer);
4217         return ret;
4218     }
4219 
4220     override string toString()
4221     {
4222         return "EntityTeleport(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", yaw: " ~ std.conv.to!string(this.yaw) ~ ", pitch: " ~ std.conv.to!string(this.pitch) ~ ", onGround: " ~ std.conv.to!string(this.onGround) ~ ")";
4223     }
4224 
4225 }
4226 
4227 class Advencements : Java340Packet
4228 {
4229 
4230     enum uint ID = 77;
4231 
4232     enum bool CLIENTBOUND = true;
4233     enum bool SERVERBOUND = false;
4234 
4235     enum string[] __fields = [];
4236 
4237     mixin Make;
4238 
4239     public static typeof(this) fromBuffer(ubyte[] buffer)
4240     {
4241         Advencements ret = new Advencements();
4242         ret.decode(buffer);
4243         return ret;
4244     }
4245 
4246     override string toString()
4247     {
4248         return "Advencements()";
4249     }
4250 
4251 }
4252 
4253 class EntityProperties : Java340Packet
4254 {
4255 
4256     enum uint ID = 78;
4257 
4258     enum bool CLIENTBOUND = true;
4259     enum bool SERVERBOUND = false;
4260 
4261     enum string[] __fields = ["entityId", "attributes"];
4262 
4263     @Var uint entityId;
4264     @Length!uint soupply.java340.types.Attribute[] attributes;
4265 
4266     this() pure nothrow @safe @nogc {}
4267 
4268     this(uint entityId, soupply.java340.types.Attribute[] attributes=(soupply.java340.types.Attribute[]).init) pure nothrow @safe @nogc
4269     {
4270         this.entityId = entityId;
4271         this.attributes = attributes;
4272     }
4273 
4274     mixin Make;
4275 
4276     public static typeof(this) fromBuffer(ubyte[] buffer)
4277     {
4278         EntityProperties ret = new EntityProperties();
4279         ret.decode(buffer);
4280         return ret;
4281     }
4282 
4283     override string toString()
4284     {
4285         return "EntityProperties(entityId: " ~ std.conv.to!string(this.entityId) ~ ", attributes: " ~ std.conv.to!string(this.attributes) ~ ")";
4286     }
4287 
4288 }
4289 
4290 class EntityEffect : Java340Packet
4291 {
4292 
4293     enum uint ID = 79;
4294 
4295     enum bool CLIENTBOUND = true;
4296     enum bool SERVERBOUND = false;
4297 
4298     // effect id
4299     enum ubyte SPEED = 1;
4300     enum ubyte SLOWNESS = 2;
4301     enum ubyte HASTE = 3;
4302     enum ubyte MINING_FATIGUE = 4;
4303     enum ubyte STRENGTH = 5;
4304     enum ubyte INSTANT_HEALTH = 6;
4305     enum ubyte INSTANT_DAMAGE = 7;
4306     enum ubyte JUMP_BOOST = 8;
4307     enum ubyte NAUSEA = 9;
4308     enum ubyte REGENERATION = 10;
4309     enum ubyte RESISTANCE = 11;
4310     enum ubyte FIRE_RESISTANCE = 12;
4311     enum ubyte WATER_BREATHING = 13;
4312     enum ubyte INVISIBILITY = 14;
4313     enum ubyte BLINDNESS = 15;
4314     enum ubyte NIGHT_VISION = 16;
4315     enum ubyte HUNGER = 17;
4316     enum ubyte WEAKNESS = 18;
4317     enum ubyte POISON = 19;
4318     enum ubyte WITHER = 20;
4319     enum ubyte HEALTH_BOOST = 21;
4320     enum ubyte ABSORPTION = 22;
4321     enum ubyte SATURATION = 23;
4322     enum ubyte GLOWING = 24;
4323     enum ubyte LEVITATION = 25;
4324     enum ubyte LUCK = 26;
4325     enum ubyte BAD_LUCK = 27;
4326 
4327     // flags
4328     enum ubyte AMBIENT = 1;
4329     enum ubyte SHOW_PARTICLES = 2;
4330 
4331     enum string[] __fields = ["entityId", "effectId", "amplifier", "duration", "flags"];
4332 
4333     @Var uint entityId;
4334     ubyte effectId;
4335     ubyte amplifier;
4336     @Var uint duration;
4337     ubyte flags;
4338 
4339     this() pure nothrow @safe @nogc {}
4340 
4341     this(uint entityId, ubyte effectId=ubyte.init, ubyte amplifier=ubyte.init, uint duration=uint.init, ubyte flags=ubyte.init) pure nothrow @safe @nogc
4342     {
4343         this.entityId = entityId;
4344         this.effectId = effectId;
4345         this.amplifier = amplifier;
4346         this.duration = duration;
4347         this.flags = flags;
4348     }
4349 
4350     mixin Make;
4351 
4352     public static typeof(this) fromBuffer(ubyte[] buffer)
4353     {
4354         EntityEffect ret = new EntityEffect();
4355         ret.decode(buffer);
4356         return ret;
4357     }
4358 
4359     override string toString()
4360     {
4361         return "EntityEffect(entityId: " ~ std.conv.to!string(this.entityId) ~ ", effectId: " ~ std.conv.to!string(this.effectId) ~ ", amplifier: " ~ std.conv.to!string(this.amplifier) ~ ", duration: " ~ std.conv.to!string(this.duration) ~ ", flags: " ~ std.conv.to!string(this.flags) ~ ")";
4362     }
4363 
4364 }