1 /*
2  * This file has been automatically generated by Soupply and released under the MIT license.
3  * Generated from bedrock150
4  */
5 module soupply.bedrock150.metadata;
6 
7 import packetmaker;
8 import packetmaker.maker : EndianType, writeLength, writeImpl, readLength, readImpl;
9 
10 import soupply.util;
11 
12 static import soupply.bedrock150.types;
13 
14 class MetadataValue : PacketImpl!(Endian.littleEndian, varuint, varuint)
15 {
16 
17     @Var @EncodeOnly uint type;
18 
19     this(uint type) pure nothrow @safe @nogc
20     {
21         this.type = type;
22     }
23 
24     mixin Make;
25 
26 }
27 
28 class MetadataByte : MetadataValue
29 {
30 
31     byte value;
32 
33     this() pure nothrow @safe @nogc
34     {
35         super(0);
36     }
37 
38     this(byte value) pure nothrow @safe @nogc
39     {
40         this();
41         this.value = value;
42     }
43 
44     mixin Make;
45 
46 }
47 
48 class MetadataShort : MetadataValue
49 {
50 
51     short value;
52 
53     this() pure nothrow @safe @nogc
54     {
55         super(1);
56     }
57 
58     this(short value) pure nothrow @safe @nogc
59     {
60         this();
61         this.value = value;
62     }
63 
64     mixin Make;
65 
66 }
67 
68 class MetadataInt : MetadataValue
69 {
70 
71     @Var int value;
72 
73     this() pure nothrow @safe @nogc
74     {
75         super(2);
76     }
77 
78     this(int value) pure nothrow @safe @nogc
79     {
80         this();
81         this.value = value;
82     }
83 
84     mixin Make;
85 
86 }
87 
88 class MetadataFloat : MetadataValue
89 {
90 
91     float value;
92 
93     this() pure nothrow @safe @nogc
94     {
95         super(3);
96     }
97 
98     this(float value) pure nothrow @safe @nogc
99     {
100         this();
101         this.value = value;
102     }
103 
104     mixin Make;
105 
106 }
107 
108 class MetadataString : MetadataValue
109 {
110 
111     string value;
112 
113     this() pure nothrow @safe @nogc
114     {
115         super(4);
116     }
117 
118     this(string value) pure nothrow @safe @nogc
119     {
120         this();
121         this.value = value;
122     }
123 
124     mixin Make;
125 
126 }
127 
128 class MetadataSlot : MetadataValue
129 {
130 
131     soupply.bedrock150.types.Slot value;
132 
133     this() pure nothrow @safe @nogc
134     {
135         super(5);
136     }
137 
138     this(soupply.bedrock150.types.Slot value) pure nothrow @safe @nogc
139     {
140         this();
141         this.value = value;
142     }
143 
144     mixin Make;
145 
146 }
147 
148 class MetadataBlockPosition : MetadataValue
149 {
150 
151     @Var Vector!(int, "xyz") value;
152 
153     this() pure nothrow @safe @nogc
154     {
155         super(6);
156     }
157 
158     this(Vector!(int, "xyz") value) pure nothrow @safe @nogc
159     {
160         this();
161         this.value = value;
162     }
163 
164     mixin Make;
165 
166 }
167 
168 class MetadataLong : MetadataValue
169 {
170 
171     @Var long value;
172 
173     this() pure nothrow @safe @nogc
174     {
175         super(7);
176     }
177 
178     this(long value) pure nothrow @safe @nogc
179     {
180         this();
181         this.value = value;
182     }
183 
184     mixin Make;
185 
186 }
187 
188 class MetadataEntityPosition : MetadataValue
189 {
190 
191     Vector!(float, "xyz") value;
192 
193     this() pure nothrow @safe @nogc
194     {
195         super(8);
196     }
197 
198     this(Vector!(float, "xyz") value) pure nothrow @safe @nogc
199     {
200         this();
201         this.value = value;
202     }
203 
204     mixin Make;
205 
206 }
207 
208 struct Metadata
209 {
210 
211     MetadataValue[uint] values;
212 
213     void encodeBody(Buffer buffer)
214     {
215         writeLength!(EndianType.var, uint)(buffer, values.length);
216         foreach(id, value; values)
217         {
218             writeImpl!(EndianType.var, uint)(buffer, id);
219             value.encodeBody(buffer);
220         }
221     }
222 
223     void decodeBody(Buffer buffer)
224     {
225         foreach(i ; 0..readLength!(EndianType.var, uint)(buffer))
226         {
227             uint id = readImpl!(EndianType.var, uint)(buffer);
228             switch(readImpl!(EndianType.var, uint)(buffer))
229             {
230                 case 0:
231                     auto value = new MetadataByte();
232                     value.decodeBody(buffer);
233                     this.values[id] = value;
234                     break;
235                 case 1:
236                     auto value = new MetadataShort();
237                     value.decodeBody(buffer);
238                     this.values[id] = value;
239                     break;
240                 case 2:
241                     auto value = new MetadataInt();
242                     value.decodeBody(buffer);
243                     this.values[id] = value;
244                     break;
245                 case 3:
246                     auto value = new MetadataFloat();
247                     value.decodeBody(buffer);
248                     this.values[id] = value;
249                     break;
250                 case 4:
251                     auto value = new MetadataString();
252                     value.decodeBody(buffer);
253                     this.values[id] = value;
254                     break;
255                 case 5:
256                     auto value = new MetadataSlot();
257                     value.decodeBody(buffer);
258                     this.values[id] = value;
259                     break;
260                 case 6:
261                     auto value = new MetadataBlockPosition();
262                     value.decodeBody(buffer);
263                     this.values[id] = value;
264                     break;
265                 case 7:
266                     auto value = new MetadataLong();
267                     value.decodeBody(buffer);
268                     this.values[id] = value;
269                     break;
270                 case 8:
271                     auto value = new MetadataEntityPosition();
272                     value.decodeBody(buffer);
273                     this.values[id] = value;
274                     break;
275                 default: throw new Exception("Unknown metadata type");
276             }
277         }
278     }
279 
280     @property long entityFlags()
281     {
282         auto ptr = 0 in this.values;
283         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
284         return long(0);
285     }
286 
287     @property long entityFlags(long value)
288     {
289         auto ptr = 0 in this.values;
290         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
291         else this.values[0] = new MetadataLong(value);
292         return value;
293     }
294 
295     @property int health()
296     {
297         auto ptr = 1 in this.values;
298         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
299         return (int).init;
300     }
301 
302     @property int health(int value)
303     {
304         auto ptr = 1 in this.values;
305         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
306         else this.values[1] = new MetadataInt(value);
307         return value;
308     }
309 
310     @property int variant()
311     {
312         auto ptr = 2 in this.values;
313         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
314         return (int).init;
315     }
316 
317     @property int variant(int value)
318     {
319         auto ptr = 2 in this.values;
320         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
321         else this.values[2] = new MetadataInt(value);
322         return value;
323     }
324 
325     @property byte color()
326     {
327         auto ptr = 3 in this.values;
328         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
329         return (byte).init;
330     }
331 
332     @property byte color(byte value)
333     {
334         auto ptr = 3 in this.values;
335         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
336         else this.values[3] = new MetadataByte(value);
337         return value;
338     }
339 
340     @property string nametag()
341     {
342         auto ptr = 4 in this.values;
343         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
344         return (string).init;
345     }
346 
347     @property string nametag(string value)
348     {
349         auto ptr = 4 in this.values;
350         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
351         else this.values[4] = new MetadataString(value);
352         return value;
353     }
354 
355     @property long owner()
356     {
357         auto ptr = 5 in this.values;
358         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
359         return long(-1);
360     }
361 
362     @property long owner(long value)
363     {
364         auto ptr = 5 in this.values;
365         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
366         else this.values[5] = new MetadataLong(value);
367         return value;
368     }
369 
370     @property long target()
371     {
372         auto ptr = 6 in this.values;
373         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
374         return (long).init;
375     }
376 
377     @property long target(long value)
378     {
379         auto ptr = 6 in this.values;
380         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
381         else this.values[6] = new MetadataLong(value);
382         return value;
383     }
384 
385     @property short air()
386     {
387         auto ptr = 7 in this.values;
388         if(ptr && cast(MetadataShort)*ptr) return (cast(MetadataShort)*ptr).value;
389         return short(0);
390     }
391 
392     @property short air(short value)
393     {
394         auto ptr = 7 in this.values;
395         if(ptr && cast(MetadataShort)*ptr) (cast(MetadataShort)*ptr).value = value;
396         else this.values[7] = new MetadataShort(value);
397         return value;
398     }
399 
400     @property int potionColor()
401     {
402         auto ptr = 8 in this.values;
403         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
404         return (int).init;
405     }
406 
407     @property int potionColor(int value)
408     {
409         auto ptr = 8 in this.values;
410         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
411         else this.values[8] = new MetadataInt(value);
412         return value;
413     }
414 
415     @property byte potionAmbient()
416     {
417         auto ptr = 9 in this.values;
418         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
419         return (byte).init;
420     }
421 
422     @property byte potionAmbient(byte value)
423     {
424         auto ptr = 9 in this.values;
425         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
426         else this.values[9] = new MetadataByte(value);
427         return value;
428     }
429 
430     @property int hurtTime()
431     {
432         auto ptr = 11 in this.values;
433         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
434         return (int).init;
435     }
436 
437     @property int hurtTime(int value)
438     {
439         auto ptr = 11 in this.values;
440         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
441         else this.values[11] = new MetadataInt(value);
442         return value;
443     }
444 
445     @property int hurtDirection()
446     {
447         auto ptr = 12 in this.values;
448         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
449         return (int).init;
450     }
451 
452     @property int hurtDirection(int value)
453     {
454         auto ptr = 12 in this.values;
455         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
456         else this.values[12] = new MetadataInt(value);
457         return value;
458     }
459 
460     @property float paddleTimeLeft()
461     {
462         auto ptr = 13 in this.values;
463         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
464         return (float).init;
465     }
466 
467     @property float paddleTimeLeft(float value)
468     {
469         auto ptr = 13 in this.values;
470         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
471         else this.values[13] = new MetadataFloat(value);
472         return value;
473     }
474 
475     @property float paddleTimeRight()
476     {
477         auto ptr = 14 in this.values;
478         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
479         return (float).init;
480     }
481 
482     @property float paddleTimeRight(float value)
483     {
484         auto ptr = 14 in this.values;
485         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
486         else this.values[14] = new MetadataFloat(value);
487         return value;
488     }
489 
490     @property int experienceCount()
491     {
492         auto ptr = 15 in this.values;
493         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
494         return (int).init;
495     }
496 
497     @property int experienceCount(int value)
498     {
499         auto ptr = 15 in this.values;
500         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
501         else this.values[15] = new MetadataInt(value);
502         return value;
503     }
504 
505     @property int minecartBlock()
506     {
507         auto ptr = 16 in this.values;
508         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
509         return (int).init;
510     }
511 
512     @property int minecartBlock(int value)
513     {
514         auto ptr = 16 in this.values;
515         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
516         else this.values[16] = new MetadataInt(value);
517         return value;
518     }
519 
520     @property int minecartOffset()
521     {
522         auto ptr = 17 in this.values;
523         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
524         return (int).init;
525     }
526 
527     @property int minecartOffset(int value)
528     {
529         auto ptr = 17 in this.values;
530         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
531         else this.values[17] = new MetadataInt(value);
532         return value;
533     }
534 
535     @property byte minecartHasBlock()
536     {
537         auto ptr = 18 in this.values;
538         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
539         return (byte).init;
540     }
541 
542     @property byte minecartHasBlock(byte value)
543     {
544         auto ptr = 18 in this.values;
545         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
546         else this.values[18] = new MetadataByte(value);
547         return value;
548     }
549 
550     @property short endermanItemId()
551     {
552         auto ptr = 23 in this.values;
553         if(ptr && cast(MetadataShort)*ptr) return (cast(MetadataShort)*ptr).value;
554         return (short).init;
555     }
556 
557     @property short endermanItemId(short value)
558     {
559         auto ptr = 23 in this.values;
560         if(ptr && cast(MetadataShort)*ptr) (cast(MetadataShort)*ptr).value = value;
561         else this.values[23] = new MetadataShort(value);
562         return value;
563     }
564 
565     @property short endermanItemDamage()
566     {
567         auto ptr = 24 in this.values;
568         if(ptr && cast(MetadataShort)*ptr) return (cast(MetadataShort)*ptr).value;
569         return (short).init;
570     }
571 
572     @property short endermanItemDamage(short value)
573     {
574         auto ptr = 24 in this.values;
575         if(ptr && cast(MetadataShort)*ptr) (cast(MetadataShort)*ptr).value = value;
576         else this.values[24] = new MetadataShort(value);
577         return value;
578     }
579 
580     @property short age()
581     {
582         auto ptr = 25 in this.values;
583         if(ptr && cast(MetadataShort)*ptr) return (cast(MetadataShort)*ptr).value;
584         return (short).init;
585     }
586 
587     @property short age(short value)
588     {
589         auto ptr = 25 in this.values;
590         if(ptr && cast(MetadataShort)*ptr) (cast(MetadataShort)*ptr).value = value;
591         else this.values[25] = new MetadataShort(value);
592         return value;
593     }
594 
595     @property byte playerFlags()
596     {
597         auto ptr = 27 in this.values;
598         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
599         return (byte).init;
600     }
601 
602     @property byte playerFlags(byte value)
603     {
604         auto ptr = 27 in this.values;
605         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
606         else this.values[27] = new MetadataByte(value);
607         return value;
608     }
609 
610     @property int playerIndex()
611     {
612         auto ptr = 28 in this.values;
613         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
614         return (int).init;
615     }
616 
617     @property int playerIndex(int value)
618     {
619         auto ptr = 28 in this.values;
620         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
621         else this.values[28] = new MetadataInt(value);
622         return value;
623     }
624 
625     @property Vector!(int, "xyz") bedPosition()
626     {
627         auto ptr = 29 in this.values;
628         if(ptr && cast(MetadataBlockPosition)*ptr) return (cast(MetadataBlockPosition)*ptr).value;
629         return (Vector!(int, "xyz")).init;
630     }
631 
632     @property Vector!(int, "xyz") bedPosition(Vector!(int, "xyz") value)
633     {
634         auto ptr = 29 in this.values;
635         if(ptr && cast(MetadataBlockPosition)*ptr) (cast(MetadataBlockPosition)*ptr).value = value;
636         else this.values[29] = new MetadataBlockPosition(value);
637         return value;
638     }
639 
640     @property float fireballPowerX()
641     {
642         auto ptr = 30 in this.values;
643         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
644         return (float).init;
645     }
646 
647     @property float fireballPowerX(float value)
648     {
649         auto ptr = 30 in this.values;
650         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
651         else this.values[30] = new MetadataFloat(value);
652         return value;
653     }
654 
655     @property float fireballPowerY()
656     {
657         auto ptr = 31 in this.values;
658         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
659         return (float).init;
660     }
661 
662     @property float fireballPowerY(float value)
663     {
664         auto ptr = 31 in this.values;
665         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
666         else this.values[31] = new MetadataFloat(value);
667         return value;
668     }
669 
670     @property float fireballPowerZ()
671     {
672         auto ptr = 32 in this.values;
673         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
674         return (float).init;
675     }
676 
677     @property float fireballPowerZ(float value)
678     {
679         auto ptr = 32 in this.values;
680         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
681         else this.values[32] = new MetadataFloat(value);
682         return value;
683     }
684 
685     @property short potionAuxValue()
686     {
687         auto ptr = 37 in this.values;
688         if(ptr && cast(MetadataShort)*ptr) return (cast(MetadataShort)*ptr).value;
689         return (short).init;
690     }
691 
692     @property short potionAuxValue(short value)
693     {
694         auto ptr = 37 in this.values;
695         if(ptr && cast(MetadataShort)*ptr) (cast(MetadataShort)*ptr).value = value;
696         else this.values[37] = new MetadataShort(value);
697         return value;
698     }
699 
700     @property long leadHolder()
701     {
702         auto ptr = 38 in this.values;
703         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
704         return long(-1);
705     }
706 
707     @property long leadHolder(long value)
708     {
709         auto ptr = 38 in this.values;
710         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
711         else this.values[38] = new MetadataLong(value);
712         return value;
713     }
714 
715     @property float scale()
716     {
717         auto ptr = 39 in this.values;
718         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
719         return float(1);
720     }
721 
722     @property float scale(float value)
723     {
724         auto ptr = 39 in this.values;
725         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
726         else this.values[39] = new MetadataFloat(value);
727         return value;
728     }
729 
730     @property string interactiveTag()
731     {
732         auto ptr = 40 in this.values;
733         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
734         return (string).init;
735     }
736 
737     @property string interactiveTag(string value)
738     {
739         auto ptr = 40 in this.values;
740         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
741         else this.values[40] = new MetadataString(value);
742         return value;
743     }
744 
745     @property string npcId()
746     {
747         auto ptr = 41 in this.values;
748         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
749         return (string).init;
750     }
751 
752     @property string npcId(string value)
753     {
754         auto ptr = 41 in this.values;
755         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
756         else this.values[41] = new MetadataString(value);
757         return value;
758     }
759 
760     @property string interactiveTagUrl()
761     {
762         auto ptr = 42 in this.values;
763         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
764         return (string).init;
765     }
766 
767     @property string interactiveTagUrl(string value)
768     {
769         auto ptr = 42 in this.values;
770         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
771         else this.values[42] = new MetadataString(value);
772         return value;
773     }
774 
775     @property short maxAir()
776     {
777         auto ptr = 43 in this.values;
778         if(ptr && cast(MetadataShort)*ptr) return (cast(MetadataShort)*ptr).value;
779         return (short).init;
780     }
781 
782     @property short maxAir(short value)
783     {
784         auto ptr = 43 in this.values;
785         if(ptr && cast(MetadataShort)*ptr) (cast(MetadataShort)*ptr).value = value;
786         else this.values[43] = new MetadataShort(value);
787         return value;
788     }
789 
790     @property int markVariant()
791     {
792         auto ptr = 44 in this.values;
793         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
794         return (int).init;
795     }
796 
797     @property int markVariant(int value)
798     {
799         auto ptr = 44 in this.values;
800         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
801         else this.values[44] = new MetadataInt(value);
802         return value;
803     }
804 
805     @property Vector!(int, "xyz") blockTarget()
806     {
807         auto ptr = 48 in this.values;
808         if(ptr && cast(MetadataBlockPosition)*ptr) return (cast(MetadataBlockPosition)*ptr).value;
809         return (Vector!(int, "xyz")).init;
810     }
811 
812     @property Vector!(int, "xyz") blockTarget(Vector!(int, "xyz") value)
813     {
814         auto ptr = 48 in this.values;
815         if(ptr && cast(MetadataBlockPosition)*ptr) (cast(MetadataBlockPosition)*ptr).value = value;
816         else this.values[48] = new MetadataBlockPosition(value);
817         return value;
818     }
819 
820     @property int invulnerableTime()
821     {
822         auto ptr = 49 in this.values;
823         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
824         return (int).init;
825     }
826 
827     @property int invulnerableTime(int value)
828     {
829         auto ptr = 49 in this.values;
830         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
831         else this.values[49] = new MetadataInt(value);
832         return value;
833     }
834 
835     @property long centerHeadTarget()
836     {
837         auto ptr = 50 in this.values;
838         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
839         return (long).init;
840     }
841 
842     @property long centerHeadTarget(long value)
843     {
844         auto ptr = 50 in this.values;
845         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
846         else this.values[50] = new MetadataLong(value);
847         return value;
848     }
849 
850     @property long leftHeadTarget()
851     {
852         auto ptr = 51 in this.values;
853         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
854         return (long).init;
855     }
856 
857     @property long leftHeadTarget(long value)
858     {
859         auto ptr = 51 in this.values;
860         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
861         else this.values[51] = new MetadataLong(value);
862         return value;
863     }
864 
865     @property long rightHeadTarget()
866     {
867         auto ptr = 52 in this.values;
868         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
869         return (long).init;
870     }
871 
872     @property long rightHeadTarget(long value)
873     {
874         auto ptr = 52 in this.values;
875         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
876         else this.values[52] = new MetadataLong(value);
877         return value;
878     }
879 
880     @property float boundingBoxWidth()
881     {
882         auto ptr = 54 in this.values;
883         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
884         return (float).init;
885     }
886 
887     @property float boundingBoxWidth(float value)
888     {
889         auto ptr = 54 in this.values;
890         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
891         else this.values[54] = new MetadataFloat(value);
892         return value;
893     }
894 
895     @property float boundingBoxHeight()
896     {
897         auto ptr = 55 in this.values;
898         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
899         return (float).init;
900     }
901 
902     @property float boundingBoxHeight(float value)
903     {
904         auto ptr = 55 in this.values;
905         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
906         else this.values[55] = new MetadataFloat(value);
907         return value;
908     }
909 
910     @property int fuseLength()
911     {
912         auto ptr = 56 in this.values;
913         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
914         return (int).init;
915     }
916 
917     @property int fuseLength(int value)
918     {
919         auto ptr = 56 in this.values;
920         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
921         else this.values[56] = new MetadataInt(value);
922         return value;
923     }
924 
925     @property Vector!(float, "xyz") riderSeatPosition()
926     {
927         auto ptr = 57 in this.values;
928         if(ptr && cast(MetadataEntityPosition)*ptr) return (cast(MetadataEntityPosition)*ptr).value;
929         return (Vector!(float, "xyz")).init;
930     }
931 
932     @property Vector!(float, "xyz") riderSeatPosition(Vector!(float, "xyz") value)
933     {
934         auto ptr = 57 in this.values;
935         if(ptr && cast(MetadataEntityPosition)*ptr) (cast(MetadataEntityPosition)*ptr).value = value;
936         else this.values[57] = new MetadataEntityPosition(value);
937         return value;
938     }
939 
940     @property byte riderRotationLocked()
941     {
942         auto ptr = 58 in this.values;
943         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
944         return (byte).init;
945     }
946 
947     @property byte riderRotationLocked(byte value)
948     {
949         auto ptr = 58 in this.values;
950         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
951         else this.values[58] = new MetadataByte(value);
952         return value;
953     }
954 
955     @property float riderMaxRotation()
956     {
957         auto ptr = 59 in this.values;
958         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
959         return (float).init;
960     }
961 
962     @property float riderMaxRotation(float value)
963     {
964         auto ptr = 59 in this.values;
965         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
966         else this.values[59] = new MetadataFloat(value);
967         return value;
968     }
969 
970     @property float riderMinRotation()
971     {
972         auto ptr = 60 in this.values;
973         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
974         return (float).init;
975     }
976 
977     @property float riderMinRotation(float value)
978     {
979         auto ptr = 60 in this.values;
980         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
981         else this.values[60] = new MetadataFloat(value);
982         return value;
983     }
984 
985     @property float areaEffectCloudRadius()
986     {
987         auto ptr = 61 in this.values;
988         if(ptr && cast(MetadataFloat)*ptr) return (cast(MetadataFloat)*ptr).value;
989         return float(0.5);
990     }
991 
992     @property float areaEffectCloudRadius(float value)
993     {
994         auto ptr = 61 in this.values;
995         if(ptr && cast(MetadataFloat)*ptr) (cast(MetadataFloat)*ptr).value = value;
996         else this.values[61] = new MetadataFloat(value);
997         return value;
998     }
999 
1000     @property int areaEffectCloudWaiting()
1001     {
1002         auto ptr = 62 in this.values;
1003         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
1004         return (int).init;
1005     }
1006 
1007     @property int areaEffectCloudWaiting(int value)
1008     {
1009         auto ptr = 62 in this.values;
1010         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
1011         else this.values[62] = new MetadataInt(value);
1012         return value;
1013     }
1014 
1015     @property int areaEffectCloudParticle()
1016     {
1017         auto ptr = 63 in this.values;
1018         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
1019         return (int).init;
1020     }
1021 
1022     @property int areaEffectCloudParticle(int value)
1023     {
1024         auto ptr = 63 in this.values;
1025         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
1026         else this.values[63] = new MetadataInt(value);
1027         return value;
1028     }
1029 
1030     @property int shulkerPeakHeight()
1031     {
1032         auto ptr = 64 in this.values;
1033         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
1034         return (int).init;
1035     }
1036 
1037     @property int shulkerPeakHeight(int value)
1038     {
1039         auto ptr = 64 in this.values;
1040         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
1041         else this.values[64] = new MetadataInt(value);
1042         return value;
1043     }
1044 
1045     @property byte shulkerDirection()
1046     {
1047         auto ptr = 65 in this.values;
1048         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
1049         return (byte).init;
1050     }
1051 
1052     @property byte shulkerDirection(byte value)
1053     {
1054         auto ptr = 65 in this.values;
1055         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
1056         else this.values[65] = new MetadataByte(value);
1057         return value;
1058     }
1059 
1060     @property Vector!(int, "xyz") shulkerAttachment()
1061     {
1062         auto ptr = 67 in this.values;
1063         if(ptr && cast(MetadataBlockPosition)*ptr) return (cast(MetadataBlockPosition)*ptr).value;
1064         return (Vector!(int, "xyz")).init;
1065     }
1066 
1067     @property Vector!(int, "xyz") shulkerAttachment(Vector!(int, "xyz") value)
1068     {
1069         auto ptr = 67 in this.values;
1070         if(ptr && cast(MetadataBlockPosition)*ptr) (cast(MetadataBlockPosition)*ptr).value = value;
1071         else this.values[67] = new MetadataBlockPosition(value);
1072         return value;
1073     }
1074 
1075     @property long tradingPlayer()
1076     {
1077         auto ptr = 68 in this.values;
1078         if(ptr && cast(MetadataLong)*ptr) return (cast(MetadataLong)*ptr).value;
1079         return (long).init;
1080     }
1081 
1082     @property long tradingPlayer(long value)
1083     {
1084         auto ptr = 68 in this.values;
1085         if(ptr && cast(MetadataLong)*ptr) (cast(MetadataLong)*ptr).value = value;
1086         else this.values[68] = new MetadataLong(value);
1087         return value;
1088     }
1089 
1090     @property string commandBlockCommand()
1091     {
1092         auto ptr = 71 in this.values;
1093         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
1094         return (string).init;
1095     }
1096 
1097     @property string commandBlockCommand(string value)
1098     {
1099         auto ptr = 71 in this.values;
1100         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
1101         else this.values[71] = new MetadataString(value);
1102         return value;
1103     }
1104 
1105     @property string commandBlockLastOutput()
1106     {
1107         auto ptr = 72 in this.values;
1108         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
1109         return (string).init;
1110     }
1111 
1112     @property string commandBlockLastOutput(string value)
1113     {
1114         auto ptr = 72 in this.values;
1115         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
1116         else this.values[72] = new MetadataString(value);
1117         return value;
1118     }
1119 
1120     @property string commandBlockTrackOutput()
1121     {
1122         auto ptr = 73 in this.values;
1123         if(ptr && cast(MetadataString)*ptr) return (cast(MetadataString)*ptr).value;
1124         return (string).init;
1125     }
1126 
1127     @property string commandBlockTrackOutput(string value)
1128     {
1129         auto ptr = 73 in this.values;
1130         if(ptr && cast(MetadataString)*ptr) (cast(MetadataString)*ptr).value = value;
1131         else this.values[73] = new MetadataString(value);
1132         return value;
1133     }
1134 
1135     @property byte controllingRiderSeatNumber()
1136     {
1137         auto ptr = 74 in this.values;
1138         if(ptr && cast(MetadataByte)*ptr) return (cast(MetadataByte)*ptr).value;
1139         return (byte).init;
1140     }
1141 
1142     @property byte controllingRiderSeatNumber(byte value)
1143     {
1144         auto ptr = 74 in this.values;
1145         if(ptr && cast(MetadataByte)*ptr) (cast(MetadataByte)*ptr).value = value;
1146         else this.values[74] = new MetadataByte(value);
1147         return value;
1148     }
1149 
1150     @property int strength()
1151     {
1152         auto ptr = 75 in this.values;
1153         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
1154         return (int).init;
1155     }
1156 
1157     @property int strength(int value)
1158     {
1159         auto ptr = 75 in this.values;
1160         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
1161         else this.values[75] = new MetadataInt(value);
1162         return value;
1163     }
1164 
1165     @property int maxStrength()
1166     {
1167         auto ptr = 76 in this.values;
1168         if(ptr && cast(MetadataInt)*ptr) return (cast(MetadataInt)*ptr).value;
1169         return (int).init;
1170     }
1171 
1172     @property int maxStrength(int value)
1173     {
1174         auto ptr = 76 in this.values;
1175         if(ptr && cast(MetadataInt)*ptr) (cast(MetadataInt)*ptr).value = value;
1176         else this.values[76] = new MetadataInt(value);
1177         return value;
1178     }
1179 
1180 }