1 /*
2  * This file has been automatically generated by Soupply and released under the MIT license.
3  * Generated from data/java335.xml
4  */
5 module soupply.java335.protocol.clientbound;
6 
7 static import std.conv;
8 import std.typetuple : TypeTuple;
9 import xpacket;
10 
11 import soupply.util;
12 import soupply.java335.metadata : Metadata;
13 import soupply.java335.packet : Java335Packet;
14 
15 static import soupply.java335.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, 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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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.java335.types.Statistic[] statistics;
350 
351     this() pure nothrow @safe @nogc {}
352 
353     this(soupply.java335.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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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.java335.types.BlockChange[] changes;
927 
928     this() pure nothrow @safe @nogc {}
929 
930     this(Vector!(int, "xz") chunk, soupply.java335.types.BlockChange[] changes=(soupply.java335.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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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.java335.types.Slot[] slots;
1079 
1080     this() pure nothrow @safe @nogc {}
1081 
1082     this(ubyte window, soupply.java335.types.Slot[] slots=(soupply.java335.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 : Java335Packet
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 : Java335Packet
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.java335.types.Slot item;
1177 
1178     this() pure nothrow @safe @nogc {}
1179 
1180     this(ubyte window, ushort slot=ushort.init, soupply.java335.types.Slot item=soupply.java335.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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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     @Var uint id;
1581 
1582     this() pure nothrow @safe @nogc {}
1583 
1584     this(uint 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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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.java335.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.java335.types.Icon[] icons=(soupply.java335.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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 : Java335Packet
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 PlayerAbilities : Java335Packet
2188 {
2189 
2190     enum uint ID = 43;
2191 
2192     enum bool CLIENTBOUND = true;
2193     enum bool SERVERBOUND = false;
2194 
2195     // flags
2196     enum ubyte INVULNERABLE = 1;
2197     enum ubyte FLYING = 2;
2198     enum ubyte ALLOW_FLYING = 4;
2199     enum ubyte CREATIVE_MODE = 8;
2200 
2201     enum string[] __fields = ["flags", "flyingSpeed", "fovModifier"];
2202 
2203     ubyte flags;
2204     float flyingSpeed;
2205     float fovModifier;
2206 
2207     this() pure nothrow @safe @nogc {}
2208 
2209     this(ubyte flags, float flyingSpeed=float.init, float fovModifier=float.init) pure nothrow @safe @nogc
2210     {
2211         this.flags = flags;
2212         this.flyingSpeed = flyingSpeed;
2213         this.fovModifier = fovModifier;
2214     }
2215 
2216     mixin Make;
2217 
2218     public static typeof(this) fromBuffer(ubyte[] buffer)
2219     {
2220         PlayerAbilities ret = new PlayerAbilities();
2221         ret.decode(buffer);
2222         return ret;
2223     }
2224 
2225     override string toString()
2226     {
2227         return "PlayerAbilities(flags: " ~ std.conv.to!string(this.flags) ~ ", flyingSpeed: " ~ std.conv.to!string(this.flyingSpeed) ~ ", fovModifier: " ~ std.conv.to!string(this.fovModifier) ~ ")";
2228     }
2229 
2230 }
2231 
2232 class CombatEvent : Java335Packet
2233 {
2234 
2235     enum uint ID = 44;
2236 
2237     enum bool CLIENTBOUND = true;
2238     enum bool SERVERBOUND = false;
2239 
2240     enum string[] __fields = ["eventId"];
2241 
2242     ubyte eventId;
2243 
2244     this() pure nothrow @safe @nogc {}
2245 
2246     this(ubyte eventId) pure nothrow @safe @nogc
2247     {
2248         this.eventId = eventId;
2249     }
2250 
2251     mixin Make;
2252 
2253     public static typeof(this) fromBuffer(ubyte[] buffer)
2254     {
2255         CombatEvent ret = new CombatEvent();
2256         ret.decode(buffer);
2257         return ret;
2258     }
2259 
2260     override string toString()
2261     {
2262         return "CombatEvent(eventId: " ~ std.conv.to!string(this.eventId) ~ ")";
2263     }
2264 
2265     enum string variantField = "eventId";
2266 
2267     alias Variants = TypeTuple!(EnterCombat, EndCombat, EntityDead);
2268 
2269     class EnterCombat : Java335Packet
2270     {
2271 
2272         enum typeof(eventId) EVENT_ID = 0;
2273 
2274         enum string[] __fields = [];
2275 
2276         mixin Make;
2277 
2278         override string toString()
2279         {
2280             return "CombatEvent.EnterCombat()";
2281         }
2282 
2283     }
2284 
2285     class EndCombat : Java335Packet
2286     {
2287 
2288         enum typeof(eventId) EVENT_ID = 1;
2289 
2290         enum string[] __fields = ["duration", "entityId"];
2291 
2292         @Var uint duration;
2293         uint entityId;
2294 
2295         this() pure nothrow @safe @nogc {}
2296 
2297         this(uint duration, uint entityId=uint.init) pure nothrow @safe @nogc
2298         {
2299             this.duration = duration;
2300             this.entityId = entityId;
2301         }
2302 
2303         mixin Make;
2304 
2305         override string toString()
2306         {
2307             return "CombatEvent.EndCombat(duration: " ~ std.conv.to!string(this.duration) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ")";
2308         }
2309 
2310     }
2311 
2312     class EntityDead : Java335Packet
2313     {
2314 
2315         enum typeof(eventId) EVENT_ID = 2;
2316 
2317         enum string[] __fields = ["playerId", "entityId", "message"];
2318 
2319         @Var uint playerId;
2320         uint entityId;
2321         string message;
2322 
2323         this() pure nothrow @safe @nogc {}
2324 
2325         this(uint playerId, uint entityId=uint.init, string message=string.init) pure nothrow @safe @nogc
2326         {
2327             this.playerId = playerId;
2328             this.entityId = entityId;
2329             this.message = message;
2330         }
2331 
2332         mixin Make;
2333 
2334         override string toString()
2335         {
2336             return "CombatEvent.EntityDead(playerId: " ~ std.conv.to!string(this.playerId) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ", message: " ~ std.conv.to!string(this.message) ~ ")";
2337         }
2338 
2339     }
2340 
2341 }
2342 
2343 class PlayerListItem : Java335Packet
2344 {
2345 
2346     enum uint ID = 45;
2347 
2348     enum bool CLIENTBOUND = true;
2349     enum bool SERVERBOUND = false;
2350 
2351     enum string[] __fields = ["action"];
2352 
2353     @Var uint action;
2354 
2355     this() pure nothrow @safe @nogc {}
2356 
2357     this(uint action) pure nothrow @safe @nogc
2358     {
2359         this.action = action;
2360     }
2361 
2362     mixin Make;
2363 
2364     public static typeof(this) fromBuffer(ubyte[] buffer)
2365     {
2366         PlayerListItem ret = new PlayerListItem();
2367         ret.decode(buffer);
2368         return ret;
2369     }
2370 
2371     override string toString()
2372     {
2373         return "PlayerListItem(action: " ~ std.conv.to!string(this.action) ~ ")";
2374     }
2375 
2376     enum string variantField = "action";
2377 
2378     alias Variants = TypeTuple!(AddPlayer, UpdateGamemode, UpdateLatency, UpdateDisplayName, RemovePlayer);
2379 
2380     class AddPlayer : Java335Packet
2381     {
2382 
2383         enum typeof(action) ACTION = 0;
2384 
2385         enum string[] __fields = ["players"];
2386 
2387         soupply.java335.types.ListAddPlayer[] players;
2388 
2389         this() pure nothrow @safe @nogc {}
2390 
2391         this(soupply.java335.types.ListAddPlayer[] players) pure nothrow @safe @nogc
2392         {
2393             this.players = players;
2394         }
2395 
2396         mixin Make;
2397 
2398         override string toString()
2399         {
2400             return "PlayerListItem.AddPlayer(players: " ~ std.conv.to!string(this.players) ~ ")";
2401         }
2402 
2403     }
2404 
2405     class UpdateGamemode : Java335Packet
2406     {
2407 
2408         enum typeof(action) ACTION = 1;
2409 
2410         enum string[] __fields = ["players"];
2411 
2412         soupply.java335.types.ListUpdateGamemode[] players;
2413 
2414         this() pure nothrow @safe @nogc {}
2415 
2416         this(soupply.java335.types.ListUpdateGamemode[] players) pure nothrow @safe @nogc
2417         {
2418             this.players = players;
2419         }
2420 
2421         mixin Make;
2422 
2423         override string toString()
2424         {
2425             return "PlayerListItem.UpdateGamemode(players: " ~ std.conv.to!string(this.players) ~ ")";
2426         }
2427 
2428     }
2429 
2430     class UpdateLatency : Java335Packet
2431     {
2432 
2433         enum typeof(action) ACTION = 2;
2434 
2435         enum string[] __fields = ["players"];
2436 
2437         soupply.java335.types.ListUpdateLatency[] players;
2438 
2439         this() pure nothrow @safe @nogc {}
2440 
2441         this(soupply.java335.types.ListUpdateLatency[] players) pure nothrow @safe @nogc
2442         {
2443             this.players = players;
2444         }
2445 
2446         mixin Make;
2447 
2448         override string toString()
2449         {
2450             return "PlayerListItem.UpdateLatency(players: " ~ std.conv.to!string(this.players) ~ ")";
2451         }
2452 
2453     }
2454 
2455     class UpdateDisplayName : Java335Packet
2456     {
2457 
2458         enum typeof(action) ACTION = 3;
2459 
2460         enum string[] __fields = ["players"];
2461 
2462         soupply.java335.types.ListUpdateDisplayName[] players;
2463 
2464         this() pure nothrow @safe @nogc {}
2465 
2466         this(soupply.java335.types.ListUpdateDisplayName[] players) pure nothrow @safe @nogc
2467         {
2468             this.players = players;
2469         }
2470 
2471         mixin Make;
2472 
2473         override string toString()
2474         {
2475             return "PlayerListItem.UpdateDisplayName(players: " ~ std.conv.to!string(this.players) ~ ")";
2476         }
2477 
2478     }
2479 
2480     class RemovePlayer : Java335Packet
2481     {
2482 
2483         enum typeof(action) ACTION = 4;
2484 
2485         enum string[] __fields = ["players"];
2486 
2487         UUID[] players;
2488 
2489         this() pure nothrow @safe @nogc {}
2490 
2491         this(UUID[] players) pure nothrow @safe @nogc
2492         {
2493             this.players = players;
2494         }
2495 
2496         mixin Make;
2497 
2498         override string toString()
2499         {
2500             return "PlayerListItem.RemovePlayer(players: " ~ std.conv.to!string(this.players) ~ ")";
2501         }
2502 
2503     }
2504 
2505 }
2506 
2507 class PlayerPositionAndLook : Java335Packet
2508 {
2509 
2510     enum uint ID = 46;
2511 
2512     enum bool CLIENTBOUND = true;
2513     enum bool SERVERBOUND = false;
2514 
2515     // flags
2516     enum ubyte X = 1;
2517     enum ubyte Y = 2;
2518     enum ubyte Z = 4;
2519     enum ubyte Y_ROTATION = 8;
2520     enum ubyte X_ROTATION = 16;
2521 
2522     enum string[] __fields = ["position", "yaw", "pitch", "flags", "teleportId"];
2523 
2524     Vector!(double, "xyz") position;
2525     float yaw;
2526     float pitch;
2527     ubyte flags;
2528     @Var uint teleportId;
2529 
2530     this() pure nothrow @safe @nogc {}
2531 
2532     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
2533     {
2534         this.position = position;
2535         this.yaw = yaw;
2536         this.pitch = pitch;
2537         this.flags = flags;
2538         this.teleportId = teleportId;
2539     }
2540 
2541     mixin Make;
2542 
2543     public static typeof(this) fromBuffer(ubyte[] buffer)
2544     {
2545         PlayerPositionAndLook ret = new PlayerPositionAndLook();
2546         ret.decode(buffer);
2547         return ret;
2548     }
2549 
2550     override string toString()
2551     {
2552         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) ~ ")";
2553     }
2554 
2555 }
2556 
2557 class UseBed : Java335Packet
2558 {
2559 
2560     enum uint ID = 47;
2561 
2562     enum bool CLIENTBOUND = true;
2563     enum bool SERVERBOUND = false;
2564 
2565     enum string[] __fields = ["entityId", "position"];
2566 
2567     @Var uint entityId;
2568     ulong position;
2569 
2570     this() pure nothrow @safe @nogc {}
2571 
2572     this(uint entityId, ulong position=ulong.init) pure nothrow @safe @nogc
2573     {
2574         this.entityId = entityId;
2575         this.position = position;
2576     }
2577 
2578     mixin Make;
2579 
2580     public static typeof(this) fromBuffer(ubyte[] buffer)
2581     {
2582         UseBed ret = new UseBed();
2583         ret.decode(buffer);
2584         return ret;
2585     }
2586 
2587     override string toString()
2588     {
2589         return "UseBed(entityId: " ~ std.conv.to!string(this.entityId) ~ ", position: " ~ std.conv.to!string(this.position) ~ ")";
2590     }
2591 
2592 }
2593 
2594 class UnlockRecipes : Java335Packet
2595 {
2596 
2597     enum uint ID = 48;
2598 
2599     enum bool CLIENTBOUND = true;
2600     enum bool SERVERBOUND = false;
2601 
2602     // action
2603     enum uint ADD = 1;
2604     enum uint REMOVE = 2;
2605     enum uint ADD_WITHOUT_NOTIFICATION = 3;
2606 
2607     enum string[] __fields = ["action", "openBook", "filtering", "recipes", "bookRecipes"];
2608 
2609     @Var uint action;
2610     bool openBook;
2611     bool filtering;
2612     @Var uint[] recipes;
2613     @Condition("action==1||action==3") @Var uint[] bookRecipes;
2614 
2615     this() pure nothrow @safe @nogc {}
2616 
2617     this(uint action, bool openBook=bool.init, bool filtering=bool.init, uint[] recipes=(uint[]).init, uint[] bookRecipes=(uint[]).init) pure nothrow @safe @nogc
2618     {
2619         this.action = action;
2620         this.openBook = openBook;
2621         this.filtering = filtering;
2622         this.recipes = recipes;
2623         this.bookRecipes = bookRecipes;
2624     }
2625 
2626     mixin Make;
2627 
2628     public static typeof(this) fromBuffer(ubyte[] buffer)
2629     {
2630         UnlockRecipes ret = new UnlockRecipes();
2631         ret.decode(buffer);
2632         return ret;
2633     }
2634 
2635     override string toString()
2636     {
2637         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) ~ ")";
2638     }
2639 
2640 }
2641 
2642 class DestroyEntities : Java335Packet
2643 {
2644 
2645     enum uint ID = 49;
2646 
2647     enum bool CLIENTBOUND = true;
2648     enum bool SERVERBOUND = false;
2649 
2650     enum string[] __fields = ["entityIds"];
2651 
2652     @Var uint[] entityIds;
2653 
2654     this() pure nothrow @safe @nogc {}
2655 
2656     this(uint[] entityIds) pure nothrow @safe @nogc
2657     {
2658         this.entityIds = entityIds;
2659     }
2660 
2661     mixin Make;
2662 
2663     public static typeof(this) fromBuffer(ubyte[] buffer)
2664     {
2665         DestroyEntities ret = new DestroyEntities();
2666         ret.decode(buffer);
2667         return ret;
2668     }
2669 
2670     override string toString()
2671     {
2672         return "DestroyEntities(entityIds: " ~ std.conv.to!string(this.entityIds) ~ ")";
2673     }
2674 
2675 }
2676 
2677 class RemoveEntityEffect : Java335Packet
2678 {
2679 
2680     enum uint ID = 50;
2681 
2682     enum bool CLIENTBOUND = true;
2683     enum bool SERVERBOUND = false;
2684 
2685     enum string[] __fields = ["entityId", "effectId"];
2686 
2687     @Var uint entityId;
2688     ubyte effectId;
2689 
2690     this() pure nothrow @safe @nogc {}
2691 
2692     this(uint entityId, ubyte effectId=ubyte.init) pure nothrow @safe @nogc
2693     {
2694         this.entityId = entityId;
2695         this.effectId = effectId;
2696     }
2697 
2698     mixin Make;
2699 
2700     public static typeof(this) fromBuffer(ubyte[] buffer)
2701     {
2702         RemoveEntityEffect ret = new RemoveEntityEffect();
2703         ret.decode(buffer);
2704         return ret;
2705     }
2706 
2707     override string toString()
2708     {
2709         return "RemoveEntityEffect(entityId: " ~ std.conv.to!string(this.entityId) ~ ", effectId: " ~ std.conv.to!string(this.effectId) ~ ")";
2710     }
2711 
2712 }
2713 
2714 class ResourcePackSend : Java335Packet
2715 {
2716 
2717     enum uint ID = 51;
2718 
2719     enum bool CLIENTBOUND = true;
2720     enum bool SERVERBOUND = false;
2721 
2722     enum string[] __fields = ["url", "hash"];
2723 
2724     string url;
2725     string hash;
2726 
2727     this() pure nothrow @safe @nogc {}
2728 
2729     this(string url, string hash=string.init) pure nothrow @safe @nogc
2730     {
2731         this.url = url;
2732         this.hash = hash;
2733     }
2734 
2735     mixin Make;
2736 
2737     public static typeof(this) fromBuffer(ubyte[] buffer)
2738     {
2739         ResourcePackSend ret = new ResourcePackSend();
2740         ret.decode(buffer);
2741         return ret;
2742     }
2743 
2744     override string toString()
2745     {
2746         return "ResourcePackSend(url: " ~ std.conv.to!string(this.url) ~ ", hash: " ~ std.conv.to!string(this.hash) ~ ")";
2747     }
2748 
2749 }
2750 
2751 class Respawn : Java335Packet
2752 {
2753 
2754     enum uint ID = 52;
2755 
2756     enum bool CLIENTBOUND = true;
2757     enum bool SERVERBOUND = false;
2758 
2759     // dimension
2760     enum int NETHER = -1;
2761     enum int OVERWORLD = 0;
2762     enum int END = 1;
2763 
2764     // difficulty
2765     enum ubyte PEACEFUL = 0;
2766     enum ubyte EASY = 1;
2767     enum ubyte NORMAL = 2;
2768     enum ubyte HARD = 3;
2769 
2770     // gamemode
2771     enum ubyte SURVIVAL = 0;
2772     enum ubyte CREATIVE = 1;
2773     enum ubyte ADVENTURE = 2;
2774     enum ubyte SPECTATOR = 3;
2775 
2776     // level type
2777     enum string INFINITY = "default";
2778     enum string FLAT = "flat";
2779     enum string AMPLIFIED = "amplified";
2780     enum string LARGE_BIOMES = "largeBiomes";
2781 
2782     enum string[] __fields = ["dimension", "difficulty", "gamemode", "levelType"];
2783 
2784     int dimension;
2785     ubyte difficulty;
2786     ubyte gamemode;
2787     string levelType;
2788 
2789     this() pure nothrow @safe @nogc {}
2790 
2791     this(int dimension, ubyte difficulty=ubyte.init, ubyte gamemode=ubyte.init, string levelType=string.init) pure nothrow @safe @nogc
2792     {
2793         this.dimension = dimension;
2794         this.difficulty = difficulty;
2795         this.gamemode = gamemode;
2796         this.levelType = levelType;
2797     }
2798 
2799     mixin Make;
2800 
2801     public static typeof(this) fromBuffer(ubyte[] buffer)
2802     {
2803         Respawn ret = new Respawn();
2804         ret.decode(buffer);
2805         return ret;
2806     }
2807 
2808     override string toString()
2809     {
2810         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) ~ ")";
2811     }
2812 
2813 }
2814 
2815 class EntityHeadLook : Java335Packet
2816 {
2817 
2818     enum uint ID = 53;
2819 
2820     enum bool CLIENTBOUND = true;
2821     enum bool SERVERBOUND = false;
2822 
2823     enum string[] __fields = ["entityId", "headYaw"];
2824 
2825     @Var uint entityId;
2826     ubyte headYaw;
2827 
2828     this() pure nothrow @safe @nogc {}
2829 
2830     this(uint entityId, ubyte headYaw=ubyte.init) pure nothrow @safe @nogc
2831     {
2832         this.entityId = entityId;
2833         this.headYaw = headYaw;
2834     }
2835 
2836     mixin Make;
2837 
2838     public static typeof(this) fromBuffer(ubyte[] buffer)
2839     {
2840         EntityHeadLook ret = new EntityHeadLook();
2841         ret.decode(buffer);
2842         return ret;
2843     }
2844 
2845     override string toString()
2846     {
2847         return "EntityHeadLook(entityId: " ~ std.conv.to!string(this.entityId) ~ ", headYaw: " ~ std.conv.to!string(this.headYaw) ~ ")";
2848     }
2849 
2850 }
2851 
2852 class AdvancementProgress : Java335Packet
2853 {
2854 
2855     enum uint ID = 54;
2856 
2857     enum bool CLIENTBOUND = true;
2858     enum bool SERVERBOUND = false;
2859 
2860     enum string[] __fields = ["notEmpty", "identifier"];
2861 
2862     bool notEmpty;
2863     @Condition("notEmpty==true") string identifier;
2864 
2865     this() pure nothrow @safe @nogc {}
2866 
2867     this(bool notEmpty, string identifier=string.init) pure nothrow @safe @nogc
2868     {
2869         this.notEmpty = notEmpty;
2870         this.identifier = identifier;
2871     }
2872 
2873     mixin Make;
2874 
2875     public static typeof(this) fromBuffer(ubyte[] buffer)
2876     {
2877         AdvancementProgress ret = new AdvancementProgress();
2878         ret.decode(buffer);
2879         return ret;
2880     }
2881 
2882     override string toString()
2883     {
2884         return "AdvancementProgress(notEmpty: " ~ std.conv.to!string(this.notEmpty) ~ ", identifier: " ~ std.conv.to!string(this.identifier) ~ ")";
2885     }
2886 
2887 }
2888 
2889 class WorldBorder : Java335Packet
2890 {
2891 
2892     enum uint ID = 55;
2893 
2894     enum bool CLIENTBOUND = true;
2895     enum bool SERVERBOUND = false;
2896 
2897     enum string[] __fields = ["action"];
2898 
2899     @Var uint action;
2900 
2901     this() pure nothrow @safe @nogc {}
2902 
2903     this(uint action) pure nothrow @safe @nogc
2904     {
2905         this.action = action;
2906     }
2907 
2908     mixin Make;
2909 
2910     public static typeof(this) fromBuffer(ubyte[] buffer)
2911     {
2912         WorldBorder ret = new WorldBorder();
2913         ret.decode(buffer);
2914         return ret;
2915     }
2916 
2917     override string toString()
2918     {
2919         return "WorldBorder(action: " ~ std.conv.to!string(this.action) ~ ")";
2920     }
2921 
2922     enum string variantField = "action";
2923 
2924     alias Variants = TypeTuple!(SetSize, LerpSize, SetCenter, Initialize, SetWarningTime, SetWarningBlocks);
2925 
2926     class SetSize : Java335Packet
2927     {
2928 
2929         enum typeof(action) ACTION = 0;
2930 
2931         enum string[] __fields = ["diameter"];
2932 
2933         double diameter;
2934 
2935         this() pure nothrow @safe @nogc {}
2936 
2937         this(double diameter) pure nothrow @safe @nogc
2938         {
2939             this.diameter = diameter;
2940         }
2941 
2942         mixin Make;
2943 
2944         override string toString()
2945         {
2946             return "WorldBorder.SetSize(diameter: " ~ std.conv.to!string(this.diameter) ~ ")";
2947         }
2948 
2949     }
2950 
2951     class LerpSize : Java335Packet
2952     {
2953 
2954         enum typeof(action) ACTION = 1;
2955 
2956         enum string[] __fields = ["oldDiameter", "newDiameter", "speed"];
2957 
2958         double oldDiameter;
2959         double newDiameter;
2960         @Var ulong speed;
2961 
2962         this() pure nothrow @safe @nogc {}
2963 
2964         this(double oldDiameter, double newDiameter=double.init, ulong speed=ulong.init) pure nothrow @safe @nogc
2965         {
2966             this.oldDiameter = oldDiameter;
2967             this.newDiameter = newDiameter;
2968             this.speed = speed;
2969         }
2970 
2971         mixin Make;
2972 
2973         override string toString()
2974         {
2975             return "WorldBorder.LerpSize(oldDiameter: " ~ std.conv.to!string(this.oldDiameter) ~ ", newDiameter: " ~ std.conv.to!string(this.newDiameter) ~ ", speed: " ~ std.conv.to!string(this.speed) ~ ")";
2976         }
2977 
2978     }
2979 
2980     class SetCenter : Java335Packet
2981     {
2982 
2983         enum typeof(action) ACTION = 2;
2984 
2985         enum string[] __fields = ["center"];
2986 
2987         Vector!(double, "xyz") center;
2988 
2989         this() pure nothrow @safe @nogc {}
2990 
2991         this(Vector!(double, "xyz") center) pure nothrow @safe @nogc
2992         {
2993             this.center = center;
2994         }
2995 
2996         mixin Make;
2997 
2998         override string toString()
2999         {
3000             return "WorldBorder.SetCenter(center: " ~ std.conv.to!string(this.center) ~ ")";
3001         }
3002 
3003     }
3004 
3005     class Initialize : Java335Packet
3006     {
3007 
3008         enum typeof(action) ACTION = 3;
3009 
3010         enum string[] __fields = ["center", "oldDiameter", "newDiameter", "speed", "portalTeleportBoundary", "warningTime", "warningBlocks"];
3011 
3012         Vector!(double, "xyz") center;
3013         double oldDiameter;
3014         double newDiameter;
3015         @Var ulong speed;
3016         @Var uint portalTeleportBoundary;
3017         @Var uint warningTime;
3018         @Var uint warningBlocks;
3019 
3020         this() pure nothrow @safe @nogc {}
3021 
3022         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
3023         {
3024             this.center = center;
3025             this.oldDiameter = oldDiameter;
3026             this.newDiameter = newDiameter;
3027             this.speed = speed;
3028             this.portalTeleportBoundary = portalTeleportBoundary;
3029             this.warningTime = warningTime;
3030             this.warningBlocks = warningBlocks;
3031         }
3032 
3033         mixin Make;
3034 
3035         override string toString()
3036         {
3037             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) ~ ")";
3038         }
3039 
3040     }
3041 
3042     class SetWarningTime : Java335Packet
3043     {
3044 
3045         enum typeof(action) ACTION = 4;
3046 
3047         enum string[] __fields = ["warningTime"];
3048 
3049         @Var uint warningTime;
3050 
3051         this() pure nothrow @safe @nogc {}
3052 
3053         this(uint warningTime) pure nothrow @safe @nogc
3054         {
3055             this.warningTime = warningTime;
3056         }
3057 
3058         mixin Make;
3059 
3060         override string toString()
3061         {
3062             return "WorldBorder.SetWarningTime(warningTime: " ~ std.conv.to!string(this.warningTime) ~ ")";
3063         }
3064 
3065     }
3066 
3067     class SetWarningBlocks : Java335Packet
3068     {
3069 
3070         enum typeof(action) ACTION = 5;
3071 
3072         enum string[] __fields = ["warningBlocks"];
3073 
3074         @Var uint warningBlocks;
3075 
3076         this() pure nothrow @safe @nogc {}
3077 
3078         this(uint warningBlocks) pure nothrow @safe @nogc
3079         {
3080             this.warningBlocks = warningBlocks;
3081         }
3082 
3083         mixin Make;
3084 
3085         override string toString()
3086         {
3087             return "WorldBorder.SetWarningBlocks(warningBlocks: " ~ std.conv.to!string(this.warningBlocks) ~ ")";
3088         }
3089 
3090     }
3091 
3092 }
3093 
3094 class Camera : Java335Packet
3095 {
3096 
3097     enum uint ID = 56;
3098 
3099     enum bool CLIENTBOUND = true;
3100     enum bool SERVERBOUND = false;
3101 
3102     enum string[] __fields = ["entityId"];
3103 
3104     @Var uint entityId;
3105 
3106     this() pure nothrow @safe @nogc {}
3107 
3108     this(uint entityId) pure nothrow @safe @nogc
3109     {
3110         this.entityId = entityId;
3111     }
3112 
3113     mixin Make;
3114 
3115     public static typeof(this) fromBuffer(ubyte[] buffer)
3116     {
3117         Camera ret = new Camera();
3118         ret.decode(buffer);
3119         return ret;
3120     }
3121 
3122     override string toString()
3123     {
3124         return "Camera(entityId: " ~ std.conv.to!string(this.entityId) ~ ")";
3125     }
3126 
3127 }
3128 
3129 class HeldItemChange : Java335Packet
3130 {
3131 
3132     enum uint ID = 57;
3133 
3134     enum bool CLIENTBOUND = true;
3135     enum bool SERVERBOUND = false;
3136 
3137     enum string[] __fields = ["slot"];
3138 
3139     ubyte slot;
3140 
3141     this() pure nothrow @safe @nogc {}
3142 
3143     this(ubyte slot) pure nothrow @safe @nogc
3144     {
3145         this.slot = slot;
3146     }
3147 
3148     mixin Make;
3149 
3150     public static typeof(this) fromBuffer(ubyte[] buffer)
3151     {
3152         HeldItemChange ret = new HeldItemChange();
3153         ret.decode(buffer);
3154         return ret;
3155     }
3156 
3157     override string toString()
3158     {
3159         return "HeldItemChange(slot: " ~ std.conv.to!string(this.slot) ~ ")";
3160     }
3161 
3162 }
3163 
3164 class DisplayScoreboard : Java335Packet
3165 {
3166 
3167     enum uint ID = 58;
3168 
3169     enum bool CLIENTBOUND = true;
3170     enum bool SERVERBOUND = false;
3171 
3172     // position
3173     enum ubyte LIST = 0;
3174     enum ubyte SIDEBAR = 1;
3175     enum ubyte BELOW_NAME = 2;
3176 
3177     enum string[] __fields = ["position", "scoreName"];
3178 
3179     ubyte position;
3180     string scoreName;
3181 
3182     this() pure nothrow @safe @nogc {}
3183 
3184     this(ubyte position, string scoreName=string.init) pure nothrow @safe @nogc
3185     {
3186         this.position = position;
3187         this.scoreName = scoreName;
3188     }
3189 
3190     mixin Make;
3191 
3192     public static typeof(this) fromBuffer(ubyte[] buffer)
3193     {
3194         DisplayScoreboard ret = new DisplayScoreboard();
3195         ret.decode(buffer);
3196         return ret;
3197     }
3198 
3199     override string toString()
3200     {
3201         return "DisplayScoreboard(position: " ~ std.conv.to!string(this.position) ~ ", scoreName: " ~ std.conv.to!string(this.scoreName) ~ ")";
3202     }
3203 
3204 }
3205 
3206 class EntityMetadata : Java335Packet
3207 {
3208 
3209     enum uint ID = 59;
3210 
3211     enum bool CLIENTBOUND = true;
3212     enum bool SERVERBOUND = false;
3213 
3214     enum string[] __fields = ["entityId", "metadata"];
3215 
3216     @Var uint entityId;
3217     Metadata metadata;
3218 
3219     this() pure nothrow @safe @nogc {}
3220 
3221     this(uint entityId, Metadata metadata=Metadata.init) pure nothrow @safe @nogc
3222     {
3223         this.entityId = entityId;
3224         this.metadata = metadata;
3225     }
3226 
3227     mixin Make;
3228 
3229     public static typeof(this) fromBuffer(ubyte[] buffer)
3230     {
3231         EntityMetadata ret = new EntityMetadata();
3232         ret.decode(buffer);
3233         return ret;
3234     }
3235 
3236     override string toString()
3237     {
3238         return "EntityMetadata(entityId: " ~ std.conv.to!string(this.entityId) ~ ", metadata: " ~ std.conv.to!string(this.metadata) ~ ")";
3239     }
3240 
3241 }
3242 
3243 class AttachEntity : Java335Packet
3244 {
3245 
3246     enum uint ID = 60;
3247 
3248     enum bool CLIENTBOUND = true;
3249     enum bool SERVERBOUND = false;
3250 
3251     enum string[] __fields = ["target", "holder"];
3252 
3253     uint target;
3254     uint holder;
3255 
3256     this() pure nothrow @safe @nogc {}
3257 
3258     this(uint target, uint holder=uint.init) pure nothrow @safe @nogc
3259     {
3260         this.target = target;
3261         this.holder = holder;
3262     }
3263 
3264     mixin Make;
3265 
3266     public static typeof(this) fromBuffer(ubyte[] buffer)
3267     {
3268         AttachEntity ret = new AttachEntity();
3269         ret.decode(buffer);
3270         return ret;
3271     }
3272 
3273     override string toString()
3274     {
3275         return "AttachEntity(target: " ~ std.conv.to!string(this.target) ~ ", holder: " ~ std.conv.to!string(this.holder) ~ ")";
3276     }
3277 
3278 }
3279 
3280 class EntityVelocity : Java335Packet
3281 {
3282 
3283     enum uint ID = 61;
3284 
3285     enum bool CLIENTBOUND = true;
3286     enum bool SERVERBOUND = false;
3287 
3288     enum string[] __fields = ["entityId", "velocity"];
3289 
3290     @Var uint entityId;
3291     Vector!(short, "xyz") velocity;
3292 
3293     this() pure nothrow @safe @nogc {}
3294 
3295     this(uint entityId, Vector!(short, "xyz") velocity=Vector!(short, "xyz").init) pure nothrow @safe @nogc
3296     {
3297         this.entityId = entityId;
3298         this.velocity = velocity;
3299     }
3300 
3301     mixin Make;
3302 
3303     public static typeof(this) fromBuffer(ubyte[] buffer)
3304     {
3305         EntityVelocity ret = new EntityVelocity();
3306         ret.decode(buffer);
3307         return ret;
3308     }
3309 
3310     override string toString()
3311     {
3312         return "EntityVelocity(entityId: " ~ std.conv.to!string(this.entityId) ~ ", velocity: " ~ std.conv.to!string(this.velocity) ~ ")";
3313     }
3314 
3315 }
3316 
3317 class EntityEquipment : Java335Packet
3318 {
3319 
3320     enum uint ID = 62;
3321 
3322     enum bool CLIENTBOUND = true;
3323     enum bool SERVERBOUND = false;
3324 
3325     enum string[] __fields = ["entityId", "slot", "item"];
3326 
3327     @Var uint entityId;
3328     @Var uint slot;
3329     soupply.java335.types.Slot item;
3330 
3331     this() pure nothrow @safe @nogc {}
3332 
3333     this(uint entityId, uint slot=uint.init, soupply.java335.types.Slot item=soupply.java335.types.Slot.init) pure nothrow @safe @nogc
3334     {
3335         this.entityId = entityId;
3336         this.slot = slot;
3337         this.item = item;
3338     }
3339 
3340     mixin Make;
3341 
3342     public static typeof(this) fromBuffer(ubyte[] buffer)
3343     {
3344         EntityEquipment ret = new EntityEquipment();
3345         ret.decode(buffer);
3346         return ret;
3347     }
3348 
3349     override string toString()
3350     {
3351         return "EntityEquipment(entityId: " ~ std.conv.to!string(this.entityId) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ", item: " ~ std.conv.to!string(this.item) ~ ")";
3352     }
3353 
3354 }
3355 
3356 class SetExperience : Java335Packet
3357 {
3358 
3359     enum uint ID = 63;
3360 
3361     enum bool CLIENTBOUND = true;
3362     enum bool SERVERBOUND = false;
3363 
3364     enum string[] __fields = ["experience", "level", "totalExperience"];
3365 
3366     float experience;
3367     @Var uint level;
3368     @Var uint totalExperience;
3369 
3370     this() pure nothrow @safe @nogc {}
3371 
3372     this(float experience, uint level=uint.init, uint totalExperience=uint.init) pure nothrow @safe @nogc
3373     {
3374         this.experience = experience;
3375         this.level = level;
3376         this.totalExperience = totalExperience;
3377     }
3378 
3379     mixin Make;
3380 
3381     public static typeof(this) fromBuffer(ubyte[] buffer)
3382     {
3383         SetExperience ret = new SetExperience();
3384         ret.decode(buffer);
3385         return ret;
3386     }
3387 
3388     override string toString()
3389     {
3390         return "SetExperience(experience: " ~ std.conv.to!string(this.experience) ~ ", level: " ~ std.conv.to!string(this.level) ~ ", totalExperience: " ~ std.conv.to!string(this.totalExperience) ~ ")";
3391     }
3392 
3393 }
3394 
3395 class UpdateHealth : Java335Packet
3396 {
3397 
3398     enum uint ID = 64;
3399 
3400     enum bool CLIENTBOUND = true;
3401     enum bool SERVERBOUND = false;
3402 
3403     enum string[] __fields = ["health", "hunger", "saturation"];
3404 
3405     float health;
3406     @Var uint hunger;
3407     float saturation;
3408 
3409     this() pure nothrow @safe @nogc {}
3410 
3411     this(float health, uint hunger=uint.init, float saturation=float.init) pure nothrow @safe @nogc
3412     {
3413         this.health = health;
3414         this.hunger = hunger;
3415         this.saturation = saturation;
3416     }
3417 
3418     mixin Make;
3419 
3420     public static typeof(this) fromBuffer(ubyte[] buffer)
3421     {
3422         UpdateHealth ret = new UpdateHealth();
3423         ret.decode(buffer);
3424         return ret;
3425     }
3426 
3427     override string toString()
3428     {
3429         return "UpdateHealth(health: " ~ std.conv.to!string(this.health) ~ ", hunger: " ~ std.conv.to!string(this.hunger) ~ ", saturation: " ~ std.conv.to!string(this.saturation) ~ ")";
3430     }
3431 
3432 }
3433 
3434 class ScoreboardObjective : Java335Packet
3435 {
3436 
3437     enum uint ID = 65;
3438 
3439     enum bool CLIENTBOUND = true;
3440     enum bool SERVERBOUND = false;
3441 
3442     // mode
3443     enum ubyte CREATE = 0;
3444     enum ubyte REMOVE = 1;
3445     enum ubyte UPDATE = 2;
3446 
3447     // type
3448     enum string NUMERIC = "integer";
3449     enum string GRAPHIC = "hearts";
3450 
3451     enum string[] __fields = ["name", "mode", "value", "type"];
3452 
3453     string name;
3454     ubyte mode;
3455     @Condition("mode!=1") string value;
3456     @Condition("mode!=1") string type;
3457 
3458     this() pure nothrow @safe @nogc {}
3459 
3460     this(string name, ubyte mode=ubyte.init, string value=string.init, string type=string.init) pure nothrow @safe @nogc
3461     {
3462         this.name = name;
3463         this.mode = mode;
3464         this.value = value;
3465         this.type = type;
3466     }
3467 
3468     mixin Make;
3469 
3470     public static typeof(this) fromBuffer(ubyte[] buffer)
3471     {
3472         ScoreboardObjective ret = new ScoreboardObjective();
3473         ret.decode(buffer);
3474         return ret;
3475     }
3476 
3477     override string toString()
3478     {
3479         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) ~ ")";
3480     }
3481 
3482 }
3483 
3484 class SetPassengers : Java335Packet
3485 {
3486 
3487     enum uint ID = 66;
3488 
3489     enum bool CLIENTBOUND = true;
3490     enum bool SERVERBOUND = false;
3491 
3492     enum string[] __fields = ["entityId", "passengers"];
3493 
3494     @Var uint entityId;
3495     @Var uint[] passengers;
3496 
3497     this() pure nothrow @safe @nogc {}
3498 
3499     this(uint entityId, uint[] passengers=(uint[]).init) pure nothrow @safe @nogc
3500     {
3501         this.entityId = entityId;
3502         this.passengers = passengers;
3503     }
3504 
3505     mixin Make;
3506 
3507     public static typeof(this) fromBuffer(ubyte[] buffer)
3508     {
3509         SetPassengers ret = new SetPassengers();
3510         ret.decode(buffer);
3511         return ret;
3512     }
3513 
3514     override string toString()
3515     {
3516         return "SetPassengers(entityId: " ~ std.conv.to!string(this.entityId) ~ ", passengers: " ~ std.conv.to!string(this.passengers) ~ ")";
3517     }
3518 
3519 }
3520 
3521 class Teams : Java335Packet
3522 {
3523 
3524     enum uint ID = 67;
3525 
3526     enum bool CLIENTBOUND = true;
3527     enum bool SERVERBOUND = false;
3528 
3529     enum string[] __fields = ["name", "mode"];
3530 
3531     string name;
3532     ubyte mode;
3533 
3534     this() pure nothrow @safe @nogc {}
3535 
3536     this(string name, ubyte mode=ubyte.init) pure nothrow @safe @nogc
3537     {
3538         this.name = name;
3539         this.mode = mode;
3540     }
3541 
3542     mixin Make;
3543 
3544     public static typeof(this) fromBuffer(ubyte[] buffer)
3545     {
3546         Teams ret = new Teams();
3547         ret.decode(buffer);
3548         return ret;
3549     }
3550 
3551     override string toString()
3552     {
3553         return "Teams(name: " ~ std.conv.to!string(this.name) ~ ", mode: " ~ std.conv.to!string(this.mode) ~ ")";
3554     }
3555 
3556     enum string variantField = "mode";
3557 
3558     alias Variants = TypeTuple!(CreateTeam, RemoveTeam, UpdateTeamInfo, AddPlayers, RemovePlayers);
3559 
3560     class CreateTeam : Java335Packet
3561     {
3562 
3563         enum typeof(mode) MODE = 0;
3564 
3565         // friendly flags
3566         enum ubyte FRIENDLY_FIRE = 1;
3567         enum ubyte SEE_TEAM_INVISIBLE_PLAYERS = 2;
3568 
3569         // nametag visibility
3570         enum string ALWAYS_HIDE = "always";
3571         enum string HIDE_OTHER_TEAMS = "hideOtherTeams";
3572         enum string HIDE_OWN_TEAM = "hideOwnTeam";
3573         enum string NEVER_HIDE = "never";
3574 
3575         // collision rule
3576         enum string ALWAYS_PUSH = "always";
3577         enum string PUSH_OTHER_TEAMS = "pushOtherTeams";
3578         enum string PUSH_OWN_TEAM = "pushOwnTeam";
3579         enum string NEVER_PUSH = "never";
3580 
3581         enum string[] __fields = ["displayName", "prefix", "suffix", "friendlyFlags", "nametagVisibility", "collisionRule", "color", "players"];
3582 
3583         string displayName;
3584         string prefix;
3585         string suffix;
3586         ubyte friendlyFlags;
3587         string nametagVisibility;
3588         string collisionRule;
3589         ubyte color;
3590         string[] players;
3591 
3592         this() pure nothrow @safe @nogc {}
3593 
3594         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
3595         {
3596             this.displayName = displayName;
3597             this.prefix = prefix;
3598             this.suffix = suffix;
3599             this.friendlyFlags = friendlyFlags;
3600             this.nametagVisibility = nametagVisibility;
3601             this.collisionRule = collisionRule;
3602             this.color = color;
3603             this.players = players;
3604         }
3605 
3606         mixin Make;
3607 
3608         override string toString()
3609         {
3610             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) ~ ")";
3611         }
3612 
3613     }
3614 
3615     class RemoveTeam : Java335Packet
3616     {
3617 
3618         enum typeof(mode) MODE = 1;
3619 
3620         enum string[] __fields = [];
3621 
3622         mixin Make;
3623 
3624         override string toString()
3625         {
3626             return "Teams.RemoveTeam()";
3627         }
3628 
3629     }
3630 
3631     class UpdateTeamInfo : Java335Packet
3632     {
3633 
3634         enum typeof(mode) MODE = 2;
3635 
3636         // friendly flags
3637         enum ubyte FRIENDLY_FIRE = 1;
3638         enum ubyte SEE_TEAM_INVISIBLE_PLAYERS = 2;
3639 
3640         // nametag visibility
3641         enum string ALWAYS_HIDE = "always";
3642         enum string HIDE_OTHER_TEAMS = "hideOtherTeams";
3643         enum string HIDE_OWN_TEAM = "hideOwnTeam";
3644         enum string NEVER_HIDE = "never";
3645 
3646         // collision rule
3647         enum string ALWAYS_PUSH = "always";
3648         enum string PUSH_OTHER_TEAMS = "pushOtherTeams";
3649         enum string PUSH_OWN_TEAM = "pushOwnTeam";
3650         enum string NEVER_PUSH = "never";
3651 
3652         enum string[] __fields = ["displayName", "prefix", "suffix", "friendlyFlags", "nametagVisibility", "collisionRule", "color"];
3653 
3654         string displayName;
3655         string prefix;
3656         string suffix;
3657         ubyte friendlyFlags;
3658         string nametagVisibility;
3659         string collisionRule;
3660         ubyte color;
3661 
3662         this() pure nothrow @safe @nogc {}
3663 
3664         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
3665         {
3666             this.displayName = displayName;
3667             this.prefix = prefix;
3668             this.suffix = suffix;
3669             this.friendlyFlags = friendlyFlags;
3670             this.nametagVisibility = nametagVisibility;
3671             this.collisionRule = collisionRule;
3672             this.color = color;
3673         }
3674 
3675         mixin Make;
3676 
3677         override string toString()
3678         {
3679             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) ~ ")";
3680         }
3681 
3682     }
3683 
3684     class AddPlayers : Java335Packet
3685     {
3686 
3687         enum typeof(mode) MODE = 3;
3688 
3689         enum string[] __fields = ["players"];
3690 
3691         string[] players;
3692 
3693         this() pure nothrow @safe @nogc {}
3694 
3695         this(string[] players) pure nothrow @safe @nogc
3696         {
3697             this.players = players;
3698         }
3699 
3700         mixin Make;
3701 
3702         override string toString()
3703         {
3704             return "Teams.AddPlayers(players: " ~ std.conv.to!string(this.players) ~ ")";
3705         }
3706 
3707     }
3708 
3709     class RemovePlayers : Java335Packet
3710     {
3711 
3712         enum typeof(mode) MODE = 4;
3713 
3714         enum string[] __fields = ["players"];
3715 
3716         string[] players;
3717 
3718         this() pure nothrow @safe @nogc {}
3719 
3720         this(string[] players) pure nothrow @safe @nogc
3721         {
3722             this.players = players;
3723         }
3724 
3725         mixin Make;
3726 
3727         override string toString()
3728         {
3729             return "Teams.RemovePlayers(players: " ~ std.conv.to!string(this.players) ~ ")";
3730         }
3731 
3732     }
3733 
3734 }
3735 
3736 class UpdateScore : Java335Packet
3737 {
3738 
3739     enum uint ID = 68;
3740 
3741     enum bool CLIENTBOUND = true;
3742     enum bool SERVERBOUND = false;
3743 
3744     // action
3745     enum ubyte UPDATE = 0;
3746     enum ubyte REMOVE = 1;
3747 
3748     enum string[] __fields = ["scoreName", "action", "objectiveName", "value"];
3749 
3750     string scoreName;
3751     ubyte action;
3752     string objectiveName;
3753     @Condition("action==0") @Var uint value;
3754 
3755     this() pure nothrow @safe @nogc {}
3756 
3757     this(string scoreName, ubyte action=ubyte.init, string objectiveName=string.init, uint value=uint.init) pure nothrow @safe @nogc
3758     {
3759         this.scoreName = scoreName;
3760         this.action = action;
3761         this.objectiveName = objectiveName;
3762         this.value = value;
3763     }
3764 
3765     mixin Make;
3766 
3767     public static typeof(this) fromBuffer(ubyte[] buffer)
3768     {
3769         UpdateScore ret = new UpdateScore();
3770         ret.decode(buffer);
3771         return ret;
3772     }
3773 
3774     override string toString()
3775     {
3776         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) ~ ")";
3777     }
3778 
3779 }
3780 
3781 class SpawnPosition : Java335Packet
3782 {
3783 
3784     enum uint ID = 69;
3785 
3786     enum bool CLIENTBOUND = true;
3787     enum bool SERVERBOUND = false;
3788 
3789     enum string[] __fields = ["position"];
3790 
3791     ulong position;
3792 
3793     this() pure nothrow @safe @nogc {}
3794 
3795     this(ulong position) pure nothrow @safe @nogc
3796     {
3797         this.position = position;
3798     }
3799 
3800     mixin Make;
3801 
3802     public static typeof(this) fromBuffer(ubyte[] buffer)
3803     {
3804         SpawnPosition ret = new SpawnPosition();
3805         ret.decode(buffer);
3806         return ret;
3807     }
3808 
3809     override string toString()
3810     {
3811         return "SpawnPosition(position: " ~ std.conv.to!string(this.position) ~ ")";
3812     }
3813 
3814 }
3815 
3816 class TimeUpdate : Java335Packet
3817 {
3818 
3819     enum uint ID = 70;
3820 
3821     enum bool CLIENTBOUND = true;
3822     enum bool SERVERBOUND = false;
3823 
3824     enum string[] __fields = ["worldAge", "time"];
3825 
3826     ulong worldAge;
3827     long time;
3828 
3829     this() pure nothrow @safe @nogc {}
3830 
3831     this(ulong worldAge, long time=long.init) pure nothrow @safe @nogc
3832     {
3833         this.worldAge = worldAge;
3834         this.time = time;
3835     }
3836 
3837     mixin Make;
3838 
3839     public static typeof(this) fromBuffer(ubyte[] buffer)
3840     {
3841         TimeUpdate ret = new TimeUpdate();
3842         ret.decode(buffer);
3843         return ret;
3844     }
3845 
3846     override string toString()
3847     {
3848         return "TimeUpdate(worldAge: " ~ std.conv.to!string(this.worldAge) ~ ", time: " ~ std.conv.to!string(this.time) ~ ")";
3849     }
3850 
3851 }
3852 
3853 class Title : Java335Packet
3854 {
3855 
3856     enum uint ID = 71;
3857 
3858     enum bool CLIENTBOUND = true;
3859     enum bool SERVERBOUND = false;
3860 
3861     enum string[] __fields = ["action"];
3862 
3863     @Var uint action;
3864 
3865     this() pure nothrow @safe @nogc {}
3866 
3867     this(uint action) pure nothrow @safe @nogc
3868     {
3869         this.action = action;
3870     }
3871 
3872     mixin Make;
3873 
3874     public static typeof(this) fromBuffer(ubyte[] buffer)
3875     {
3876         Title ret = new Title();
3877         ret.decode(buffer);
3878         return ret;
3879     }
3880 
3881     override string toString()
3882     {
3883         return "Title(action: " ~ std.conv.to!string(this.action) ~ ")";
3884     }
3885 
3886     enum string variantField = "action";
3887 
3888     alias Variants = TypeTuple!(SetTitle, SetSubtitle, SetActionBar, SetTimings, Hide, Reset);
3889 
3890     class SetTitle : Java335Packet
3891     {
3892 
3893         enum typeof(action) ACTION = 0;
3894 
3895         enum string[] __fields = ["text"];
3896 
3897         string text;
3898 
3899         this() pure nothrow @safe @nogc {}
3900 
3901         this(string text) pure nothrow @safe @nogc
3902         {
3903             this.text = text;
3904         }
3905 
3906         mixin Make;
3907 
3908         override string toString()
3909         {
3910             return "Title.SetTitle(text: " ~ std.conv.to!string(this.text) ~ ")";
3911         }
3912 
3913     }
3914 
3915     class SetSubtitle : Java335Packet
3916     {
3917 
3918         enum typeof(action) ACTION = 1;
3919 
3920         enum string[] __fields = ["text"];
3921 
3922         string text;
3923 
3924         this() pure nothrow @safe @nogc {}
3925 
3926         this(string text) pure nothrow @safe @nogc
3927         {
3928             this.text = text;
3929         }
3930 
3931         mixin Make;
3932 
3933         override string toString()
3934         {
3935             return "Title.SetSubtitle(text: " ~ std.conv.to!string(this.text) ~ ")";
3936         }
3937 
3938     }
3939 
3940     class SetActionBar : Java335Packet
3941     {
3942 
3943         enum typeof(action) ACTION = 2;
3944 
3945         enum string[] __fields = ["text"];
3946 
3947         string text;
3948 
3949         this() pure nothrow @safe @nogc {}
3950 
3951         this(string text) pure nothrow @safe @nogc
3952         {
3953             this.text = text;
3954         }
3955 
3956         mixin Make;
3957 
3958         override string toString()
3959         {
3960             return "Title.SetActionBar(text: " ~ std.conv.to!string(this.text) ~ ")";
3961         }
3962 
3963     }
3964 
3965     class SetTimings : Java335Packet
3966     {
3967 
3968         enum typeof(action) ACTION = 3;
3969 
3970         enum string[] __fields = ["fadeIn", "stay", "fadeOut"];
3971 
3972         uint fadeIn;
3973         uint stay;
3974         uint fadeOut;
3975 
3976         this() pure nothrow @safe @nogc {}
3977 
3978         this(uint fadeIn, uint stay=uint.init, uint fadeOut=uint.init) pure nothrow @safe @nogc
3979         {
3980             this.fadeIn = fadeIn;
3981             this.stay = stay;
3982             this.fadeOut = fadeOut;
3983         }
3984 
3985         mixin Make;
3986 
3987         override string toString()
3988         {
3989             return "Title.SetTimings(fadeIn: " ~ std.conv.to!string(this.fadeIn) ~ ", stay: " ~ std.conv.to!string(this.stay) ~ ", fadeOut: " ~ std.conv.to!string(this.fadeOut) ~ ")";
3990         }
3991 
3992     }
3993 
3994     class Hide : Java335Packet
3995     {
3996 
3997         enum typeof(action) ACTION = 4;
3998 
3999         enum string[] __fields = [];
4000 
4001         mixin Make;
4002 
4003         override string toString()
4004         {
4005             return "Title.Hide()";
4006         }
4007 
4008     }
4009 
4010     class Reset : Java335Packet
4011     {
4012 
4013         enum typeof(action) ACTION = 5;
4014 
4015         enum string[] __fields = [];
4016 
4017         mixin Make;
4018 
4019         override string toString()
4020         {
4021             return "Title.Reset()";
4022         }
4023 
4024     }
4025 
4026 }
4027 
4028 class SoundEffect : Java335Packet
4029 {
4030 
4031     enum uint ID = 72;
4032 
4033     enum bool CLIENTBOUND = true;
4034     enum bool SERVERBOUND = false;
4035 
4036     enum string[] __fields = ["soundId", "category", "position", "volume", "pitch"];
4037 
4038     @Var uint soundId;
4039     @Var uint category;
4040     Vector!(int, "xyz") position;
4041     float volume;
4042     float pitch;
4043 
4044     this() pure nothrow @safe @nogc {}
4045 
4046     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
4047     {
4048         this.soundId = soundId;
4049         this.category = category;
4050         this.position = position;
4051         this.volume = volume;
4052         this.pitch = pitch;
4053     }
4054 
4055     mixin Make;
4056 
4057     public static typeof(this) fromBuffer(ubyte[] buffer)
4058     {
4059         SoundEffect ret = new SoundEffect();
4060         ret.decode(buffer);
4061         return ret;
4062     }
4063 
4064     override string toString()
4065     {
4066         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) ~ ")";
4067     }
4068 
4069 }
4070 
4071 class PlayerListHeaderAndFooter : Java335Packet
4072 {
4073 
4074     enum uint ID = 73;
4075 
4076     enum bool CLIENTBOUND = true;
4077     enum bool SERVERBOUND = false;
4078 
4079     enum string[] __fields = ["header", "footer"];
4080 
4081     string header;
4082     string footer;
4083 
4084     this() pure nothrow @safe @nogc {}
4085 
4086     this(string header, string footer=string.init) pure nothrow @safe @nogc
4087     {
4088         this.header = header;
4089         this.footer = footer;
4090     }
4091 
4092     mixin Make;
4093 
4094     public static typeof(this) fromBuffer(ubyte[] buffer)
4095     {
4096         PlayerListHeaderAndFooter ret = new PlayerListHeaderAndFooter();
4097         ret.decode(buffer);
4098         return ret;
4099     }
4100 
4101     override string toString()
4102     {
4103         return "PlayerListHeaderAndFooter(header: " ~ std.conv.to!string(this.header) ~ ", footer: " ~ std.conv.to!string(this.footer) ~ ")";
4104     }
4105 
4106 }
4107 
4108 class CollectItem : Java335Packet
4109 {
4110 
4111     enum uint ID = 74;
4112 
4113     enum bool CLIENTBOUND = true;
4114     enum bool SERVERBOUND = false;
4115 
4116     enum string[] __fields = ["collected", "collector", "count"];
4117 
4118     @Var uint collected;
4119     @Var uint collector;
4120     @Var uint count;
4121 
4122     this() pure nothrow @safe @nogc {}
4123 
4124     this(uint collected, uint collector=uint.init, uint count=uint.init) pure nothrow @safe @nogc
4125     {
4126         this.collected = collected;
4127         this.collector = collector;
4128         this.count = count;
4129     }
4130 
4131     mixin Make;
4132 
4133     public static typeof(this) fromBuffer(ubyte[] buffer)
4134     {
4135         CollectItem ret = new CollectItem();
4136         ret.decode(buffer);
4137         return ret;
4138     }
4139 
4140     override string toString()
4141     {
4142         return "CollectItem(collected: " ~ std.conv.to!string(this.collected) ~ ", collector: " ~ std.conv.to!string(this.collector) ~ ", count: " ~ std.conv.to!string(this.count) ~ ")";
4143     }
4144 
4145 }
4146 
4147 class EntityTeleport : Java335Packet
4148 {
4149 
4150     enum uint ID = 75;
4151 
4152     enum bool CLIENTBOUND = true;
4153     enum bool SERVERBOUND = false;
4154 
4155     enum string[] __fields = ["entityId", "position", "yaw", "pitch", "onGround"];
4156 
4157     @Var uint entityId;
4158     Vector!(double, "xyz") position;
4159     ubyte yaw;
4160     ubyte pitch;
4161     bool onGround;
4162 
4163     this() pure nothrow @safe @nogc {}
4164 
4165     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
4166     {
4167         this.entityId = entityId;
4168         this.position = position;
4169         this.yaw = yaw;
4170         this.pitch = pitch;
4171         this.onGround = onGround;
4172     }
4173 
4174     mixin Make;
4175 
4176     public static typeof(this) fromBuffer(ubyte[] buffer)
4177     {
4178         EntityTeleport ret = new EntityTeleport();
4179         ret.decode(buffer);
4180         return ret;
4181     }
4182 
4183     override string toString()
4184     {
4185         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) ~ ")";
4186     }
4187 
4188 }
4189 
4190 class Advencements : Java335Packet
4191 {
4192 
4193     enum uint ID = 76;
4194 
4195     enum bool CLIENTBOUND = true;
4196     enum bool SERVERBOUND = false;
4197 
4198     enum string[] __fields = [];
4199 
4200     mixin Make;
4201 
4202     public static typeof(this) fromBuffer(ubyte[] buffer)
4203     {
4204         Advencements ret = new Advencements();
4205         ret.decode(buffer);
4206         return ret;
4207     }
4208 
4209     override string toString()
4210     {
4211         return "Advencements()";
4212     }
4213 
4214 }
4215 
4216 class EntityProperties : Java335Packet
4217 {
4218 
4219     enum uint ID = 77;
4220 
4221     enum bool CLIENTBOUND = true;
4222     enum bool SERVERBOUND = false;
4223 
4224     enum string[] __fields = ["entityId", "attributes"];
4225 
4226     @Var uint entityId;
4227     @Length!uint soupply.java335.types.Attribute[] attributes;
4228 
4229     this() pure nothrow @safe @nogc {}
4230 
4231     this(uint entityId, soupply.java335.types.Attribute[] attributes=(soupply.java335.types.Attribute[]).init) pure nothrow @safe @nogc
4232     {
4233         this.entityId = entityId;
4234         this.attributes = attributes;
4235     }
4236 
4237     mixin Make;
4238 
4239     public static typeof(this) fromBuffer(ubyte[] buffer)
4240     {
4241         EntityProperties ret = new EntityProperties();
4242         ret.decode(buffer);
4243         return ret;
4244     }
4245 
4246     override string toString()
4247     {
4248         return "EntityProperties(entityId: " ~ std.conv.to!string(this.entityId) ~ ", attributes: " ~ std.conv.to!string(this.attributes) ~ ")";
4249     }
4250 
4251 }
4252 
4253 class EntityEffect : Java335Packet
4254 {
4255 
4256     enum uint ID = 78;
4257 
4258     enum bool CLIENTBOUND = true;
4259     enum bool SERVERBOUND = false;
4260 
4261     // flags
4262     enum ubyte AMBIENT = 1;
4263     enum ubyte SHOW_PARTICLES = 2;
4264 
4265     enum string[] __fields = ["entityId", "effectId", "amplifier", "duration", "flags"];
4266 
4267     @Var uint entityId;
4268     ubyte effectId;
4269     ubyte amplifier;
4270     @Var uint duration;
4271     ubyte flags;
4272 
4273     this() pure nothrow @safe @nogc {}
4274 
4275     this(uint entityId, ubyte effectId=ubyte.init, ubyte amplifier=ubyte.init, uint duration=uint.init, ubyte flags=ubyte.init) pure nothrow @safe @nogc
4276     {
4277         this.entityId = entityId;
4278         this.effectId = effectId;
4279         this.amplifier = amplifier;
4280         this.duration = duration;
4281         this.flags = flags;
4282     }
4283 
4284     mixin Make;
4285 
4286     public static typeof(this) fromBuffer(ubyte[] buffer)
4287     {
4288         EntityEffect ret = new EntityEffect();
4289         ret.decode(buffer);
4290         return ret;
4291     }
4292 
4293     override string toString()
4294     {
4295         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) ~ ")";
4296     }
4297 
4298 }