1 /*
2  * This file was automatically generated by sel-utils and
3  * released under the MIT License.
4  * 
5  * License: https://github.com/sel-project/sel-utils/blob/master/LICENSE
6  * Repository: https://github.com/sel-project/sel-utils
7  * Generated from https://github.com/sel-project/sel-utils/blob/master/xml/metadata/bedrock160.xml
8  */
9 module sul.metadata.bedrock160;
10 
11 import std.typecons : Tuple, tuple;
12 
13 import sul.utils.buffer : Buffer;
14 import sul.utils.metadataflags;
15 import sul.utils.var;
16 
17 static import sul.protocol.bedrock160.types;
18 
19 alias Changed(T) = Tuple!(T, "value", bool, "changed");
20 
21 enum MetadataType : uint {
22 
23 	BYTE = 0,
24 	SHORT = 1,
25 	INT = 2,
26 	FLOAT = 3,
27 	STRING = 4,
28 	SLOT = 5,
29 	BLOCK_POSITION = 6,
30 	LONG = 7,
31 	ENTITY_POSITION = 8,
32 }
33 
34 class Metadata {
35 
36 	public enum ENTITY_FLAGS : size_t {
37 		ON_FIRE = 0,
38 		SNEAKING = 1,
39 		RIDING = 2,
40 		SPRINTING = 3,
41 		USING_ITEM = 4,
42 		INVISIBLE = 5,
43 		TEMPTED = 6,
44 		IN_LOVE = 7,
45 		SADDLED = 8,
46 		POWERED = 9,
47 		IGNITED = 10,
48 		BABY = 11,
49 		CONVERTING = 12,
50 		CRITICAL = 13,
51 		SHOW_NAMETAG = 14,
52 		ALWAYS_SHOW_NAMETAG = 15,
53 		NO_AI = 16,
54 		SILENT = 17,
55 		CLIMBING = 18,
56 		CAN_CLIMB = 19,
57 		CAN_SWIM = 20,
58 		CAN_FLY = 21,
59 		RESTING = 22,
60 		SITTING = 23,
61 		ANGRY = 24,
62 		INTERESTED = 25,
63 		CHARGED = 26,
64 		TAMED = 27,
65 		LEASHED = 28,
66 		SHEARED = 29,
67 		GLIDING = 30,
68 		ELDER = 31,
69 		MOVING = 32,
70 		BREATHING = 33,
71 		CHESTED = 34,
72 		STACKABLE = 35,
73 		SHOWBASE = 36,
74 		REARING = 37,
75 		VIBRATING = 38,
76 		IDLING = 39,
77 		EVOKER_SPELL = 40,
78 		CHARGE_ATTACK = 41,
79 		IS_WASD_CONTROLLED = 42,
80 		LINGER = 44,
81 		COLLIDE = 45,
82 		GRAVITY = 46,
83 		DANCING = 48,
84 	}
85 	public enum uint HEALTH = 1;
86 	public enum uint VARIANT = 2;
87 	public enum uint COLOR = 3;
88 	public enum uint NAMETAG = 4;
89 	public enum uint OWNER = 5;
90 	public enum uint TARGET = 6;
91 	public enum uint AIR = 7;
92 	public enum uint POTION_COLOR = 8;
93 	public enum uint POTION_AMBIENT = 9;
94 	public enum uint HURT_TIME = 11;
95 	public enum uint HURT_DIRECTION = 12;
96 	public enum uint PADDLE_TIME_LEFT = 13;
97 	public enum uint PADDLE_TIME_RIGHT = 14;
98 	public enum uint EXPERIENCE_COUNT = 15;
99 	public enum uint MINECART_BLOCK = 16;
100 	public enum uint MINECART_OFFSET = 17;
101 	public enum uint MINECART_HAS_BLOCK = 18;
102 	public enum uint ENDERMAN_ITEM_ID = 23;
103 	public enum uint ENDERMAN_ITEM_DAMAGE = 24;
104 	public enum uint AGE = 25;
105 	public enum PLAYER_FLAGS : size_t {
106 		ASLEEP = 1,
107 	}
108 	public enum uint PLAYER_INDEX = 28;
109 	public enum uint BED_POSITION = 29;
110 	public enum uint FIREBALL_POWER_X = 30;
111 	public enum uint FIREBALL_POWER_Y = 31;
112 	public enum uint FIREBALL_POWER_Z = 32;
113 	public enum uint POTION_AUX_VALUE = 37;
114 	public enum uint LEAD_HOLDER = 38;
115 	public enum uint SCALE = 39;
116 	public enum uint INTERACTIVE_TAG = 40;
117 	public enum uint NPC_ID = 41;
118 	public enum uint INTERACTIVE_TAG_URL = 42;
119 	public enum uint MAX_AIR = 43;
120 	public enum uint MARK_VARIANT = 44;
121 	public enum uint BLOCK_TARGET = 48;
122 	public enum uint INVULNERABLE_TIME = 49;
123 	public enum uint CENTER_HEAD_TARGET = 50;
124 	public enum uint LEFT_HEAD_TARGET = 51;
125 	public enum uint RIGHT_HEAD_TARGET = 52;
126 	public enum uint BOUNDING_BOX_WIDTH = 54;
127 	public enum uint BOUNDING_BOX_HEIGHT = 55;
128 	public enum uint FUSE_LENGTH = 56;
129 	public enum uint RIDER_SEAT_POSITION = 57;
130 	public enum uint RIDER_ROTATION_LOCKED = 58;
131 	public enum uint RIDER_MAX_ROTATION = 59;
132 	public enum uint RIDER_MIN_ROTATION = 60;
133 	public enum uint AREA_EFFECT_CLOUD_RADIUS = 61;
134 	public enum uint AREA_EFFECT_CLOUD_WAITING = 62;
135 	public enum uint AREA_EFFECT_CLOUD_PARTICLE = 63;
136 	public enum uint SHULKER_PEAK_HEIGHT = 64;
137 	public enum uint SHULKER_DIRECTION = 65;
138 	public enum uint SHULKER_ATTACHMENT = 67;
139 	public enum uint TRADING_PLAYER = 68;
140 	public enum uint COMMAND_BLOCK_COMMAND = 71;
141 	public enum uint COMMAND_BLOCK_LAST_OUTPUT = 72;
142 	public enum uint COMMAND_BLOCK_TRACK_OUTPUT = 73;
143 	public enum uint CONTROLLING_RIDER_SEAT_NUMBER = 74;
144 	public enum uint STRENGTH = 75;
145 	public enum uint MAX_STRENGTH = 76;
146 
147 	public DecodedMetadata[] decoded;
148 
149 	private bool _cached = false;
150 	private ubyte[] _cache;
151 
152 	private void delegate(Buffer) pure nothrow @safe[] _changed;
153 
154 	private MetadataFlags!(long) _entityFlags = cast(MetadataFlags!(long))0;
155 	private Changed!(int) _health;
156 	private Changed!(int) _variant;
157 	private Changed!(byte) _color;
158 	private Changed!(string) _nametag;
159 	private Changed!(long) _owner = tuple(cast(long)-1, false);
160 	private Changed!(long) _target;
161 	private short _air = cast(short)0;
162 	private Changed!(int) _potionColor;
163 	private Changed!(byte) _potionAmbient;
164 	private Changed!(int) _hurtTime;
165 	private Changed!(int) _hurtDirection;
166 	private Changed!(float) _paddleTimeLeft;
167 	private Changed!(float) _paddleTimeRight;
168 	private Changed!(int) _experienceCount;
169 	private Changed!(int) _minecartBlock;
170 	private Changed!(int) _minecartOffset;
171 	private Changed!(byte) _minecartHasBlock;
172 	private Changed!(short) _endermanItemId;
173 	private Changed!(short) _endermanItemDamage;
174 	private Changed!(short) _age;
175 	private Changed!(MetadataFlags!(byte)) _playerFlags;
176 	private Changed!(int) _playerIndex;
177 	private Changed!(Tuple!(int, "x", int, "y", int, "z")) _bedPosition;
178 	private Changed!(float) _fireballPowerX;
179 	private Changed!(float) _fireballPowerY;
180 	private Changed!(float) _fireballPowerZ;
181 	private Changed!(short) _potionAuxValue;
182 	private long _leadHolder = cast(long)-1;
183 	private Changed!(float) _scale = tuple(cast(float)1, false);
184 	private Changed!(string) _interactiveTag;
185 	private Changed!(string) _npcId;
186 	private Changed!(string) _interactiveTagUrl;
187 	private Changed!(short) _maxAir;
188 	private Changed!(int) _markVariant;
189 	private Changed!(Tuple!(int, "x", int, "y", int, "z")) _blockTarget;
190 	private Changed!(int) _invulnerableTime;
191 	private Changed!(long) _centerHeadTarget;
192 	private Changed!(long) _leftHeadTarget;
193 	private Changed!(long) _rightHeadTarget;
194 	private Changed!(float) _boundingBoxWidth;
195 	private Changed!(float) _boundingBoxHeight;
196 	private Changed!(int) _fuseLength;
197 	private Changed!(Tuple!(float, "x", float, "y", float, "z")) _riderSeatPosition;
198 	private Changed!(byte) _riderRotationLocked;
199 	private Changed!(float) _riderMaxRotation;
200 	private Changed!(float) _riderMinRotation;
201 	private Changed!(float) _areaEffectCloudRadius = tuple(cast(float)0.5, false);
202 	private Changed!(int) _areaEffectCloudWaiting;
203 	private Changed!(int) _areaEffectCloudParticle;
204 	private Changed!(int) _shulkerPeakHeight;
205 	private Changed!(byte) _shulkerDirection;
206 	private Changed!(Tuple!(int, "x", int, "y", int, "z")) _shulkerAttachment;
207 	private Changed!(long) _tradingPlayer;
208 	private Changed!(string) _commandBlockCommand;
209 	private Changed!(string) _commandBlockLastOutput;
210 	private Changed!(string) _commandBlockTrackOutput;
211 	private Changed!(byte) _controllingRiderSeatNumber;
212 	private Changed!(int) _strength;
213 	private Changed!(int) _maxStrength;
214 
215 	public pure nothrow @safe this() {
216 		this.reset();
217 	}
218 
219 	public pure nothrow @safe void reset() {
220 		this._changed = [
221 			&this.encodeEntityFlags,
222 			&this.encodeAir,
223 			&this.encodeLeadHolder,
224 		];
225 	}
226 
227 	public pure nothrow @property @safe @nogc long entityFlags() {
228 		return _entityFlags;
229 	}
230 
231 	public pure nothrow @property @safe long entityFlags(long value) {
232 		this._cached = false;
233 		this._entityFlags = value;
234 		return value;
235 	}
236 
237 	public pure nothrow @safe encodeEntityFlags(Buffer buffer) {
238 		with(buffer) {
239 			writeBytes(varuint.encode(0));
240 			writeBytes(varuint.encode(7));
241 			writeBytes(varlong.encode(this._entityFlags));
242 		}
243 	}
244 
245 	public pure nothrow @property @safe bool onFire() {
246 		return _entityFlags._0;
247 	}
248 
249 	public pure nothrow @property @safe bool onFire(bool value) {
250 		_entityFlags._0 = value;
251 		return value;
252 	}
253 
254 	public pure nothrow @property @safe bool sneaking() {
255 		return _entityFlags._1;
256 	}
257 
258 	public pure nothrow @property @safe bool sneaking(bool value) {
259 		_entityFlags._1 = value;
260 		return value;
261 	}
262 
263 	public pure nothrow @property @safe bool riding() {
264 		return _entityFlags._2;
265 	}
266 
267 	public pure nothrow @property @safe bool riding(bool value) {
268 		_entityFlags._2 = value;
269 		return value;
270 	}
271 
272 	public pure nothrow @property @safe bool sprinting() {
273 		return _entityFlags._3;
274 	}
275 
276 	public pure nothrow @property @safe bool sprinting(bool value) {
277 		_entityFlags._3 = value;
278 		return value;
279 	}
280 
281 	public pure nothrow @property @safe bool usingItem() {
282 		return _entityFlags._4;
283 	}
284 
285 	public pure nothrow @property @safe bool usingItem(bool value) {
286 		_entityFlags._4 = value;
287 		return value;
288 	}
289 
290 	public pure nothrow @property @safe bool invisible() {
291 		return _entityFlags._5;
292 	}
293 
294 	public pure nothrow @property @safe bool invisible(bool value) {
295 		_entityFlags._5 = value;
296 		return value;
297 	}
298 
299 	public pure nothrow @property @safe bool tempted() {
300 		return _entityFlags._6;
301 	}
302 
303 	public pure nothrow @property @safe bool tempted(bool value) {
304 		_entityFlags._6 = value;
305 		return value;
306 	}
307 
308 	public pure nothrow @property @safe bool inLove() {
309 		return _entityFlags._7;
310 	}
311 
312 	public pure nothrow @property @safe bool inLove(bool value) {
313 		_entityFlags._7 = value;
314 		return value;
315 	}
316 
317 	public pure nothrow @property @safe bool saddled() {
318 		return _entityFlags._8;
319 	}
320 
321 	public pure nothrow @property @safe bool saddled(bool value) {
322 		_entityFlags._8 = value;
323 		return value;
324 	}
325 
326 	public pure nothrow @property @safe bool powered() {
327 		return _entityFlags._9;
328 	}
329 
330 	public pure nothrow @property @safe bool powered(bool value) {
331 		_entityFlags._9 = value;
332 		return value;
333 	}
334 
335 	public pure nothrow @property @safe bool ignited() {
336 		return _entityFlags._10;
337 	}
338 
339 	public pure nothrow @property @safe bool ignited(bool value) {
340 		_entityFlags._10 = value;
341 		return value;
342 	}
343 
344 	public pure nothrow @property @safe bool baby() {
345 		return _entityFlags._11;
346 	}
347 
348 	public pure nothrow @property @safe bool baby(bool value) {
349 		_entityFlags._11 = value;
350 		return value;
351 	}
352 
353 	public pure nothrow @property @safe bool converting() {
354 		return _entityFlags._12;
355 	}
356 
357 	public pure nothrow @property @safe bool converting(bool value) {
358 		_entityFlags._12 = value;
359 		return value;
360 	}
361 
362 	public pure nothrow @property @safe bool critical() {
363 		return _entityFlags._13;
364 	}
365 
366 	public pure nothrow @property @safe bool critical(bool value) {
367 		_entityFlags._13 = value;
368 		return value;
369 	}
370 
371 	public pure nothrow @property @safe bool showNametag() {
372 		return _entityFlags._14;
373 	}
374 
375 	public pure nothrow @property @safe bool showNametag(bool value) {
376 		_entityFlags._14 = value;
377 		return value;
378 	}
379 
380 	public pure nothrow @property @safe bool alwaysShowNametag() {
381 		return _entityFlags._15;
382 	}
383 
384 	public pure nothrow @property @safe bool alwaysShowNametag(bool value) {
385 		_entityFlags._15 = value;
386 		return value;
387 	}
388 
389 	public pure nothrow @property @safe bool noAi() {
390 		return _entityFlags._16;
391 	}
392 
393 	public pure nothrow @property @safe bool noAi(bool value) {
394 		_entityFlags._16 = value;
395 		return value;
396 	}
397 
398 	public pure nothrow @property @safe bool silent() {
399 		return _entityFlags._17;
400 	}
401 
402 	public pure nothrow @property @safe bool silent(bool value) {
403 		_entityFlags._17 = value;
404 		return value;
405 	}
406 
407 	public pure nothrow @property @safe bool climbing() {
408 		return _entityFlags._18;
409 	}
410 
411 	public pure nothrow @property @safe bool climbing(bool value) {
412 		_entityFlags._18 = value;
413 		return value;
414 	}
415 
416 	public pure nothrow @property @safe bool canClimb() {
417 		return _entityFlags._19;
418 	}
419 
420 	public pure nothrow @property @safe bool canClimb(bool value) {
421 		_entityFlags._19 = value;
422 		return value;
423 	}
424 
425 	public pure nothrow @property @safe bool canSwim() {
426 		return _entityFlags._20;
427 	}
428 
429 	public pure nothrow @property @safe bool canSwim(bool value) {
430 		_entityFlags._20 = value;
431 		return value;
432 	}
433 
434 	public pure nothrow @property @safe bool canFly() {
435 		return _entityFlags._21;
436 	}
437 
438 	public pure nothrow @property @safe bool canFly(bool value) {
439 		_entityFlags._21 = value;
440 		return value;
441 	}
442 
443 	public pure nothrow @property @safe bool resting() {
444 		return _entityFlags._22;
445 	}
446 
447 	public pure nothrow @property @safe bool resting(bool value) {
448 		_entityFlags._22 = value;
449 		return value;
450 	}
451 
452 	public pure nothrow @property @safe bool sitting() {
453 		return _entityFlags._23;
454 	}
455 
456 	public pure nothrow @property @safe bool sitting(bool value) {
457 		_entityFlags._23 = value;
458 		return value;
459 	}
460 
461 	public pure nothrow @property @safe bool angry() {
462 		return _entityFlags._24;
463 	}
464 
465 	public pure nothrow @property @safe bool angry(bool value) {
466 		_entityFlags._24 = value;
467 		return value;
468 	}
469 
470 	public pure nothrow @property @safe bool interested() {
471 		return _entityFlags._25;
472 	}
473 
474 	public pure nothrow @property @safe bool interested(bool value) {
475 		_entityFlags._25 = value;
476 		return value;
477 	}
478 
479 	public pure nothrow @property @safe bool charged() {
480 		return _entityFlags._26;
481 	}
482 
483 	public pure nothrow @property @safe bool charged(bool value) {
484 		_entityFlags._26 = value;
485 		return value;
486 	}
487 
488 	public pure nothrow @property @safe bool tamed() {
489 		return _entityFlags._27;
490 	}
491 
492 	public pure nothrow @property @safe bool tamed(bool value) {
493 		_entityFlags._27 = value;
494 		return value;
495 	}
496 
497 	public pure nothrow @property @safe bool leashed() {
498 		return _entityFlags._28;
499 	}
500 
501 	public pure nothrow @property @safe bool leashed(bool value) {
502 		_entityFlags._28 = value;
503 		return value;
504 	}
505 
506 	public pure nothrow @property @safe bool sheared() {
507 		return _entityFlags._29;
508 	}
509 
510 	public pure nothrow @property @safe bool sheared(bool value) {
511 		_entityFlags._29 = value;
512 		return value;
513 	}
514 
515 	public pure nothrow @property @safe bool gliding() {
516 		return _entityFlags._30;
517 	}
518 
519 	public pure nothrow @property @safe bool gliding(bool value) {
520 		_entityFlags._30 = value;
521 		return value;
522 	}
523 
524 	public pure nothrow @property @safe bool elder() {
525 		return _entityFlags._31;
526 	}
527 
528 	public pure nothrow @property @safe bool elder(bool value) {
529 		_entityFlags._31 = value;
530 		return value;
531 	}
532 
533 	public pure nothrow @property @safe bool moving() {
534 		return _entityFlags._32;
535 	}
536 
537 	public pure nothrow @property @safe bool moving(bool value) {
538 		_entityFlags._32 = value;
539 		return value;
540 	}
541 
542 	public pure nothrow @property @safe bool breathing() {
543 		return _entityFlags._33;
544 	}
545 
546 	public pure nothrow @property @safe bool breathing(bool value) {
547 		_entityFlags._33 = value;
548 		return value;
549 	}
550 
551 	public pure nothrow @property @safe bool chested() {
552 		return _entityFlags._34;
553 	}
554 
555 	public pure nothrow @property @safe bool chested(bool value) {
556 		_entityFlags._34 = value;
557 		return value;
558 	}
559 
560 	public pure nothrow @property @safe bool stackable() {
561 		return _entityFlags._35;
562 	}
563 
564 	public pure nothrow @property @safe bool stackable(bool value) {
565 		_entityFlags._35 = value;
566 		return value;
567 	}
568 
569 	public pure nothrow @property @safe bool showbase() {
570 		return _entityFlags._36;
571 	}
572 
573 	public pure nothrow @property @safe bool showbase(bool value) {
574 		_entityFlags._36 = value;
575 		return value;
576 	}
577 
578 	public pure nothrow @property @safe bool rearing() {
579 		return _entityFlags._37;
580 	}
581 
582 	public pure nothrow @property @safe bool rearing(bool value) {
583 		_entityFlags._37 = value;
584 		return value;
585 	}
586 
587 	public pure nothrow @property @safe bool vibrating() {
588 		return _entityFlags._38;
589 	}
590 
591 	public pure nothrow @property @safe bool vibrating(bool value) {
592 		_entityFlags._38 = value;
593 		return value;
594 	}
595 
596 	public pure nothrow @property @safe bool idling() {
597 		return _entityFlags._39;
598 	}
599 
600 	public pure nothrow @property @safe bool idling(bool value) {
601 		_entityFlags._39 = value;
602 		return value;
603 	}
604 
605 	public pure nothrow @property @safe bool evokerSpell() {
606 		return _entityFlags._40;
607 	}
608 
609 	public pure nothrow @property @safe bool evokerSpell(bool value) {
610 		_entityFlags._40 = value;
611 		return value;
612 	}
613 
614 	public pure nothrow @property @safe bool chargeAttack() {
615 		return _entityFlags._41;
616 	}
617 
618 	public pure nothrow @property @safe bool chargeAttack(bool value) {
619 		_entityFlags._41 = value;
620 		return value;
621 	}
622 
623 	public pure nothrow @property @safe bool isWasdControlled() {
624 		return _entityFlags._42;
625 	}
626 
627 	public pure nothrow @property @safe bool isWasdControlled(bool value) {
628 		_entityFlags._42 = value;
629 		return value;
630 	}
631 
632 	public pure nothrow @property @safe bool linger() {
633 		return _entityFlags._44;
634 	}
635 
636 	public pure nothrow @property @safe bool linger(bool value) {
637 		_entityFlags._44 = value;
638 		return value;
639 	}
640 
641 	public pure nothrow @property @safe bool collide() {
642 		return _entityFlags._45;
643 	}
644 
645 	public pure nothrow @property @safe bool collide(bool value) {
646 		_entityFlags._45 = value;
647 		return value;
648 	}
649 
650 	public pure nothrow @property @safe bool gravity() {
651 		return _entityFlags._46;
652 	}
653 
654 	public pure nothrow @property @safe bool gravity(bool value) {
655 		_entityFlags._46 = value;
656 		return value;
657 	}
658 
659 	public pure nothrow @property @safe bool dancing() {
660 		return _entityFlags._48;
661 	}
662 
663 	public pure nothrow @property @safe bool dancing(bool value) {
664 		_entityFlags._48 = value;
665 		return value;
666 	}
667 
668 	public pure nothrow @property @safe @nogc int health() {
669 		return _health.value;
670 	}
671 
672 	public pure nothrow @property @safe int health(int value) {
673 		this._cached = false;
674 		this._health.value = value;
675 		if(!this._health.changed) {
676 			this._health.changed = true;
677 			this._changed ~= &this.encodeHealth;
678 		}
679 		return value;
680 	}
681 
682 	public pure nothrow @safe encodeHealth(Buffer buffer) {
683 		with(buffer) {
684 			writeBytes(varuint.encode(1));
685 			writeBytes(varuint.encode(2));
686 			writeBytes(varint.encode(this._health.value));
687 		}
688 	}
689 
690 	public pure nothrow @property @safe @nogc int variant() {
691 		return _variant.value;
692 	}
693 
694 	public pure nothrow @property @safe int variant(int value) {
695 		this._cached = false;
696 		this._variant.value = value;
697 		if(!this._variant.changed) {
698 			this._variant.changed = true;
699 			this._changed ~= &this.encodeVariant;
700 		}
701 		return value;
702 	}
703 
704 	public pure nothrow @safe encodeVariant(Buffer buffer) {
705 		with(buffer) {
706 			writeBytes(varuint.encode(2));
707 			writeBytes(varuint.encode(2));
708 			writeBytes(varint.encode(this._variant.value));
709 		}
710 	}
711 
712 	public pure nothrow @property @safe @nogc byte color() {
713 		return _color.value;
714 	}
715 
716 	public pure nothrow @property @safe byte color(byte value) {
717 		this._cached = false;
718 		this._color.value = value;
719 		if(!this._color.changed) {
720 			this._color.changed = true;
721 			this._changed ~= &this.encodeColor;
722 		}
723 		return value;
724 	}
725 
726 	public pure nothrow @safe encodeColor(Buffer buffer) {
727 		with(buffer) {
728 			writeBytes(varuint.encode(3));
729 			writeBytes(varuint.encode(0));
730 			writeLittleEndianByte(this._color.value);
731 		}
732 	}
733 
734 	public pure nothrow @property @safe @nogc string nametag() {
735 		return _nametag.value;
736 	}
737 
738 	public pure nothrow @property @safe string nametag(string value) {
739 		this._cached = false;
740 		this._nametag.value = value;
741 		if(!this._nametag.changed) {
742 			this._nametag.changed = true;
743 			this._changed ~= &this.encodeNametag;
744 		}
745 		return value;
746 	}
747 
748 	public pure nothrow @safe encodeNametag(Buffer buffer) {
749 		with(buffer) {
750 			writeBytes(varuint.encode(4));
751 			writeBytes(varuint.encode(4));
752 			writeBytes(varuint.encode(cast(uint)this._nametag.value.length)); writeString(this._nametag.value);
753 		}
754 	}
755 
756 	public pure nothrow @property @safe @nogc long owner() {
757 		return _owner.value;
758 	}
759 
760 	public pure nothrow @property @safe long owner(long value) {
761 		this._cached = false;
762 		this._owner.value = value;
763 		if(!this._owner.changed) {
764 			this._owner.changed = true;
765 			this._changed ~= &this.encodeOwner;
766 		}
767 		return value;
768 	}
769 
770 	public pure nothrow @safe encodeOwner(Buffer buffer) {
771 		with(buffer) {
772 			writeBytes(varuint.encode(5));
773 			writeBytes(varuint.encode(7));
774 			writeBytes(varlong.encode(this._owner.value));
775 		}
776 	}
777 
778 	public pure nothrow @property @safe @nogc long target() {
779 		return _target.value;
780 	}
781 
782 	public pure nothrow @property @safe long target(long value) {
783 		this._cached = false;
784 		this._target.value = value;
785 		if(!this._target.changed) {
786 			this._target.changed = true;
787 			this._changed ~= &this.encodeTarget;
788 		}
789 		return value;
790 	}
791 
792 	public pure nothrow @safe encodeTarget(Buffer buffer) {
793 		with(buffer) {
794 			writeBytes(varuint.encode(6));
795 			writeBytes(varuint.encode(7));
796 			writeBytes(varlong.encode(this._target.value));
797 		}
798 	}
799 
800 	public pure nothrow @property @safe @nogc short air() {
801 		return _air;
802 	}
803 
804 	public pure nothrow @property @safe short air(short value) {
805 		this._cached = false;
806 		this._air = value;
807 		return value;
808 	}
809 
810 	public pure nothrow @safe encodeAir(Buffer buffer) {
811 		with(buffer) {
812 			writeBytes(varuint.encode(7));
813 			writeBytes(varuint.encode(1));
814 			writeLittleEndianShort(this._air);
815 		}
816 	}
817 
818 	public pure nothrow @property @safe @nogc int potionColor() {
819 		return _potionColor.value;
820 	}
821 
822 	public pure nothrow @property @safe int potionColor(int value) {
823 		this._cached = false;
824 		this._potionColor.value = value;
825 		if(!this._potionColor.changed) {
826 			this._potionColor.changed = true;
827 			this._changed ~= &this.encodePotionColor;
828 		}
829 		return value;
830 	}
831 
832 	public pure nothrow @safe encodePotionColor(Buffer buffer) {
833 		with(buffer) {
834 			writeBytes(varuint.encode(8));
835 			writeBytes(varuint.encode(2));
836 			writeBytes(varint.encode(this._potionColor.value));
837 		}
838 	}
839 
840 	public pure nothrow @property @safe @nogc byte potionAmbient() {
841 		return _potionAmbient.value;
842 	}
843 
844 	public pure nothrow @property @safe byte potionAmbient(byte value) {
845 		this._cached = false;
846 		this._potionAmbient.value = value;
847 		if(!this._potionAmbient.changed) {
848 			this._potionAmbient.changed = true;
849 			this._changed ~= &this.encodePotionAmbient;
850 		}
851 		return value;
852 	}
853 
854 	public pure nothrow @safe encodePotionAmbient(Buffer buffer) {
855 		with(buffer) {
856 			writeBytes(varuint.encode(9));
857 			writeBytes(varuint.encode(0));
858 			writeLittleEndianByte(this._potionAmbient.value);
859 		}
860 	}
861 
862 	public pure nothrow @property @safe @nogc int hurtTime() {
863 		return _hurtTime.value;
864 	}
865 
866 	public pure nothrow @property @safe int hurtTime(int value) {
867 		this._cached = false;
868 		this._hurtTime.value = value;
869 		if(!this._hurtTime.changed) {
870 			this._hurtTime.changed = true;
871 			this._changed ~= &this.encodeHurtTime;
872 		}
873 		return value;
874 	}
875 
876 	public pure nothrow @safe encodeHurtTime(Buffer buffer) {
877 		with(buffer) {
878 			writeBytes(varuint.encode(11));
879 			writeBytes(varuint.encode(2));
880 			writeBytes(varint.encode(this._hurtTime.value));
881 		}
882 	}
883 
884 	public pure nothrow @property @safe @nogc int hurtDirection() {
885 		return _hurtDirection.value;
886 	}
887 
888 	public pure nothrow @property @safe int hurtDirection(int value) {
889 		this._cached = false;
890 		this._hurtDirection.value = value;
891 		if(!this._hurtDirection.changed) {
892 			this._hurtDirection.changed = true;
893 			this._changed ~= &this.encodeHurtDirection;
894 		}
895 		return value;
896 	}
897 
898 	public pure nothrow @safe encodeHurtDirection(Buffer buffer) {
899 		with(buffer) {
900 			writeBytes(varuint.encode(12));
901 			writeBytes(varuint.encode(2));
902 			writeBytes(varint.encode(this._hurtDirection.value));
903 		}
904 	}
905 
906 	public pure nothrow @property @safe @nogc float paddleTimeLeft() {
907 		return _paddleTimeLeft.value;
908 	}
909 
910 	public pure nothrow @property @safe float paddleTimeLeft(float value) {
911 		this._cached = false;
912 		this._paddleTimeLeft.value = value;
913 		if(!this._paddleTimeLeft.changed) {
914 			this._paddleTimeLeft.changed = true;
915 			this._changed ~= &this.encodePaddleTimeLeft;
916 		}
917 		return value;
918 	}
919 
920 	public pure nothrow @safe encodePaddleTimeLeft(Buffer buffer) {
921 		with(buffer) {
922 			writeBytes(varuint.encode(13));
923 			writeBytes(varuint.encode(3));
924 			writeLittleEndianFloat(this._paddleTimeLeft.value);
925 		}
926 	}
927 
928 	public pure nothrow @property @safe @nogc float paddleTimeRight() {
929 		return _paddleTimeRight.value;
930 	}
931 
932 	public pure nothrow @property @safe float paddleTimeRight(float value) {
933 		this._cached = false;
934 		this._paddleTimeRight.value = value;
935 		if(!this._paddleTimeRight.changed) {
936 			this._paddleTimeRight.changed = true;
937 			this._changed ~= &this.encodePaddleTimeRight;
938 		}
939 		return value;
940 	}
941 
942 	public pure nothrow @safe encodePaddleTimeRight(Buffer buffer) {
943 		with(buffer) {
944 			writeBytes(varuint.encode(14));
945 			writeBytes(varuint.encode(3));
946 			writeLittleEndianFloat(this._paddleTimeRight.value);
947 		}
948 	}
949 
950 	public pure nothrow @property @safe @nogc int experienceCount() {
951 		return _experienceCount.value;
952 	}
953 
954 	public pure nothrow @property @safe int experienceCount(int value) {
955 		this._cached = false;
956 		this._experienceCount.value = value;
957 		if(!this._experienceCount.changed) {
958 			this._experienceCount.changed = true;
959 			this._changed ~= &this.encodeExperienceCount;
960 		}
961 		return value;
962 	}
963 
964 	public pure nothrow @safe encodeExperienceCount(Buffer buffer) {
965 		with(buffer) {
966 			writeBytes(varuint.encode(15));
967 			writeBytes(varuint.encode(2));
968 			writeBytes(varint.encode(this._experienceCount.value));
969 		}
970 	}
971 
972 	public pure nothrow @property @safe @nogc int minecartBlock() {
973 		return _minecartBlock.value;
974 	}
975 
976 	public pure nothrow @property @safe int minecartBlock(int value) {
977 		this._cached = false;
978 		this._minecartBlock.value = value;
979 		if(!this._minecartBlock.changed) {
980 			this._minecartBlock.changed = true;
981 			this._changed ~= &this.encodeMinecartBlock;
982 		}
983 		return value;
984 	}
985 
986 	public pure nothrow @safe encodeMinecartBlock(Buffer buffer) {
987 		with(buffer) {
988 			writeBytes(varuint.encode(16));
989 			writeBytes(varuint.encode(2));
990 			writeBytes(varint.encode(this._minecartBlock.value));
991 		}
992 	}
993 
994 	public pure nothrow @property @safe @nogc int minecartOffset() {
995 		return _minecartOffset.value;
996 	}
997 
998 	public pure nothrow @property @safe int minecartOffset(int value) {
999 		this._cached = false;
1000 		this._minecartOffset.value = value;
1001 		if(!this._minecartOffset.changed) {
1002 			this._minecartOffset.changed = true;
1003 			this._changed ~= &this.encodeMinecartOffset;
1004 		}
1005 		return value;
1006 	}
1007 
1008 	public pure nothrow @safe encodeMinecartOffset(Buffer buffer) {
1009 		with(buffer) {
1010 			writeBytes(varuint.encode(17));
1011 			writeBytes(varuint.encode(2));
1012 			writeBytes(varint.encode(this._minecartOffset.value));
1013 		}
1014 	}
1015 
1016 	public pure nothrow @property @safe @nogc byte minecartHasBlock() {
1017 		return _minecartHasBlock.value;
1018 	}
1019 
1020 	public pure nothrow @property @safe byte minecartHasBlock(byte value) {
1021 		this._cached = false;
1022 		this._minecartHasBlock.value = value;
1023 		if(!this._minecartHasBlock.changed) {
1024 			this._minecartHasBlock.changed = true;
1025 			this._changed ~= &this.encodeMinecartHasBlock;
1026 		}
1027 		return value;
1028 	}
1029 
1030 	public pure nothrow @safe encodeMinecartHasBlock(Buffer buffer) {
1031 		with(buffer) {
1032 			writeBytes(varuint.encode(18));
1033 			writeBytes(varuint.encode(0));
1034 			writeLittleEndianByte(this._minecartHasBlock.value);
1035 		}
1036 	}
1037 
1038 	public pure nothrow @property @safe @nogc short endermanItemId() {
1039 		return _endermanItemId.value;
1040 	}
1041 
1042 	public pure nothrow @property @safe short endermanItemId(short value) {
1043 		this._cached = false;
1044 		this._endermanItemId.value = value;
1045 		if(!this._endermanItemId.changed) {
1046 			this._endermanItemId.changed = true;
1047 			this._changed ~= &this.encodeEndermanItemId;
1048 		}
1049 		return value;
1050 	}
1051 
1052 	public pure nothrow @safe encodeEndermanItemId(Buffer buffer) {
1053 		with(buffer) {
1054 			writeBytes(varuint.encode(23));
1055 			writeBytes(varuint.encode(1));
1056 			writeLittleEndianShort(this._endermanItemId.value);
1057 		}
1058 	}
1059 
1060 	public pure nothrow @property @safe @nogc short endermanItemDamage() {
1061 		return _endermanItemDamage.value;
1062 	}
1063 
1064 	public pure nothrow @property @safe short endermanItemDamage(short value) {
1065 		this._cached = false;
1066 		this._endermanItemDamage.value = value;
1067 		if(!this._endermanItemDamage.changed) {
1068 			this._endermanItemDamage.changed = true;
1069 			this._changed ~= &this.encodeEndermanItemDamage;
1070 		}
1071 		return value;
1072 	}
1073 
1074 	public pure nothrow @safe encodeEndermanItemDamage(Buffer buffer) {
1075 		with(buffer) {
1076 			writeBytes(varuint.encode(24));
1077 			writeBytes(varuint.encode(1));
1078 			writeLittleEndianShort(this._endermanItemDamage.value);
1079 		}
1080 	}
1081 
1082 	public pure nothrow @property @safe @nogc short age() {
1083 		return _age.value;
1084 	}
1085 
1086 	public pure nothrow @property @safe short age(short value) {
1087 		this._cached = false;
1088 		this._age.value = value;
1089 		if(!this._age.changed) {
1090 			this._age.changed = true;
1091 			this._changed ~= &this.encodeAge;
1092 		}
1093 		return value;
1094 	}
1095 
1096 	public pure nothrow @safe encodeAge(Buffer buffer) {
1097 		with(buffer) {
1098 			writeBytes(varuint.encode(25));
1099 			writeBytes(varuint.encode(1));
1100 			writeLittleEndianShort(this._age.value);
1101 		}
1102 	}
1103 
1104 	public pure nothrow @property @safe @nogc byte playerFlags() {
1105 		return _playerFlags.value;
1106 	}
1107 
1108 	public pure nothrow @property @safe byte playerFlags(byte value) {
1109 		this._cached = false;
1110 		this._playerFlags.value = value;
1111 		if(!this._playerFlags.changed) {
1112 			this._playerFlags.changed = true;
1113 			this._changed ~= &this.encodePlayerFlags;
1114 		}
1115 		return value;
1116 	}
1117 
1118 	public pure nothrow @safe encodePlayerFlags(Buffer buffer) {
1119 		with(buffer) {
1120 			writeBytes(varuint.encode(27));
1121 			writeBytes(varuint.encode(0));
1122 			writeLittleEndianByte(this._playerFlags.value);
1123 		}
1124 	}
1125 
1126 	public pure nothrow @property @safe bool asleep() {
1127 		return _playerFlags.value._1;
1128 	}
1129 
1130 	public pure nothrow @property @safe bool asleep(bool value) {
1131 		_playerFlags.value._1 = value;
1132 		return value;
1133 	}
1134 
1135 	public pure nothrow @property @safe @nogc int playerIndex() {
1136 		return _playerIndex.value;
1137 	}
1138 
1139 	public pure nothrow @property @safe int playerIndex(int value) {
1140 		this._cached = false;
1141 		this._playerIndex.value = value;
1142 		if(!this._playerIndex.changed) {
1143 			this._playerIndex.changed = true;
1144 			this._changed ~= &this.encodePlayerIndex;
1145 		}
1146 		return value;
1147 	}
1148 
1149 	public pure nothrow @safe encodePlayerIndex(Buffer buffer) {
1150 		with(buffer) {
1151 			writeBytes(varuint.encode(28));
1152 			writeBytes(varuint.encode(2));
1153 			writeBytes(varint.encode(this._playerIndex.value));
1154 		}
1155 	}
1156 
1157 	public pure nothrow @property @safe @nogc Tuple!(int, "x", int, "y", int, "z") bedPosition() {
1158 		return _bedPosition.value;
1159 	}
1160 
1161 	public pure nothrow @property @safe Tuple!(int, "x", int, "y", int, "z") bedPosition(Tuple!(int, "x", int, "y", int, "z") value) {
1162 		this._cached = false;
1163 		this._bedPosition.value = value;
1164 		if(!this._bedPosition.changed) {
1165 			this._bedPosition.changed = true;
1166 			this._changed ~= &this.encodeBedPosition;
1167 		}
1168 		return value;
1169 	}
1170 
1171 	public pure nothrow @safe encodeBedPosition(Buffer buffer) {
1172 		with(buffer) {
1173 			writeBytes(varuint.encode(29));
1174 			writeBytes(varuint.encode(6));
1175 			writeBytes(varint.encode(this._bedPosition.value.x)); writeBytes(varint.encode(this._bedPosition.value.y)); writeBytes(varint.encode(this._bedPosition.value.z));
1176 		}
1177 	}
1178 
1179 	public pure nothrow @property @safe @nogc float fireballPowerX() {
1180 		return _fireballPowerX.value;
1181 	}
1182 
1183 	public pure nothrow @property @safe float fireballPowerX(float value) {
1184 		this._cached = false;
1185 		this._fireballPowerX.value = value;
1186 		if(!this._fireballPowerX.changed) {
1187 			this._fireballPowerX.changed = true;
1188 			this._changed ~= &this.encodeFireballPowerX;
1189 		}
1190 		return value;
1191 	}
1192 
1193 	public pure nothrow @safe encodeFireballPowerX(Buffer buffer) {
1194 		with(buffer) {
1195 			writeBytes(varuint.encode(30));
1196 			writeBytes(varuint.encode(3));
1197 			writeLittleEndianFloat(this._fireballPowerX.value);
1198 		}
1199 	}
1200 
1201 	public pure nothrow @property @safe @nogc float fireballPowerY() {
1202 		return _fireballPowerY.value;
1203 	}
1204 
1205 	public pure nothrow @property @safe float fireballPowerY(float value) {
1206 		this._cached = false;
1207 		this._fireballPowerY.value = value;
1208 		if(!this._fireballPowerY.changed) {
1209 			this._fireballPowerY.changed = true;
1210 			this._changed ~= &this.encodeFireballPowerY;
1211 		}
1212 		return value;
1213 	}
1214 
1215 	public pure nothrow @safe encodeFireballPowerY(Buffer buffer) {
1216 		with(buffer) {
1217 			writeBytes(varuint.encode(31));
1218 			writeBytes(varuint.encode(3));
1219 			writeLittleEndianFloat(this._fireballPowerY.value);
1220 		}
1221 	}
1222 
1223 	public pure nothrow @property @safe @nogc float fireballPowerZ() {
1224 		return _fireballPowerZ.value;
1225 	}
1226 
1227 	public pure nothrow @property @safe float fireballPowerZ(float value) {
1228 		this._cached = false;
1229 		this._fireballPowerZ.value = value;
1230 		if(!this._fireballPowerZ.changed) {
1231 			this._fireballPowerZ.changed = true;
1232 			this._changed ~= &this.encodeFireballPowerZ;
1233 		}
1234 		return value;
1235 	}
1236 
1237 	public pure nothrow @safe encodeFireballPowerZ(Buffer buffer) {
1238 		with(buffer) {
1239 			writeBytes(varuint.encode(32));
1240 			writeBytes(varuint.encode(3));
1241 			writeLittleEndianFloat(this._fireballPowerZ.value);
1242 		}
1243 	}
1244 
1245 	public pure nothrow @property @safe @nogc short potionAuxValue() {
1246 		return _potionAuxValue.value;
1247 	}
1248 
1249 	public pure nothrow @property @safe short potionAuxValue(short value) {
1250 		this._cached = false;
1251 		this._potionAuxValue.value = value;
1252 		if(!this._potionAuxValue.changed) {
1253 			this._potionAuxValue.changed = true;
1254 			this._changed ~= &this.encodePotionAuxValue;
1255 		}
1256 		return value;
1257 	}
1258 
1259 	public pure nothrow @safe encodePotionAuxValue(Buffer buffer) {
1260 		with(buffer) {
1261 			writeBytes(varuint.encode(37));
1262 			writeBytes(varuint.encode(1));
1263 			writeLittleEndianShort(this._potionAuxValue.value);
1264 		}
1265 	}
1266 
1267 	public pure nothrow @property @safe @nogc long leadHolder() {
1268 		return _leadHolder;
1269 	}
1270 
1271 	public pure nothrow @property @safe long leadHolder(long value) {
1272 		this._cached = false;
1273 		this._leadHolder = value;
1274 		return value;
1275 	}
1276 
1277 	public pure nothrow @safe encodeLeadHolder(Buffer buffer) {
1278 		with(buffer) {
1279 			writeBytes(varuint.encode(38));
1280 			writeBytes(varuint.encode(7));
1281 			writeBytes(varlong.encode(this._leadHolder));
1282 		}
1283 	}
1284 
1285 	public pure nothrow @property @safe @nogc float scale() {
1286 		return _scale.value;
1287 	}
1288 
1289 	public pure nothrow @property @safe float scale(float value) {
1290 		this._cached = false;
1291 		this._scale.value = value;
1292 		if(!this._scale.changed) {
1293 			this._scale.changed = true;
1294 			this._changed ~= &this.encodeScale;
1295 		}
1296 		return value;
1297 	}
1298 
1299 	public pure nothrow @safe encodeScale(Buffer buffer) {
1300 		with(buffer) {
1301 			writeBytes(varuint.encode(39));
1302 			writeBytes(varuint.encode(3));
1303 			writeLittleEndianFloat(this._scale.value);
1304 		}
1305 	}
1306 
1307 	public pure nothrow @property @safe @nogc string interactiveTag() {
1308 		return _interactiveTag.value;
1309 	}
1310 
1311 	public pure nothrow @property @safe string interactiveTag(string value) {
1312 		this._cached = false;
1313 		this._interactiveTag.value = value;
1314 		if(!this._interactiveTag.changed) {
1315 			this._interactiveTag.changed = true;
1316 			this._changed ~= &this.encodeInteractiveTag;
1317 		}
1318 		return value;
1319 	}
1320 
1321 	public pure nothrow @safe encodeInteractiveTag(Buffer buffer) {
1322 		with(buffer) {
1323 			writeBytes(varuint.encode(40));
1324 			writeBytes(varuint.encode(4));
1325 			writeBytes(varuint.encode(cast(uint)this._interactiveTag.value.length)); writeString(this._interactiveTag.value);
1326 		}
1327 	}
1328 
1329 	public pure nothrow @property @safe @nogc string npcId() {
1330 		return _npcId.value;
1331 	}
1332 
1333 	public pure nothrow @property @safe string npcId(string value) {
1334 		this._cached = false;
1335 		this._npcId.value = value;
1336 		if(!this._npcId.changed) {
1337 			this._npcId.changed = true;
1338 			this._changed ~= &this.encodeNpcId;
1339 		}
1340 		return value;
1341 	}
1342 
1343 	public pure nothrow @safe encodeNpcId(Buffer buffer) {
1344 		with(buffer) {
1345 			writeBytes(varuint.encode(41));
1346 			writeBytes(varuint.encode(4));
1347 			writeBytes(varuint.encode(cast(uint)this._npcId.value.length)); writeString(this._npcId.value);
1348 		}
1349 	}
1350 
1351 	public pure nothrow @property @safe @nogc string interactiveTagUrl() {
1352 		return _interactiveTagUrl.value;
1353 	}
1354 
1355 	public pure nothrow @property @safe string interactiveTagUrl(string value) {
1356 		this._cached = false;
1357 		this._interactiveTagUrl.value = value;
1358 		if(!this._interactiveTagUrl.changed) {
1359 			this._interactiveTagUrl.changed = true;
1360 			this._changed ~= &this.encodeInteractiveTagUrl;
1361 		}
1362 		return value;
1363 	}
1364 
1365 	public pure nothrow @safe encodeInteractiveTagUrl(Buffer buffer) {
1366 		with(buffer) {
1367 			writeBytes(varuint.encode(42));
1368 			writeBytes(varuint.encode(4));
1369 			writeBytes(varuint.encode(cast(uint)this._interactiveTagUrl.value.length)); writeString(this._interactiveTagUrl.value);
1370 		}
1371 	}
1372 
1373 	public pure nothrow @property @safe @nogc short maxAir() {
1374 		return _maxAir.value;
1375 	}
1376 
1377 	public pure nothrow @property @safe short maxAir(short value) {
1378 		this._cached = false;
1379 		this._maxAir.value = value;
1380 		if(!this._maxAir.changed) {
1381 			this._maxAir.changed = true;
1382 			this._changed ~= &this.encodeMaxAir;
1383 		}
1384 		return value;
1385 	}
1386 
1387 	public pure nothrow @safe encodeMaxAir(Buffer buffer) {
1388 		with(buffer) {
1389 			writeBytes(varuint.encode(43));
1390 			writeBytes(varuint.encode(1));
1391 			writeLittleEndianShort(this._maxAir.value);
1392 		}
1393 	}
1394 
1395 	public pure nothrow @property @safe @nogc int markVariant() {
1396 		return _markVariant.value;
1397 	}
1398 
1399 	public pure nothrow @property @safe int markVariant(int value) {
1400 		this._cached = false;
1401 		this._markVariant.value = value;
1402 		if(!this._markVariant.changed) {
1403 			this._markVariant.changed = true;
1404 			this._changed ~= &this.encodeMarkVariant;
1405 		}
1406 		return value;
1407 	}
1408 
1409 	public pure nothrow @safe encodeMarkVariant(Buffer buffer) {
1410 		with(buffer) {
1411 			writeBytes(varuint.encode(44));
1412 			writeBytes(varuint.encode(2));
1413 			writeBytes(varint.encode(this._markVariant.value));
1414 		}
1415 	}
1416 
1417 	public pure nothrow @property @safe @nogc Tuple!(int, "x", int, "y", int, "z") blockTarget() {
1418 		return _blockTarget.value;
1419 	}
1420 
1421 	public pure nothrow @property @safe Tuple!(int, "x", int, "y", int, "z") blockTarget(Tuple!(int, "x", int, "y", int, "z") value) {
1422 		this._cached = false;
1423 		this._blockTarget.value = value;
1424 		if(!this._blockTarget.changed) {
1425 			this._blockTarget.changed = true;
1426 			this._changed ~= &this.encodeBlockTarget;
1427 		}
1428 		return value;
1429 	}
1430 
1431 	public pure nothrow @safe encodeBlockTarget(Buffer buffer) {
1432 		with(buffer) {
1433 			writeBytes(varuint.encode(48));
1434 			writeBytes(varuint.encode(6));
1435 			writeBytes(varint.encode(this._blockTarget.value.x)); writeBytes(varint.encode(this._blockTarget.value.y)); writeBytes(varint.encode(this._blockTarget.value.z));
1436 		}
1437 	}
1438 
1439 	public pure nothrow @property @safe @nogc int invulnerableTime() {
1440 		return _invulnerableTime.value;
1441 	}
1442 
1443 	public pure nothrow @property @safe int invulnerableTime(int value) {
1444 		this._cached = false;
1445 		this._invulnerableTime.value = value;
1446 		if(!this._invulnerableTime.changed) {
1447 			this._invulnerableTime.changed = true;
1448 			this._changed ~= &this.encodeInvulnerableTime;
1449 		}
1450 		return value;
1451 	}
1452 
1453 	public pure nothrow @safe encodeInvulnerableTime(Buffer buffer) {
1454 		with(buffer) {
1455 			writeBytes(varuint.encode(49));
1456 			writeBytes(varuint.encode(2));
1457 			writeBytes(varint.encode(this._invulnerableTime.value));
1458 		}
1459 	}
1460 
1461 	public pure nothrow @property @safe @nogc long centerHeadTarget() {
1462 		return _centerHeadTarget.value;
1463 	}
1464 
1465 	public pure nothrow @property @safe long centerHeadTarget(long value) {
1466 		this._cached = false;
1467 		this._centerHeadTarget.value = value;
1468 		if(!this._centerHeadTarget.changed) {
1469 			this._centerHeadTarget.changed = true;
1470 			this._changed ~= &this.encodeCenterHeadTarget;
1471 		}
1472 		return value;
1473 	}
1474 
1475 	public pure nothrow @safe encodeCenterHeadTarget(Buffer buffer) {
1476 		with(buffer) {
1477 			writeBytes(varuint.encode(50));
1478 			writeBytes(varuint.encode(7));
1479 			writeBytes(varlong.encode(this._centerHeadTarget.value));
1480 		}
1481 	}
1482 
1483 	public pure nothrow @property @safe @nogc long leftHeadTarget() {
1484 		return _leftHeadTarget.value;
1485 	}
1486 
1487 	public pure nothrow @property @safe long leftHeadTarget(long value) {
1488 		this._cached = false;
1489 		this._leftHeadTarget.value = value;
1490 		if(!this._leftHeadTarget.changed) {
1491 			this._leftHeadTarget.changed = true;
1492 			this._changed ~= &this.encodeLeftHeadTarget;
1493 		}
1494 		return value;
1495 	}
1496 
1497 	public pure nothrow @safe encodeLeftHeadTarget(Buffer buffer) {
1498 		with(buffer) {
1499 			writeBytes(varuint.encode(51));
1500 			writeBytes(varuint.encode(7));
1501 			writeBytes(varlong.encode(this._leftHeadTarget.value));
1502 		}
1503 	}
1504 
1505 	public pure nothrow @property @safe @nogc long rightHeadTarget() {
1506 		return _rightHeadTarget.value;
1507 	}
1508 
1509 	public pure nothrow @property @safe long rightHeadTarget(long value) {
1510 		this._cached = false;
1511 		this._rightHeadTarget.value = value;
1512 		if(!this._rightHeadTarget.changed) {
1513 			this._rightHeadTarget.changed = true;
1514 			this._changed ~= &this.encodeRightHeadTarget;
1515 		}
1516 		return value;
1517 	}
1518 
1519 	public pure nothrow @safe encodeRightHeadTarget(Buffer buffer) {
1520 		with(buffer) {
1521 			writeBytes(varuint.encode(52));
1522 			writeBytes(varuint.encode(7));
1523 			writeBytes(varlong.encode(this._rightHeadTarget.value));
1524 		}
1525 	}
1526 
1527 	public pure nothrow @property @safe @nogc float boundingBoxWidth() {
1528 		return _boundingBoxWidth.value;
1529 	}
1530 
1531 	public pure nothrow @property @safe float boundingBoxWidth(float value) {
1532 		this._cached = false;
1533 		this._boundingBoxWidth.value = value;
1534 		if(!this._boundingBoxWidth.changed) {
1535 			this._boundingBoxWidth.changed = true;
1536 			this._changed ~= &this.encodeBoundingBoxWidth;
1537 		}
1538 		return value;
1539 	}
1540 
1541 	public pure nothrow @safe encodeBoundingBoxWidth(Buffer buffer) {
1542 		with(buffer) {
1543 			writeBytes(varuint.encode(54));
1544 			writeBytes(varuint.encode(3));
1545 			writeLittleEndianFloat(this._boundingBoxWidth.value);
1546 		}
1547 	}
1548 
1549 	public pure nothrow @property @safe @nogc float boundingBoxHeight() {
1550 		return _boundingBoxHeight.value;
1551 	}
1552 
1553 	public pure nothrow @property @safe float boundingBoxHeight(float value) {
1554 		this._cached = false;
1555 		this._boundingBoxHeight.value = value;
1556 		if(!this._boundingBoxHeight.changed) {
1557 			this._boundingBoxHeight.changed = true;
1558 			this._changed ~= &this.encodeBoundingBoxHeight;
1559 		}
1560 		return value;
1561 	}
1562 
1563 	public pure nothrow @safe encodeBoundingBoxHeight(Buffer buffer) {
1564 		with(buffer) {
1565 			writeBytes(varuint.encode(55));
1566 			writeBytes(varuint.encode(3));
1567 			writeLittleEndianFloat(this._boundingBoxHeight.value);
1568 		}
1569 	}
1570 
1571 	public pure nothrow @property @safe @nogc int fuseLength() {
1572 		return _fuseLength.value;
1573 	}
1574 
1575 	public pure nothrow @property @safe int fuseLength(int value) {
1576 		this._cached = false;
1577 		this._fuseLength.value = value;
1578 		if(!this._fuseLength.changed) {
1579 			this._fuseLength.changed = true;
1580 			this._changed ~= &this.encodeFuseLength;
1581 		}
1582 		return value;
1583 	}
1584 
1585 	public pure nothrow @safe encodeFuseLength(Buffer buffer) {
1586 		with(buffer) {
1587 			writeBytes(varuint.encode(56));
1588 			writeBytes(varuint.encode(2));
1589 			writeBytes(varint.encode(this._fuseLength.value));
1590 		}
1591 	}
1592 
1593 	public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") riderSeatPosition() {
1594 		return _riderSeatPosition.value;
1595 	}
1596 
1597 	public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") riderSeatPosition(Tuple!(float, "x", float, "y", float, "z") value) {
1598 		this._cached = false;
1599 		this._riderSeatPosition.value = value;
1600 		if(!this._riderSeatPosition.changed) {
1601 			this._riderSeatPosition.changed = true;
1602 			this._changed ~= &this.encodeRiderSeatPosition;
1603 		}
1604 		return value;
1605 	}
1606 
1607 	public pure nothrow @safe encodeRiderSeatPosition(Buffer buffer) {
1608 		with(buffer) {
1609 			writeBytes(varuint.encode(57));
1610 			writeBytes(varuint.encode(8));
1611 			writeLittleEndianFloat(this._riderSeatPosition.value.x); writeLittleEndianFloat(this._riderSeatPosition.value.y); writeLittleEndianFloat(this._riderSeatPosition.value.z);
1612 		}
1613 	}
1614 
1615 	public pure nothrow @property @safe @nogc byte riderRotationLocked() {
1616 		return _riderRotationLocked.value;
1617 	}
1618 
1619 	public pure nothrow @property @safe byte riderRotationLocked(byte value) {
1620 		this._cached = false;
1621 		this._riderRotationLocked.value = value;
1622 		if(!this._riderRotationLocked.changed) {
1623 			this._riderRotationLocked.changed = true;
1624 			this._changed ~= &this.encodeRiderRotationLocked;
1625 		}
1626 		return value;
1627 	}
1628 
1629 	public pure nothrow @safe encodeRiderRotationLocked(Buffer buffer) {
1630 		with(buffer) {
1631 			writeBytes(varuint.encode(58));
1632 			writeBytes(varuint.encode(0));
1633 			writeLittleEndianByte(this._riderRotationLocked.value);
1634 		}
1635 	}
1636 
1637 	public pure nothrow @property @safe @nogc float riderMaxRotation() {
1638 		return _riderMaxRotation.value;
1639 	}
1640 
1641 	public pure nothrow @property @safe float riderMaxRotation(float value) {
1642 		this._cached = false;
1643 		this._riderMaxRotation.value = value;
1644 		if(!this._riderMaxRotation.changed) {
1645 			this._riderMaxRotation.changed = true;
1646 			this._changed ~= &this.encodeRiderMaxRotation;
1647 		}
1648 		return value;
1649 	}
1650 
1651 	public pure nothrow @safe encodeRiderMaxRotation(Buffer buffer) {
1652 		with(buffer) {
1653 			writeBytes(varuint.encode(59));
1654 			writeBytes(varuint.encode(3));
1655 			writeLittleEndianFloat(this._riderMaxRotation.value);
1656 		}
1657 	}
1658 
1659 	public pure nothrow @property @safe @nogc float riderMinRotation() {
1660 		return _riderMinRotation.value;
1661 	}
1662 
1663 	public pure nothrow @property @safe float riderMinRotation(float value) {
1664 		this._cached = false;
1665 		this._riderMinRotation.value = value;
1666 		if(!this._riderMinRotation.changed) {
1667 			this._riderMinRotation.changed = true;
1668 			this._changed ~= &this.encodeRiderMinRotation;
1669 		}
1670 		return value;
1671 	}
1672 
1673 	public pure nothrow @safe encodeRiderMinRotation(Buffer buffer) {
1674 		with(buffer) {
1675 			writeBytes(varuint.encode(60));
1676 			writeBytes(varuint.encode(3));
1677 			writeLittleEndianFloat(this._riderMinRotation.value);
1678 		}
1679 	}
1680 
1681 	public pure nothrow @property @safe @nogc float areaEffectCloudRadius() {
1682 		return _areaEffectCloudRadius.value;
1683 	}
1684 
1685 	public pure nothrow @property @safe float areaEffectCloudRadius(float value) {
1686 		this._cached = false;
1687 		this._areaEffectCloudRadius.value = value;
1688 		if(!this._areaEffectCloudRadius.changed) {
1689 			this._areaEffectCloudRadius.changed = true;
1690 			this._changed ~= &this.encodeAreaEffectCloudRadius;
1691 		}
1692 		return value;
1693 	}
1694 
1695 	public pure nothrow @safe encodeAreaEffectCloudRadius(Buffer buffer) {
1696 		with(buffer) {
1697 			writeBytes(varuint.encode(61));
1698 			writeBytes(varuint.encode(3));
1699 			writeLittleEndianFloat(this._areaEffectCloudRadius.value);
1700 		}
1701 	}
1702 
1703 	public pure nothrow @property @safe @nogc int areaEffectCloudWaiting() {
1704 		return _areaEffectCloudWaiting.value;
1705 	}
1706 
1707 	public pure nothrow @property @safe int areaEffectCloudWaiting(int value) {
1708 		this._cached = false;
1709 		this._areaEffectCloudWaiting.value = value;
1710 		if(!this._areaEffectCloudWaiting.changed) {
1711 			this._areaEffectCloudWaiting.changed = true;
1712 			this._changed ~= &this.encodeAreaEffectCloudWaiting;
1713 		}
1714 		return value;
1715 	}
1716 
1717 	public pure nothrow @safe encodeAreaEffectCloudWaiting(Buffer buffer) {
1718 		with(buffer) {
1719 			writeBytes(varuint.encode(62));
1720 			writeBytes(varuint.encode(2));
1721 			writeBytes(varint.encode(this._areaEffectCloudWaiting.value));
1722 		}
1723 	}
1724 
1725 	public pure nothrow @property @safe @nogc int areaEffectCloudParticle() {
1726 		return _areaEffectCloudParticle.value;
1727 	}
1728 
1729 	public pure nothrow @property @safe int areaEffectCloudParticle(int value) {
1730 		this._cached = false;
1731 		this._areaEffectCloudParticle.value = value;
1732 		if(!this._areaEffectCloudParticle.changed) {
1733 			this._areaEffectCloudParticle.changed = true;
1734 			this._changed ~= &this.encodeAreaEffectCloudParticle;
1735 		}
1736 		return value;
1737 	}
1738 
1739 	public pure nothrow @safe encodeAreaEffectCloudParticle(Buffer buffer) {
1740 		with(buffer) {
1741 			writeBytes(varuint.encode(63));
1742 			writeBytes(varuint.encode(2));
1743 			writeBytes(varint.encode(this._areaEffectCloudParticle.value));
1744 		}
1745 	}
1746 
1747 	public pure nothrow @property @safe @nogc int shulkerPeakHeight() {
1748 		return _shulkerPeakHeight.value;
1749 	}
1750 
1751 	public pure nothrow @property @safe int shulkerPeakHeight(int value) {
1752 		this._cached = false;
1753 		this._shulkerPeakHeight.value = value;
1754 		if(!this._shulkerPeakHeight.changed) {
1755 			this._shulkerPeakHeight.changed = true;
1756 			this._changed ~= &this.encodeShulkerPeakHeight;
1757 		}
1758 		return value;
1759 	}
1760 
1761 	public pure nothrow @safe encodeShulkerPeakHeight(Buffer buffer) {
1762 		with(buffer) {
1763 			writeBytes(varuint.encode(64));
1764 			writeBytes(varuint.encode(2));
1765 			writeBytes(varint.encode(this._shulkerPeakHeight.value));
1766 		}
1767 	}
1768 
1769 	public pure nothrow @property @safe @nogc byte shulkerDirection() {
1770 		return _shulkerDirection.value;
1771 	}
1772 
1773 	public pure nothrow @property @safe byte shulkerDirection(byte value) {
1774 		this._cached = false;
1775 		this._shulkerDirection.value = value;
1776 		if(!this._shulkerDirection.changed) {
1777 			this._shulkerDirection.changed = true;
1778 			this._changed ~= &this.encodeShulkerDirection;
1779 		}
1780 		return value;
1781 	}
1782 
1783 	public pure nothrow @safe encodeShulkerDirection(Buffer buffer) {
1784 		with(buffer) {
1785 			writeBytes(varuint.encode(65));
1786 			writeBytes(varuint.encode(0));
1787 			writeLittleEndianByte(this._shulkerDirection.value);
1788 		}
1789 	}
1790 
1791 	public pure nothrow @property @safe @nogc Tuple!(int, "x", int, "y", int, "z") shulkerAttachment() {
1792 		return _shulkerAttachment.value;
1793 	}
1794 
1795 	public pure nothrow @property @safe Tuple!(int, "x", int, "y", int, "z") shulkerAttachment(Tuple!(int, "x", int, "y", int, "z") value) {
1796 		this._cached = false;
1797 		this._shulkerAttachment.value = value;
1798 		if(!this._shulkerAttachment.changed) {
1799 			this._shulkerAttachment.changed = true;
1800 			this._changed ~= &this.encodeShulkerAttachment;
1801 		}
1802 		return value;
1803 	}
1804 
1805 	public pure nothrow @safe encodeShulkerAttachment(Buffer buffer) {
1806 		with(buffer) {
1807 			writeBytes(varuint.encode(67));
1808 			writeBytes(varuint.encode(6));
1809 			writeBytes(varint.encode(this._shulkerAttachment.value.x)); writeBytes(varint.encode(this._shulkerAttachment.value.y)); writeBytes(varint.encode(this._shulkerAttachment.value.z));
1810 		}
1811 	}
1812 
1813 	public pure nothrow @property @safe @nogc long tradingPlayer() {
1814 		return _tradingPlayer.value;
1815 	}
1816 
1817 	public pure nothrow @property @safe long tradingPlayer(long value) {
1818 		this._cached = false;
1819 		this._tradingPlayer.value = value;
1820 		if(!this._tradingPlayer.changed) {
1821 			this._tradingPlayer.changed = true;
1822 			this._changed ~= &this.encodeTradingPlayer;
1823 		}
1824 		return value;
1825 	}
1826 
1827 	public pure nothrow @safe encodeTradingPlayer(Buffer buffer) {
1828 		with(buffer) {
1829 			writeBytes(varuint.encode(68));
1830 			writeBytes(varuint.encode(7));
1831 			writeBytes(varlong.encode(this._tradingPlayer.value));
1832 		}
1833 	}
1834 
1835 	public pure nothrow @property @safe @nogc string commandBlockCommand() {
1836 		return _commandBlockCommand.value;
1837 	}
1838 
1839 	public pure nothrow @property @safe string commandBlockCommand(string value) {
1840 		this._cached = false;
1841 		this._commandBlockCommand.value = value;
1842 		if(!this._commandBlockCommand.changed) {
1843 			this._commandBlockCommand.changed = true;
1844 			this._changed ~= &this.encodeCommandBlockCommand;
1845 		}
1846 		return value;
1847 	}
1848 
1849 	public pure nothrow @safe encodeCommandBlockCommand(Buffer buffer) {
1850 		with(buffer) {
1851 			writeBytes(varuint.encode(71));
1852 			writeBytes(varuint.encode(4));
1853 			writeBytes(varuint.encode(cast(uint)this._commandBlockCommand.value.length)); writeString(this._commandBlockCommand.value);
1854 		}
1855 	}
1856 
1857 	public pure nothrow @property @safe @nogc string commandBlockLastOutput() {
1858 		return _commandBlockLastOutput.value;
1859 	}
1860 
1861 	public pure nothrow @property @safe string commandBlockLastOutput(string value) {
1862 		this._cached = false;
1863 		this._commandBlockLastOutput.value = value;
1864 		if(!this._commandBlockLastOutput.changed) {
1865 			this._commandBlockLastOutput.changed = true;
1866 			this._changed ~= &this.encodeCommandBlockLastOutput;
1867 		}
1868 		return value;
1869 	}
1870 
1871 	public pure nothrow @safe encodeCommandBlockLastOutput(Buffer buffer) {
1872 		with(buffer) {
1873 			writeBytes(varuint.encode(72));
1874 			writeBytes(varuint.encode(4));
1875 			writeBytes(varuint.encode(cast(uint)this._commandBlockLastOutput.value.length)); writeString(this._commandBlockLastOutput.value);
1876 		}
1877 	}
1878 
1879 	public pure nothrow @property @safe @nogc string commandBlockTrackOutput() {
1880 		return _commandBlockTrackOutput.value;
1881 	}
1882 
1883 	public pure nothrow @property @safe string commandBlockTrackOutput(string value) {
1884 		this._cached = false;
1885 		this._commandBlockTrackOutput.value = value;
1886 		if(!this._commandBlockTrackOutput.changed) {
1887 			this._commandBlockTrackOutput.changed = true;
1888 			this._changed ~= &this.encodeCommandBlockTrackOutput;
1889 		}
1890 		return value;
1891 	}
1892 
1893 	public pure nothrow @safe encodeCommandBlockTrackOutput(Buffer buffer) {
1894 		with(buffer) {
1895 			writeBytes(varuint.encode(73));
1896 			writeBytes(varuint.encode(4));
1897 			writeBytes(varuint.encode(cast(uint)this._commandBlockTrackOutput.value.length)); writeString(this._commandBlockTrackOutput.value);
1898 		}
1899 	}
1900 
1901 	public pure nothrow @property @safe @nogc byte controllingRiderSeatNumber() {
1902 		return _controllingRiderSeatNumber.value;
1903 	}
1904 
1905 	public pure nothrow @property @safe byte controllingRiderSeatNumber(byte value) {
1906 		this._cached = false;
1907 		this._controllingRiderSeatNumber.value = value;
1908 		if(!this._controllingRiderSeatNumber.changed) {
1909 			this._controllingRiderSeatNumber.changed = true;
1910 			this._changed ~= &this.encodeControllingRiderSeatNumber;
1911 		}
1912 		return value;
1913 	}
1914 
1915 	public pure nothrow @safe encodeControllingRiderSeatNumber(Buffer buffer) {
1916 		with(buffer) {
1917 			writeBytes(varuint.encode(74));
1918 			writeBytes(varuint.encode(0));
1919 			writeLittleEndianByte(this._controllingRiderSeatNumber.value);
1920 		}
1921 	}
1922 
1923 	public pure nothrow @property @safe @nogc int strength() {
1924 		return _strength.value;
1925 	}
1926 
1927 	public pure nothrow @property @safe int strength(int value) {
1928 		this._cached = false;
1929 		this._strength.value = value;
1930 		if(!this._strength.changed) {
1931 			this._strength.changed = true;
1932 			this._changed ~= &this.encodeStrength;
1933 		}
1934 		return value;
1935 	}
1936 
1937 	public pure nothrow @safe encodeStrength(Buffer buffer) {
1938 		with(buffer) {
1939 			writeBytes(varuint.encode(75));
1940 			writeBytes(varuint.encode(2));
1941 			writeBytes(varint.encode(this._strength.value));
1942 		}
1943 	}
1944 
1945 	public pure nothrow @property @safe @nogc int maxStrength() {
1946 		return _maxStrength.value;
1947 	}
1948 
1949 	public pure nothrow @property @safe int maxStrength(int value) {
1950 		this._cached = false;
1951 		this._maxStrength.value = value;
1952 		if(!this._maxStrength.changed) {
1953 			this._maxStrength.changed = true;
1954 			this._changed ~= &this.encodeMaxStrength;
1955 		}
1956 		return value;
1957 	}
1958 
1959 	public pure nothrow @safe encodeMaxStrength(Buffer buffer) {
1960 		with(buffer) {
1961 			writeBytes(varuint.encode(76));
1962 			writeBytes(varuint.encode(2));
1963 			writeBytes(varint.encode(this._maxStrength.value));
1964 		}
1965 	}
1966 
1967 	public pure nothrow @safe encode(Buffer buffer) {
1968 		with(buffer) {
1969 			if(this._cached) {
1970 				buffer.writeBytes(this._cache);
1971 			} else {
1972 				immutable start = buffer._buffer.length;
1973 				writeBytes(varuint.encode(cast(uint)this._changed.length));
1974 				foreach(del ; this._changed) del(buffer);
1975 				this._cached = true;
1976 				this._cache = buffer._buffer[start..$];
1977 			}
1978 		}
1979 	}
1980 
1981 	public static pure nothrow @safe Metadata decode(Buffer buffer) {
1982 		auto metadata = new Metadata();
1983 		with(buffer) {
1984 			uint id;
1985 			size_t length=varuint.decode(_buffer, &_index);
1986 			while(length-- > 0) {
1987 				id=varuint.decode(_buffer, &_index);
1988 				switch(varuint.decode(_buffer, &_index)) {
1989 					case 0:
1990 						byte _0;
1991 						_0=readLittleEndianByte();
1992 						metadata.decoded ~= DecodedMetadata.fromByte(id, _0);
1993 						break;
1994 					case 1:
1995 						short _1;
1996 						_1=readLittleEndianShort();
1997 						metadata.decoded ~= DecodedMetadata.fromShort(id, _1);
1998 						break;
1999 					case 2:
2000 						int _2;
2001 						_2=varint.decode(_buffer, &_index);
2002 						metadata.decoded ~= DecodedMetadata.fromInt(id, _2);
2003 						break;
2004 					case 3:
2005 						float _3;
2006 						_3=readLittleEndianFloat();
2007 						metadata.decoded ~= DecodedMetadata.fromFloat(id, _3);
2008 						break;
2009 					case 4:
2010 						string _4;
2011 						uint xq=varuint.decode(_buffer, &_index); _4=readString(xq);
2012 						metadata.decoded ~= DecodedMetadata.fromString(id, _4);
2013 						break;
2014 					case 5:
2015 						sul.protocol.bedrock160.types.Slot _5;
2016 						_5.decode(bufferInstance);
2017 						metadata.decoded ~= DecodedMetadata.fromSlot(id, _5);
2018 						break;
2019 					case 6:
2020 						Tuple!(int, "x", int, "y", int, "z") _6;
2021 						_6.x=varint.decode(_buffer, &_index); _6.y=varint.decode(_buffer, &_index); _6.z=varint.decode(_buffer, &_index);
2022 						metadata.decoded ~= DecodedMetadata.fromBlockPosition(id, _6);
2023 						break;
2024 					case 7:
2025 						long _7;
2026 						_7=varlong.decode(_buffer, &_index);
2027 						metadata.decoded ~= DecodedMetadata.fromLong(id, _7);
2028 						break;
2029 					case 8:
2030 						Tuple!(float, "x", float, "y", float, "z") _8;
2031 						_8.x=readLittleEndianFloat(); _8.y=readLittleEndianFloat(); _8.z=readLittleEndianFloat();
2032 						metadata.decoded ~= DecodedMetadata.fromEntityPosition(id, _8);
2033 						break;
2034 					default:
2035 						break;
2036 				}
2037 			}
2038 		}
2039 		return metadata;
2040 	}
2041 
2042 }
2043 
2044 class DecodedMetadata {
2045 
2046 	public immutable uint id;
2047 	public immutable uint type;
2048 
2049 	union {
2050 		byte byte_;
2051 		short short_;
2052 		int int_;
2053 		float float_;
2054 		string string_;
2055 		sul.protocol.bedrock160.types.Slot slot;
2056 		Tuple!(int, "x", int, "y", int, "z") block_position;
2057 		long long_;
2058 		Tuple!(float, "x", float, "y", float, "z") entity_position;
2059 	}
2060 
2061 	private pure nothrow @safe @nogc this(uint id, uint type) {
2062 		this.id = id;
2063 		this.type = type;
2064 	}
2065 
2066 	public static pure nothrow @trusted DecodedMetadata fromByte(uint id, byte value) {
2067 		auto ret = new DecodedMetadata(id, 0);
2068 		ret.byte_ = value;
2069 		return ret;
2070 	}
2071 
2072 	public static pure nothrow @trusted DecodedMetadata fromShort(uint id, short value) {
2073 		auto ret = new DecodedMetadata(id, 1);
2074 		ret.short_ = value;
2075 		return ret;
2076 	}
2077 
2078 	public static pure nothrow @trusted DecodedMetadata fromInt(uint id, int value) {
2079 		auto ret = new DecodedMetadata(id, 2);
2080 		ret.int_ = value;
2081 		return ret;
2082 	}
2083 
2084 	public static pure nothrow @trusted DecodedMetadata fromFloat(uint id, float value) {
2085 		auto ret = new DecodedMetadata(id, 3);
2086 		ret.float_ = value;
2087 		return ret;
2088 	}
2089 
2090 	public static pure nothrow @trusted DecodedMetadata fromString(uint id, string value) {
2091 		auto ret = new DecodedMetadata(id, 4);
2092 		ret.string_ = value;
2093 		return ret;
2094 	}
2095 
2096 	public static pure nothrow @trusted DecodedMetadata fromSlot(uint id, sul.protocol.bedrock160.types.Slot value) {
2097 		auto ret = new DecodedMetadata(id, 5);
2098 		ret.slot = value;
2099 		return ret;
2100 	}
2101 
2102 	public static pure nothrow @trusted DecodedMetadata fromBlockPosition(uint id, Tuple!(int, "x", int, "y", int, "z") value) {
2103 		auto ret = new DecodedMetadata(id, 6);
2104 		ret.block_position = value;
2105 		return ret;
2106 	}
2107 
2108 	public static pure nothrow @trusted DecodedMetadata fromLong(uint id, long value) {
2109 		auto ret = new DecodedMetadata(id, 7);
2110 		ret.long_ = value;
2111 		return ret;
2112 	}
2113 
2114 	public static pure nothrow @trusted DecodedMetadata fromEntityPosition(uint id, Tuple!(float, "x", float, "y", float, "z") value) {
2115 		auto ret = new DecodedMetadata(id, 8);
2116 		ret.entity_position = value;
2117 		return ret;
2118 	}
2119 
2120 }