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/java210.xml 8 */ 9 module sul.metadata.java210; 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.java210.types; 18 19 alias Changed(T) = Tuple!(T, "value", bool, "changed"); 20 21 enum MetadataType : ubyte { 22 23 BYTE = 0, 24 INT = 1, 25 FLOAT = 2, 26 STRING = 3, 27 CHAT = 4, 28 SLOT = 5, 29 BOOL = 6, 30 ROTATION = 7, 31 POSITION = 8, 32 OPTIONAL_POSITION = 9, 33 DIRECTION = 10, 34 UUID = 11, 35 BLOCK = 12, 36 } 37 38 class Metadata { 39 40 public enum ENTITY_FLAGS : size_t { 41 ON_FIRE = 0, 42 SNEAKING = 1, 43 SPRINTING = 3, 44 INVISIBLE = 5, 45 GLOWING = 6, 46 GLIDING = 7, 47 } 48 public enum ubyte AIR = 1; 49 public enum ubyte NAMETAG = 2; 50 public enum ubyte SHOW_NAMETAG = 3; 51 public enum ubyte SILENT = 4; 52 public enum ubyte NO_GRAVITY = 5; 53 public enum ubyte POTION = 6; 54 public enum ubyte SPAWN_POSITION = 6; 55 public enum ubyte RADIUS = 6; 56 public enum ubyte COLOR = 7; 57 public enum ubyte IS_SINGLE_POINT = 8; 58 public enum ubyte PARTICLE_ID = 9; 59 public enum ubyte PARTICLE_PARAMETER_1 = 10; 60 public enum ubyte PARTICLE_PARAMETER_2 = 11; 61 public enum ubyte HOOKED_ENTITY = 6; 62 public enum ARROW_FLAGS : size_t { 63 CRITICAL = 0, 64 } 65 public enum ubyte TIME_SINCE_LAST_HIT = 6; 66 public enum ubyte FORWARD_DIRECTION = 7; 67 public enum ubyte DAMAGE_TAKEN = 8; 68 public enum ubyte BOAT_VARIANT = 9; 69 public enum ubyte RIGHT_PADDLE_TURNING = 10; 70 public enum ubyte LEFT_PADDLE_TURNING = 11; 71 public enum ubyte BEAM_TARGET = 6; 72 public enum ubyte SHOW_BOTTOM = 7; 73 public enum ubyte FIREWORK = 6; 74 public enum ubyte ITEM = 6; 75 public enum ubyte ROTATION = 7; 76 public enum LIVING_FLAGS : size_t { 77 HAND_ACTIVE = 0, 78 OFFHAND = 1, 79 } 80 public enum ubyte HEALTH = 7; 81 public enum ubyte POTION_COLOR = 8; 82 public enum ubyte POTION_AMBIENT = 9; 83 public enum ubyte ARROWS = 10; 84 public enum ubyte ADDITIONAL_HEARTS = 11; 85 public enum ubyte SCORE = 12; 86 public enum SKIN_PARTS : size_t { 87 CAPE = 0, 88 JACKET = 1, 89 LEFT_SLEEVE = 2, 90 RIGHT_SLEEVE = 3, 91 LEFT_PANTS = 4, 92 RIGHT_PANTS = 5, 93 HAT = 6, 94 } 95 public enum ubyte MAIN_HAND = 14; 96 public enum ARMOR_STAND_FLAGS : size_t { 97 IS_SMALL = 0, 98 HAS_ARMS = 2, 99 NO_BASE_PLATE = 3, 100 SET_MARKER = 4, 101 } 102 public enum ubyte HEAD_ROTATION = 12; 103 public enum ubyte BODY_ROTATION = 13; 104 public enum ubyte LEFT_ARM_ROTATION = 14; 105 public enum ubyte RIGHT_ARM_ROTATION = 15; 106 public enum ubyte LEFT_LEG_ROTATION = 16; 107 public enum ubyte RIGHT_LEG_ROTATION = 17; 108 public enum INSTENTIENT_FLAGS : size_t { 109 NO_AI = 0, 110 LEFT_HANDED = 1, 111 } 112 public enum ubyte HANGING = 12; 113 public enum ubyte BABY = 12; 114 public enum HORSE_FLAGS : size_t { 115 HORSE_TAMED = 1, 116 HORSE_SADDLED = 2, 117 HORSE_CHESTED = 3, 118 HORSE_EATING = 5, 119 HORSE_REARING = 6, 120 MOUTH_OPEN = 7, 121 } 122 public enum ubyte HORSE_TYPE = 14; 123 public enum ubyte HORSE_VARIANT = 15; 124 public enum ubyte OWNER_UUID = 16; 125 public enum ubyte HORSE_ARMOR = 17; 126 public enum ubyte PIG_SADDLED = 13; 127 public enum ubyte RABBIT_VARIANT = 13; 128 public enum ubyte STANDING_UP = 13; 129 public enum SHEEP_FLAGS_AND_COLOR : size_t { 130 SHEARED = 7, 131 } 132 public enum TAMEABLE_FLAGS : size_t { 133 SITTING = 0, 134 ANGRY = 1, 135 TAMED = 2, 136 } 137 public enum ubyte OCELOT_VARIANT = 15; 138 public enum ubyte WOLF_HEALTH = 15; 139 public enum ubyte BEGGING = 16; 140 public enum ubyte COLLAR_COLOR = 17; 141 public enum ubyte PROFESSION = 13; 142 public enum ubyte CREATED_BY_PLAYER = 12; 143 public enum SNOWMAN_FLAGS : size_t { 144 PUMPKINLESS = 4, 145 } 146 public enum ubyte SHULKER_DIRECTION = 12; 147 public enum ubyte SHULKER_ATTACHMENT = 13; 148 public enum ubyte SHULKER_SHIELD_HEIGHT = 14; 149 public enum ubyte BLAZE_ON_FIRE = 12; 150 public enum ubyte CREEPER_STATE = 12; 151 public enum ubyte CHARGED = 13; 152 public enum ubyte IGNITED = 14; 153 public enum GUARDIAN_FLAGS : size_t { 154 RETRACTING_SPIKES = 1, 155 ELDER = 2, 156 } 157 public enum ubyte GUARDIAN_TARGET = 13; 158 public enum ubyte SKELETON_TYPE = 12; 159 public enum ubyte SWINGING_ARMS = 13; 160 public enum ubyte CLIMBING = 12; 161 public enum ubyte CENTER_HEAD_TARGET = 12; 162 public enum ubyte LEFT_HEAD_TARGET = 13; 163 public enum ubyte RIGHT_HEAD_TARGET = 14; 164 public enum ubyte INVULNERABLE_TIME = 15; 165 public enum ubyte ZOMBIE_TYPE = 13; 166 public enum ubyte CONVERTING = 14; 167 public enum ubyte HANDS_HELD_UP = 15; 168 public enum ubyte CARRIED_BLOCK = 12; 169 public enum ubyte SCREAMING = 13; 170 public enum ubyte DRAGON_PHASE = 12; 171 public enum ubyte GHAST_ATTACKING = 12; 172 public enum ubyte SLIME_SIZE = 12; 173 public enum ubyte SHAKING_POWER = 6; 174 public enum ubyte SHAKING_DIRECTION = 7; 175 public enum ubyte SHAKING_MULTIPLIER = 8; 176 public enum ubyte MINECART_BLOCK = 9; 177 public enum ubyte MINECART_BLOCK_POSITION = 10; 178 public enum ubyte MINECART_CUSTOM_BLOCK = 11; 179 public enum ubyte FURNACE_POWERED = 12; 180 public enum ubyte COMMAND = 12; 181 public enum ubyte LAST_OUTPUT = 13; 182 public enum ubyte FUSE_TIME = 6; 183 184 public DecodedMetadata[] decoded; 185 186 private bool _cached = false; 187 private ubyte[] _cache; 188 189 private void delegate(Buffer) pure nothrow @safe[] _changed; 190 191 private MetadataFlags!(byte) _entityFlags; 192 private Changed!(uint) _air = tuple(cast(uint)300, false); 193 private Changed!(string) _nametag; 194 private Changed!(bool) _showNametag; 195 private Changed!(bool) _silent; 196 private Changed!(bool) _noGravity; 197 private Changed!(sul.protocol.java210.types.Slot) _potion; 198 private Changed!(ulong) _spawnPosition; 199 private Changed!(float) _radius = tuple(cast(float)0.5, false); 200 private Changed!(uint) _color; 201 private Changed!(bool) _isSinglePoint; 202 private Changed!(uint) _particleId; 203 private Changed!(uint) _particleParameter1; 204 private Changed!(uint) _particleParameter2; 205 private Changed!(uint) _hookedEntity; 206 private Changed!(MetadataFlags!(byte)) _arrowFlags; 207 private Changed!(uint) _timeSinceLastHit; 208 private Changed!(uint) _forwardDirection = tuple(cast(uint)1, false); 209 private Changed!(float) _damageTaken = tuple(cast(float)0, false); 210 private Changed!(uint) _boatVariant; 211 private Changed!(bool) _rightPaddleTurning; 212 private Changed!(bool) _leftPaddleTurning; 213 private Changed!(sul.protocol.java210.types.OptionalPosition) _beamTarget; 214 private Changed!(bool) _showBottom; 215 private Changed!(sul.protocol.java210.types.Slot) _firework; 216 private Changed!(sul.protocol.java210.types.Slot) _item; 217 private Changed!(uint) _rotation; 218 private Changed!(MetadataFlags!(byte)) _livingFlags; 219 private Changed!(float) _health = tuple(cast(float)1, false); 220 private Changed!(uint) _potionColor; 221 private Changed!(bool) _potionAmbient; 222 private Changed!(uint) _arrows; 223 private Changed!(float) _additionalHearts = tuple(cast(float)0, false); 224 private Changed!(uint) _score; 225 private Changed!(MetadataFlags!(byte)) _skinParts = tuple(cast(MetadataFlags!(byte))0, false); 226 private Changed!(byte) _mainHand = tuple(cast(byte)1, false); 227 private Changed!(MetadataFlags!(byte)) _armorStandFlags; 228 private Changed!(Tuple!(float, "x", float, "y", float, "z")) _headRotation; 229 private Changed!(Tuple!(float, "x", float, "y", float, "z")) _bodyRotation; 230 private Changed!(Tuple!(float, "x", float, "y", float, "z")) _leftArmRotation; 231 private Changed!(Tuple!(float, "x", float, "y", float, "z")) _rightArmRotation; 232 private Changed!(Tuple!(float, "x", float, "y", float, "z")) _leftLegRotation; 233 private Changed!(Tuple!(float, "x", float, "y", float, "z")) _rightLegRotation; 234 private Changed!(MetadataFlags!(byte)) _instentientFlags; 235 private Changed!(byte) _hanging; 236 private Changed!(bool) _baby; 237 private Changed!(MetadataFlags!(byte)) _horseFlags; 238 private Changed!(uint) _horseType; 239 private Changed!(uint) _horseVariant; 240 private Changed!(sul.protocol.java210.types.OptionalUuid) _ownerUuid; 241 private Changed!(uint) _horseArmor; 242 private Changed!(bool) _pigSaddled; 243 private Changed!(uint) _rabbitVariant; 244 private Changed!(bool) _standingUp; 245 private Changed!(MetadataFlags!(byte)) _sheepFlagsAndColor; 246 private Changed!(MetadataFlags!(byte)) _tameableFlags; 247 private Changed!(uint) _ocelotVariant; 248 private Changed!(float) _wolfHealth; 249 private Changed!(bool) _begging; 250 private Changed!(uint) _collarColor = tuple(cast(uint)14, false); 251 private Changed!(uint) _profession; 252 private Changed!(byte) _createdByPlayer; 253 private Changed!(MetadataFlags!(byte)) _snowmanFlags; 254 private Changed!(uint) _shulkerDirection; 255 private Changed!(sul.protocol.java210.types.OptionalPosition) _shulkerAttachment; 256 private Changed!(byte) _shulkerShieldHeight; 257 private Changed!(byte) _blazeOnFire; 258 private Changed!(uint) _creeperState = tuple(cast(uint)-1, false); 259 private Changed!(bool) _charged; 260 private Changed!(bool) _ignited; 261 private Changed!(MetadataFlags!(byte)) _guardianFlags; 262 private Changed!(uint) _guardianTarget; 263 private Changed!(uint) _skeletonType; 264 private Changed!(bool) _swingingArms; 265 private Changed!(byte) _climbing; 266 private Changed!(uint) _centerHeadTarget; 267 private Changed!(uint) _leftHeadTarget; 268 private Changed!(uint) _rightHeadTarget; 269 private Changed!(uint) _invulnerableTime; 270 private Changed!(uint) _zombieType; 271 private Changed!(bool) _converting; 272 private Changed!(bool) _handsHeldUp; 273 private Changed!(uint) _carriedBlock; 274 private Changed!(bool) _screaming; 275 private Changed!(uint) _dragonPhase; 276 private Changed!(bool) _ghastAttacking; 277 private Changed!(uint) _slimeSize = tuple(cast(uint)1, false); 278 private Changed!(uint) _shakingPower; 279 private Changed!(uint) _shakingDirection; 280 private Changed!(float) _shakingMultiplier = tuple(cast(float)0, false); 281 private Changed!(uint) _minecartBlock; 282 private Changed!(uint) _minecartBlockPosition = tuple(cast(uint)6, false); 283 private Changed!(bool) _minecartCustomBlock; 284 private Changed!(bool) _furnacePowered; 285 private Changed!(string) _command; 286 private Changed!(string) _lastOutput; 287 private Changed!(uint) _fuseTime; 288 289 public pure nothrow @safe this() { 290 this.reset(); 291 } 292 293 public pure nothrow @safe void reset() { 294 this._changed = [ 295 &this.encodeEntityFlags, 296 ]; 297 } 298 299 public pure nothrow @property @safe @nogc byte entityFlags() { 300 return _entityFlags; 301 } 302 303 public pure nothrow @property @safe byte entityFlags(byte value) { 304 this._cached = false; 305 this._entityFlags = value; 306 return value; 307 } 308 309 public pure nothrow @safe encodeEntityFlags(Buffer buffer) { 310 with(buffer) { 311 writeBigEndianUbyte(0); 312 writeBigEndianUbyte(0); 313 writeBigEndianByte(this._entityFlags); 314 } 315 } 316 317 public pure nothrow @property @safe bool onFire() { 318 return _entityFlags._0; 319 } 320 321 public pure nothrow @property @safe bool onFire(bool value) { 322 _entityFlags._0 = value; 323 return value; 324 } 325 326 public pure nothrow @property @safe bool sneaking() { 327 return _entityFlags._1; 328 } 329 330 public pure nothrow @property @safe bool sneaking(bool value) { 331 _entityFlags._1 = value; 332 return value; 333 } 334 335 public pure nothrow @property @safe bool sprinting() { 336 return _entityFlags._3; 337 } 338 339 public pure nothrow @property @safe bool sprinting(bool value) { 340 _entityFlags._3 = value; 341 return value; 342 } 343 344 public pure nothrow @property @safe bool invisible() { 345 return _entityFlags._5; 346 } 347 348 public pure nothrow @property @safe bool invisible(bool value) { 349 _entityFlags._5 = value; 350 return value; 351 } 352 353 public pure nothrow @property @safe bool glowing() { 354 return _entityFlags._6; 355 } 356 357 public pure nothrow @property @safe bool glowing(bool value) { 358 _entityFlags._6 = value; 359 return value; 360 } 361 362 public pure nothrow @property @safe bool gliding() { 363 return _entityFlags._7; 364 } 365 366 public pure nothrow @property @safe bool gliding(bool value) { 367 _entityFlags._7 = value; 368 return value; 369 } 370 371 public pure nothrow @property @safe @nogc uint air() { 372 return _air.value; 373 } 374 375 public pure nothrow @property @safe uint air(uint value) { 376 this._cached = false; 377 this._air.value = value; 378 if(!this._air.changed) { 379 this._air.changed = true; 380 this._changed ~= &this.encodeAir; 381 } 382 return value; 383 } 384 385 public pure nothrow @safe encodeAir(Buffer buffer) { 386 with(buffer) { 387 writeBigEndianUbyte(1); 388 writeBigEndianUbyte(1); 389 writeBytes(varuint.encode(this._air.value)); 390 } 391 } 392 393 public pure nothrow @property @safe @nogc string nametag() { 394 return _nametag.value; 395 } 396 397 public pure nothrow @property @safe string nametag(string value) { 398 this._cached = false; 399 this._nametag.value = value; 400 if(!this._nametag.changed) { 401 this._nametag.changed = true; 402 this._changed ~= &this.encodeNametag; 403 } 404 return value; 405 } 406 407 public pure nothrow @safe encodeNametag(Buffer buffer) { 408 with(buffer) { 409 writeBigEndianUbyte(2); 410 writeBigEndianUbyte(3); 411 writeBytes(varuint.encode(cast(uint)this._nametag.value.length)); writeString(this._nametag.value); 412 } 413 } 414 415 public pure nothrow @property @safe @nogc bool showNametag() { 416 return _showNametag.value; 417 } 418 419 public pure nothrow @property @safe bool showNametag(bool value) { 420 this._cached = false; 421 this._showNametag.value = value; 422 if(!this._showNametag.changed) { 423 this._showNametag.changed = true; 424 this._changed ~= &this.encodeShowNametag; 425 } 426 return value; 427 } 428 429 public pure nothrow @safe encodeShowNametag(Buffer buffer) { 430 with(buffer) { 431 writeBigEndianUbyte(3); 432 writeBigEndianUbyte(6); 433 writeBigEndianBool(this._showNametag.value); 434 } 435 } 436 437 public pure nothrow @property @safe @nogc bool silent() { 438 return _silent.value; 439 } 440 441 public pure nothrow @property @safe bool silent(bool value) { 442 this._cached = false; 443 this._silent.value = value; 444 if(!this._silent.changed) { 445 this._silent.changed = true; 446 this._changed ~= &this.encodeSilent; 447 } 448 return value; 449 } 450 451 public pure nothrow @safe encodeSilent(Buffer buffer) { 452 with(buffer) { 453 writeBigEndianUbyte(4); 454 writeBigEndianUbyte(6); 455 writeBigEndianBool(this._silent.value); 456 } 457 } 458 459 public pure nothrow @property @safe @nogc bool noGravity() { 460 return _noGravity.value; 461 } 462 463 public pure nothrow @property @safe bool noGravity(bool value) { 464 this._cached = false; 465 this._noGravity.value = value; 466 if(!this._noGravity.changed) { 467 this._noGravity.changed = true; 468 this._changed ~= &this.encodeNoGravity; 469 } 470 return value; 471 } 472 473 public pure nothrow @safe encodeNoGravity(Buffer buffer) { 474 with(buffer) { 475 writeBigEndianUbyte(5); 476 writeBigEndianUbyte(6); 477 writeBigEndianBool(this._noGravity.value); 478 } 479 } 480 481 public pure nothrow @property @safe @nogc sul.protocol.java210.types.Slot potion() { 482 return _potion.value; 483 } 484 485 public pure nothrow @property @safe sul.protocol.java210.types.Slot potion(sul.protocol.java210.types.Slot value) { 486 this._cached = false; 487 this._potion.value = value; 488 if(!this._potion.changed) { 489 this._potion.changed = true; 490 this._changed ~= &this.encodePotion; 491 } 492 return value; 493 } 494 495 public pure nothrow @safe encodePotion(Buffer buffer) { 496 with(buffer) { 497 writeBigEndianUbyte(6); 498 writeBigEndianUbyte(5); 499 this._potion.value.encode(bufferInstance); 500 } 501 } 502 503 public pure nothrow @property @safe @nogc ulong spawnPosition() { 504 return _spawnPosition.value; 505 } 506 507 public pure nothrow @property @safe ulong spawnPosition(ulong value) { 508 this._cached = false; 509 this._spawnPosition.value = value; 510 if(!this._spawnPosition.changed) { 511 this._spawnPosition.changed = true; 512 this._changed ~= &this.encodeSpawnPosition; 513 } 514 return value; 515 } 516 517 public pure nothrow @safe encodeSpawnPosition(Buffer buffer) { 518 with(buffer) { 519 writeBigEndianUbyte(6); 520 writeBigEndianUbyte(8); 521 writeBigEndianUlong(this._spawnPosition.value); 522 } 523 } 524 525 public pure nothrow @property @safe @nogc float radius() { 526 return _radius.value; 527 } 528 529 public pure nothrow @property @safe float radius(float value) { 530 this._cached = false; 531 this._radius.value = value; 532 if(!this._radius.changed) { 533 this._radius.changed = true; 534 this._changed ~= &this.encodeRadius; 535 } 536 return value; 537 } 538 539 public pure nothrow @safe encodeRadius(Buffer buffer) { 540 with(buffer) { 541 writeBigEndianUbyte(6); 542 writeBigEndianUbyte(2); 543 writeBigEndianFloat(this._radius.value); 544 } 545 } 546 547 public pure nothrow @property @safe @nogc uint color() { 548 return _color.value; 549 } 550 551 public pure nothrow @property @safe uint color(uint value) { 552 this._cached = false; 553 this._color.value = value; 554 if(!this._color.changed) { 555 this._color.changed = true; 556 this._changed ~= &this.encodeColor; 557 } 558 return value; 559 } 560 561 public pure nothrow @safe encodeColor(Buffer buffer) { 562 with(buffer) { 563 writeBigEndianUbyte(7); 564 writeBigEndianUbyte(1); 565 writeBytes(varuint.encode(this._color.value)); 566 } 567 } 568 569 public pure nothrow @property @safe @nogc bool isSinglePoint() { 570 return _isSinglePoint.value; 571 } 572 573 public pure nothrow @property @safe bool isSinglePoint(bool value) { 574 this._cached = false; 575 this._isSinglePoint.value = value; 576 if(!this._isSinglePoint.changed) { 577 this._isSinglePoint.changed = true; 578 this._changed ~= &this.encodeIsSinglePoint; 579 } 580 return value; 581 } 582 583 public pure nothrow @safe encodeIsSinglePoint(Buffer buffer) { 584 with(buffer) { 585 writeBigEndianUbyte(8); 586 writeBigEndianUbyte(6); 587 writeBigEndianBool(this._isSinglePoint.value); 588 } 589 } 590 591 public pure nothrow @property @safe @nogc uint particleId() { 592 return _particleId.value; 593 } 594 595 public pure nothrow @property @safe uint particleId(uint value) { 596 this._cached = false; 597 this._particleId.value = value; 598 if(!this._particleId.changed) { 599 this._particleId.changed = true; 600 this._changed ~= &this.encodeParticleId; 601 } 602 return value; 603 } 604 605 public pure nothrow @safe encodeParticleId(Buffer buffer) { 606 with(buffer) { 607 writeBigEndianUbyte(9); 608 writeBigEndianUbyte(1); 609 writeBytes(varuint.encode(this._particleId.value)); 610 } 611 } 612 613 public pure nothrow @property @safe @nogc uint particleParameter1() { 614 return _particleParameter1.value; 615 } 616 617 public pure nothrow @property @safe uint particleParameter1(uint value) { 618 this._cached = false; 619 this._particleParameter1.value = value; 620 if(!this._particleParameter1.changed) { 621 this._particleParameter1.changed = true; 622 this._changed ~= &this.encodeParticleParameter1; 623 } 624 return value; 625 } 626 627 public pure nothrow @safe encodeParticleParameter1(Buffer buffer) { 628 with(buffer) { 629 writeBigEndianUbyte(10); 630 writeBigEndianUbyte(1); 631 writeBytes(varuint.encode(this._particleParameter1.value)); 632 } 633 } 634 635 public pure nothrow @property @safe @nogc uint particleParameter2() { 636 return _particleParameter2.value; 637 } 638 639 public pure nothrow @property @safe uint particleParameter2(uint value) { 640 this._cached = false; 641 this._particleParameter2.value = value; 642 if(!this._particleParameter2.changed) { 643 this._particleParameter2.changed = true; 644 this._changed ~= &this.encodeParticleParameter2; 645 } 646 return value; 647 } 648 649 public pure nothrow @safe encodeParticleParameter2(Buffer buffer) { 650 with(buffer) { 651 writeBigEndianUbyte(11); 652 writeBigEndianUbyte(1); 653 writeBytes(varuint.encode(this._particleParameter2.value)); 654 } 655 } 656 657 public pure nothrow @property @safe @nogc uint hookedEntity() { 658 return _hookedEntity.value; 659 } 660 661 public pure nothrow @property @safe uint hookedEntity(uint value) { 662 this._cached = false; 663 this._hookedEntity.value = value; 664 if(!this._hookedEntity.changed) { 665 this._hookedEntity.changed = true; 666 this._changed ~= &this.encodeHookedEntity; 667 } 668 return value; 669 } 670 671 public pure nothrow @safe encodeHookedEntity(Buffer buffer) { 672 with(buffer) { 673 writeBigEndianUbyte(6); 674 writeBigEndianUbyte(1); 675 writeBytes(varuint.encode(this._hookedEntity.value)); 676 } 677 } 678 679 public pure nothrow @property @safe @nogc byte arrowFlags() { 680 return _arrowFlags.value; 681 } 682 683 public pure nothrow @property @safe byte arrowFlags(byte value) { 684 this._cached = false; 685 this._arrowFlags.value = value; 686 if(!this._arrowFlags.changed) { 687 this._arrowFlags.changed = true; 688 this._changed ~= &this.encodeArrowFlags; 689 } 690 return value; 691 } 692 693 public pure nothrow @safe encodeArrowFlags(Buffer buffer) { 694 with(buffer) { 695 writeBigEndianUbyte(6); 696 writeBigEndianUbyte(0); 697 writeBigEndianByte(this._arrowFlags.value); 698 } 699 } 700 701 public pure nothrow @property @safe bool critical() { 702 return _arrowFlags.value._0; 703 } 704 705 public pure nothrow @property @safe bool critical(bool value) { 706 _arrowFlags.value._0 = value; 707 return value; 708 } 709 710 public pure nothrow @property @safe @nogc uint timeSinceLastHit() { 711 return _timeSinceLastHit.value; 712 } 713 714 public pure nothrow @property @safe uint timeSinceLastHit(uint value) { 715 this._cached = false; 716 this._timeSinceLastHit.value = value; 717 if(!this._timeSinceLastHit.changed) { 718 this._timeSinceLastHit.changed = true; 719 this._changed ~= &this.encodeTimeSinceLastHit; 720 } 721 return value; 722 } 723 724 public pure nothrow @safe encodeTimeSinceLastHit(Buffer buffer) { 725 with(buffer) { 726 writeBigEndianUbyte(6); 727 writeBigEndianUbyte(1); 728 writeBytes(varuint.encode(this._timeSinceLastHit.value)); 729 } 730 } 731 732 public pure nothrow @property @safe @nogc uint forwardDirection() { 733 return _forwardDirection.value; 734 } 735 736 public pure nothrow @property @safe uint forwardDirection(uint value) { 737 this._cached = false; 738 this._forwardDirection.value = value; 739 if(!this._forwardDirection.changed) { 740 this._forwardDirection.changed = true; 741 this._changed ~= &this.encodeForwardDirection; 742 } 743 return value; 744 } 745 746 public pure nothrow @safe encodeForwardDirection(Buffer buffer) { 747 with(buffer) { 748 writeBigEndianUbyte(7); 749 writeBigEndianUbyte(1); 750 writeBytes(varuint.encode(this._forwardDirection.value)); 751 } 752 } 753 754 public pure nothrow @property @safe @nogc float damageTaken() { 755 return _damageTaken.value; 756 } 757 758 public pure nothrow @property @safe float damageTaken(float value) { 759 this._cached = false; 760 this._damageTaken.value = value; 761 if(!this._damageTaken.changed) { 762 this._damageTaken.changed = true; 763 this._changed ~= &this.encodeDamageTaken; 764 } 765 return value; 766 } 767 768 public pure nothrow @safe encodeDamageTaken(Buffer buffer) { 769 with(buffer) { 770 writeBigEndianUbyte(8); 771 writeBigEndianUbyte(2); 772 writeBigEndianFloat(this._damageTaken.value); 773 } 774 } 775 776 public pure nothrow @property @safe @nogc uint boatVariant() { 777 return _boatVariant.value; 778 } 779 780 public pure nothrow @property @safe uint boatVariant(uint value) { 781 this._cached = false; 782 this._boatVariant.value = value; 783 if(!this._boatVariant.changed) { 784 this._boatVariant.changed = true; 785 this._changed ~= &this.encodeBoatVariant; 786 } 787 return value; 788 } 789 790 public pure nothrow @safe encodeBoatVariant(Buffer buffer) { 791 with(buffer) { 792 writeBigEndianUbyte(9); 793 writeBigEndianUbyte(1); 794 writeBytes(varuint.encode(this._boatVariant.value)); 795 } 796 } 797 798 public pure nothrow @property @safe @nogc bool rightPaddleTurning() { 799 return _rightPaddleTurning.value; 800 } 801 802 public pure nothrow @property @safe bool rightPaddleTurning(bool value) { 803 this._cached = false; 804 this._rightPaddleTurning.value = value; 805 if(!this._rightPaddleTurning.changed) { 806 this._rightPaddleTurning.changed = true; 807 this._changed ~= &this.encodeRightPaddleTurning; 808 } 809 return value; 810 } 811 812 public pure nothrow @safe encodeRightPaddleTurning(Buffer buffer) { 813 with(buffer) { 814 writeBigEndianUbyte(10); 815 writeBigEndianUbyte(6); 816 writeBigEndianBool(this._rightPaddleTurning.value); 817 } 818 } 819 820 public pure nothrow @property @safe @nogc bool leftPaddleTurning() { 821 return _leftPaddleTurning.value; 822 } 823 824 public pure nothrow @property @safe bool leftPaddleTurning(bool value) { 825 this._cached = false; 826 this._leftPaddleTurning.value = value; 827 if(!this._leftPaddleTurning.changed) { 828 this._leftPaddleTurning.changed = true; 829 this._changed ~= &this.encodeLeftPaddleTurning; 830 } 831 return value; 832 } 833 834 public pure nothrow @safe encodeLeftPaddleTurning(Buffer buffer) { 835 with(buffer) { 836 writeBigEndianUbyte(11); 837 writeBigEndianUbyte(6); 838 writeBigEndianBool(this._leftPaddleTurning.value); 839 } 840 } 841 842 public pure nothrow @property @safe @nogc sul.protocol.java210.types.OptionalPosition beamTarget() { 843 return _beamTarget.value; 844 } 845 846 public pure nothrow @property @safe sul.protocol.java210.types.OptionalPosition beamTarget(sul.protocol.java210.types.OptionalPosition value) { 847 this._cached = false; 848 this._beamTarget.value = value; 849 if(!this._beamTarget.changed) { 850 this._beamTarget.changed = true; 851 this._changed ~= &this.encodeBeamTarget; 852 } 853 return value; 854 } 855 856 public pure nothrow @safe encodeBeamTarget(Buffer buffer) { 857 with(buffer) { 858 writeBigEndianUbyte(6); 859 writeBigEndianUbyte(9); 860 this._beamTarget.value.encode(bufferInstance); 861 } 862 } 863 864 public pure nothrow @property @safe @nogc bool showBottom() { 865 return _showBottom.value; 866 } 867 868 public pure nothrow @property @safe bool showBottom(bool value) { 869 this._cached = false; 870 this._showBottom.value = value; 871 if(!this._showBottom.changed) { 872 this._showBottom.changed = true; 873 this._changed ~= &this.encodeShowBottom; 874 } 875 return value; 876 } 877 878 public pure nothrow @safe encodeShowBottom(Buffer buffer) { 879 with(buffer) { 880 writeBigEndianUbyte(7); 881 writeBigEndianUbyte(6); 882 writeBigEndianBool(this._showBottom.value); 883 } 884 } 885 886 public pure nothrow @property @safe @nogc sul.protocol.java210.types.Slot firework() { 887 return _firework.value; 888 } 889 890 public pure nothrow @property @safe sul.protocol.java210.types.Slot firework(sul.protocol.java210.types.Slot value) { 891 this._cached = false; 892 this._firework.value = value; 893 if(!this._firework.changed) { 894 this._firework.changed = true; 895 this._changed ~= &this.encodeFirework; 896 } 897 return value; 898 } 899 900 public pure nothrow @safe encodeFirework(Buffer buffer) { 901 with(buffer) { 902 writeBigEndianUbyte(6); 903 writeBigEndianUbyte(5); 904 this._firework.value.encode(bufferInstance); 905 } 906 } 907 908 public pure nothrow @property @safe @nogc sul.protocol.java210.types.Slot item() { 909 return _item.value; 910 } 911 912 public pure nothrow @property @safe sul.protocol.java210.types.Slot item(sul.protocol.java210.types.Slot value) { 913 this._cached = false; 914 this._item.value = value; 915 if(!this._item.changed) { 916 this._item.changed = true; 917 this._changed ~= &this.encodeItem; 918 } 919 return value; 920 } 921 922 public pure nothrow @safe encodeItem(Buffer buffer) { 923 with(buffer) { 924 writeBigEndianUbyte(6); 925 writeBigEndianUbyte(5); 926 this._item.value.encode(bufferInstance); 927 } 928 } 929 930 public pure nothrow @property @safe @nogc uint rotation() { 931 return _rotation.value; 932 } 933 934 public pure nothrow @property @safe uint rotation(uint value) { 935 this._cached = false; 936 this._rotation.value = value; 937 if(!this._rotation.changed) { 938 this._rotation.changed = true; 939 this._changed ~= &this.encodeRotation; 940 } 941 return value; 942 } 943 944 public pure nothrow @safe encodeRotation(Buffer buffer) { 945 with(buffer) { 946 writeBigEndianUbyte(7); 947 writeBigEndianUbyte(1); 948 writeBytes(varuint.encode(this._rotation.value)); 949 } 950 } 951 952 public pure nothrow @property @safe @nogc byte livingFlags() { 953 return _livingFlags.value; 954 } 955 956 public pure nothrow @property @safe byte livingFlags(byte value) { 957 this._cached = false; 958 this._livingFlags.value = value; 959 if(!this._livingFlags.changed) { 960 this._livingFlags.changed = true; 961 this._changed ~= &this.encodeLivingFlags; 962 } 963 return value; 964 } 965 966 public pure nothrow @safe encodeLivingFlags(Buffer buffer) { 967 with(buffer) { 968 writeBigEndianUbyte(6); 969 writeBigEndianUbyte(0); 970 writeBigEndianByte(this._livingFlags.value); 971 } 972 } 973 974 public pure nothrow @property @safe bool handActive() { 975 return _livingFlags.value._0; 976 } 977 978 public pure nothrow @property @safe bool handActive(bool value) { 979 _livingFlags.value._0 = value; 980 return value; 981 } 982 983 public pure nothrow @property @safe bool offhand() { 984 return _livingFlags.value._1; 985 } 986 987 public pure nothrow @property @safe bool offhand(bool value) { 988 _livingFlags.value._1 = value; 989 return value; 990 } 991 992 public pure nothrow @property @safe @nogc float health() { 993 return _health.value; 994 } 995 996 public pure nothrow @property @safe float health(float value) { 997 this._cached = false; 998 this._health.value = value; 999 if(!this._health.changed) { 1000 this._health.changed = true; 1001 this._changed ~= &this.encodeHealth; 1002 } 1003 return value; 1004 } 1005 1006 public pure nothrow @safe encodeHealth(Buffer buffer) { 1007 with(buffer) { 1008 writeBigEndianUbyte(7); 1009 writeBigEndianUbyte(2); 1010 writeBigEndianFloat(this._health.value); 1011 } 1012 } 1013 1014 public pure nothrow @property @safe @nogc uint potionColor() { 1015 return _potionColor.value; 1016 } 1017 1018 public pure nothrow @property @safe uint potionColor(uint value) { 1019 this._cached = false; 1020 this._potionColor.value = value; 1021 if(!this._potionColor.changed) { 1022 this._potionColor.changed = true; 1023 this._changed ~= &this.encodePotionColor; 1024 } 1025 return value; 1026 } 1027 1028 public pure nothrow @safe encodePotionColor(Buffer buffer) { 1029 with(buffer) { 1030 writeBigEndianUbyte(8); 1031 writeBigEndianUbyte(1); 1032 writeBytes(varuint.encode(this._potionColor.value)); 1033 } 1034 } 1035 1036 public pure nothrow @property @safe @nogc bool potionAmbient() { 1037 return _potionAmbient.value; 1038 } 1039 1040 public pure nothrow @property @safe bool potionAmbient(bool value) { 1041 this._cached = false; 1042 this._potionAmbient.value = value; 1043 if(!this._potionAmbient.changed) { 1044 this._potionAmbient.changed = true; 1045 this._changed ~= &this.encodePotionAmbient; 1046 } 1047 return value; 1048 } 1049 1050 public pure nothrow @safe encodePotionAmbient(Buffer buffer) { 1051 with(buffer) { 1052 writeBigEndianUbyte(9); 1053 writeBigEndianUbyte(6); 1054 writeBigEndianBool(this._potionAmbient.value); 1055 } 1056 } 1057 1058 public pure nothrow @property @safe @nogc uint arrows() { 1059 return _arrows.value; 1060 } 1061 1062 public pure nothrow @property @safe uint arrows(uint value) { 1063 this._cached = false; 1064 this._arrows.value = value; 1065 if(!this._arrows.changed) { 1066 this._arrows.changed = true; 1067 this._changed ~= &this.encodeArrows; 1068 } 1069 return value; 1070 } 1071 1072 public pure nothrow @safe encodeArrows(Buffer buffer) { 1073 with(buffer) { 1074 writeBigEndianUbyte(10); 1075 writeBigEndianUbyte(1); 1076 writeBytes(varuint.encode(this._arrows.value)); 1077 } 1078 } 1079 1080 public pure nothrow @property @safe @nogc float additionalHearts() { 1081 return _additionalHearts.value; 1082 } 1083 1084 public pure nothrow @property @safe float additionalHearts(float value) { 1085 this._cached = false; 1086 this._additionalHearts.value = value; 1087 if(!this._additionalHearts.changed) { 1088 this._additionalHearts.changed = true; 1089 this._changed ~= &this.encodeAdditionalHearts; 1090 } 1091 return value; 1092 } 1093 1094 public pure nothrow @safe encodeAdditionalHearts(Buffer buffer) { 1095 with(buffer) { 1096 writeBigEndianUbyte(11); 1097 writeBigEndianUbyte(2); 1098 writeBigEndianFloat(this._additionalHearts.value); 1099 } 1100 } 1101 1102 public pure nothrow @property @safe @nogc uint score() { 1103 return _score.value; 1104 } 1105 1106 public pure nothrow @property @safe uint score(uint value) { 1107 this._cached = false; 1108 this._score.value = value; 1109 if(!this._score.changed) { 1110 this._score.changed = true; 1111 this._changed ~= &this.encodeScore; 1112 } 1113 return value; 1114 } 1115 1116 public pure nothrow @safe encodeScore(Buffer buffer) { 1117 with(buffer) { 1118 writeBigEndianUbyte(12); 1119 writeBigEndianUbyte(1); 1120 writeBytes(varuint.encode(this._score.value)); 1121 } 1122 } 1123 1124 public pure nothrow @property @safe @nogc byte skinParts() { 1125 return _skinParts.value; 1126 } 1127 1128 public pure nothrow @property @safe byte skinParts(byte value) { 1129 this._cached = false; 1130 this._skinParts.value = value; 1131 if(!this._skinParts.changed) { 1132 this._skinParts.changed = true; 1133 this._changed ~= &this.encodeSkinParts; 1134 } 1135 return value; 1136 } 1137 1138 public pure nothrow @safe encodeSkinParts(Buffer buffer) { 1139 with(buffer) { 1140 writeBigEndianUbyte(13); 1141 writeBigEndianUbyte(0); 1142 writeBigEndianByte(this._skinParts.value); 1143 } 1144 } 1145 1146 public pure nothrow @property @safe bool cape() { 1147 return _skinParts.value._0; 1148 } 1149 1150 public pure nothrow @property @safe bool cape(bool value) { 1151 _skinParts.value._0 = value; 1152 return value; 1153 } 1154 1155 public pure nothrow @property @safe bool jacket() { 1156 return _skinParts.value._1; 1157 } 1158 1159 public pure nothrow @property @safe bool jacket(bool value) { 1160 _skinParts.value._1 = value; 1161 return value; 1162 } 1163 1164 public pure nothrow @property @safe bool leftSleeve() { 1165 return _skinParts.value._2; 1166 } 1167 1168 public pure nothrow @property @safe bool leftSleeve(bool value) { 1169 _skinParts.value._2 = value; 1170 return value; 1171 } 1172 1173 public pure nothrow @property @safe bool rightSleeve() { 1174 return _skinParts.value._3; 1175 } 1176 1177 public pure nothrow @property @safe bool rightSleeve(bool value) { 1178 _skinParts.value._3 = value; 1179 return value; 1180 } 1181 1182 public pure nothrow @property @safe bool leftPants() { 1183 return _skinParts.value._4; 1184 } 1185 1186 public pure nothrow @property @safe bool leftPants(bool value) { 1187 _skinParts.value._4 = value; 1188 return value; 1189 } 1190 1191 public pure nothrow @property @safe bool rightPants() { 1192 return _skinParts.value._5; 1193 } 1194 1195 public pure nothrow @property @safe bool rightPants(bool value) { 1196 _skinParts.value._5 = value; 1197 return value; 1198 } 1199 1200 public pure nothrow @property @safe bool hat() { 1201 return _skinParts.value._6; 1202 } 1203 1204 public pure nothrow @property @safe bool hat(bool value) { 1205 _skinParts.value._6 = value; 1206 return value; 1207 } 1208 1209 public pure nothrow @property @safe @nogc byte mainHand() { 1210 return _mainHand.value; 1211 } 1212 1213 public pure nothrow @property @safe byte mainHand(byte value) { 1214 this._cached = false; 1215 this._mainHand.value = value; 1216 if(!this._mainHand.changed) { 1217 this._mainHand.changed = true; 1218 this._changed ~= &this.encodeMainHand; 1219 } 1220 return value; 1221 } 1222 1223 public pure nothrow @safe encodeMainHand(Buffer buffer) { 1224 with(buffer) { 1225 writeBigEndianUbyte(14); 1226 writeBigEndianUbyte(0); 1227 writeBigEndianByte(this._mainHand.value); 1228 } 1229 } 1230 1231 public pure nothrow @property @safe @nogc byte armorStandFlags() { 1232 return _armorStandFlags.value; 1233 } 1234 1235 public pure nothrow @property @safe byte armorStandFlags(byte value) { 1236 this._cached = false; 1237 this._armorStandFlags.value = value; 1238 if(!this._armorStandFlags.changed) { 1239 this._armorStandFlags.changed = true; 1240 this._changed ~= &this.encodeArmorStandFlags; 1241 } 1242 return value; 1243 } 1244 1245 public pure nothrow @safe encodeArmorStandFlags(Buffer buffer) { 1246 with(buffer) { 1247 writeBigEndianUbyte(11); 1248 writeBigEndianUbyte(0); 1249 writeBigEndianByte(this._armorStandFlags.value); 1250 } 1251 } 1252 1253 public pure nothrow @property @safe bool isSmall() { 1254 return _armorStandFlags.value._0; 1255 } 1256 1257 public pure nothrow @property @safe bool isSmall(bool value) { 1258 _armorStandFlags.value._0 = value; 1259 return value; 1260 } 1261 1262 public pure nothrow @property @safe bool hasArms() { 1263 return _armorStandFlags.value._2; 1264 } 1265 1266 public pure nothrow @property @safe bool hasArms(bool value) { 1267 _armorStandFlags.value._2 = value; 1268 return value; 1269 } 1270 1271 public pure nothrow @property @safe bool noBasePlate() { 1272 return _armorStandFlags.value._3; 1273 } 1274 1275 public pure nothrow @property @safe bool noBasePlate(bool value) { 1276 _armorStandFlags.value._3 = value; 1277 return value; 1278 } 1279 1280 public pure nothrow @property @safe bool setMarker() { 1281 return _armorStandFlags.value._4; 1282 } 1283 1284 public pure nothrow @property @safe bool setMarker(bool value) { 1285 _armorStandFlags.value._4 = value; 1286 return value; 1287 } 1288 1289 public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") headRotation() { 1290 return _headRotation.value; 1291 } 1292 1293 public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") headRotation(Tuple!(float, "x", float, "y", float, "z") value) { 1294 this._cached = false; 1295 this._headRotation.value = value; 1296 if(!this._headRotation.changed) { 1297 this._headRotation.changed = true; 1298 this._changed ~= &this.encodeHeadRotation; 1299 } 1300 return value; 1301 } 1302 1303 public pure nothrow @safe encodeHeadRotation(Buffer buffer) { 1304 with(buffer) { 1305 writeBigEndianUbyte(12); 1306 writeBigEndianUbyte(7); 1307 writeBigEndianFloat(this._headRotation.value.x); writeBigEndianFloat(this._headRotation.value.y); writeBigEndianFloat(this._headRotation.value.z); 1308 } 1309 } 1310 1311 public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") bodyRotation() { 1312 return _bodyRotation.value; 1313 } 1314 1315 public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") bodyRotation(Tuple!(float, "x", float, "y", float, "z") value) { 1316 this._cached = false; 1317 this._bodyRotation.value = value; 1318 if(!this._bodyRotation.changed) { 1319 this._bodyRotation.changed = true; 1320 this._changed ~= &this.encodeBodyRotation; 1321 } 1322 return value; 1323 } 1324 1325 public pure nothrow @safe encodeBodyRotation(Buffer buffer) { 1326 with(buffer) { 1327 writeBigEndianUbyte(13); 1328 writeBigEndianUbyte(7); 1329 writeBigEndianFloat(this._bodyRotation.value.x); writeBigEndianFloat(this._bodyRotation.value.y); writeBigEndianFloat(this._bodyRotation.value.z); 1330 } 1331 } 1332 1333 public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") leftArmRotation() { 1334 return _leftArmRotation.value; 1335 } 1336 1337 public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") leftArmRotation(Tuple!(float, "x", float, "y", float, "z") value) { 1338 this._cached = false; 1339 this._leftArmRotation.value = value; 1340 if(!this._leftArmRotation.changed) { 1341 this._leftArmRotation.changed = true; 1342 this._changed ~= &this.encodeLeftArmRotation; 1343 } 1344 return value; 1345 } 1346 1347 public pure nothrow @safe encodeLeftArmRotation(Buffer buffer) { 1348 with(buffer) { 1349 writeBigEndianUbyte(14); 1350 writeBigEndianUbyte(7); 1351 writeBigEndianFloat(this._leftArmRotation.value.x); writeBigEndianFloat(this._leftArmRotation.value.y); writeBigEndianFloat(this._leftArmRotation.value.z); 1352 } 1353 } 1354 1355 public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") rightArmRotation() { 1356 return _rightArmRotation.value; 1357 } 1358 1359 public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") rightArmRotation(Tuple!(float, "x", float, "y", float, "z") value) { 1360 this._cached = false; 1361 this._rightArmRotation.value = value; 1362 if(!this._rightArmRotation.changed) { 1363 this._rightArmRotation.changed = true; 1364 this._changed ~= &this.encodeRightArmRotation; 1365 } 1366 return value; 1367 } 1368 1369 public pure nothrow @safe encodeRightArmRotation(Buffer buffer) { 1370 with(buffer) { 1371 writeBigEndianUbyte(15); 1372 writeBigEndianUbyte(7); 1373 writeBigEndianFloat(this._rightArmRotation.value.x); writeBigEndianFloat(this._rightArmRotation.value.y); writeBigEndianFloat(this._rightArmRotation.value.z); 1374 } 1375 } 1376 1377 public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") leftLegRotation() { 1378 return _leftLegRotation.value; 1379 } 1380 1381 public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") leftLegRotation(Tuple!(float, "x", float, "y", float, "z") value) { 1382 this._cached = false; 1383 this._leftLegRotation.value = value; 1384 if(!this._leftLegRotation.changed) { 1385 this._leftLegRotation.changed = true; 1386 this._changed ~= &this.encodeLeftLegRotation; 1387 } 1388 return value; 1389 } 1390 1391 public pure nothrow @safe encodeLeftLegRotation(Buffer buffer) { 1392 with(buffer) { 1393 writeBigEndianUbyte(16); 1394 writeBigEndianUbyte(7); 1395 writeBigEndianFloat(this._leftLegRotation.value.x); writeBigEndianFloat(this._leftLegRotation.value.y); writeBigEndianFloat(this._leftLegRotation.value.z); 1396 } 1397 } 1398 1399 public pure nothrow @property @safe @nogc Tuple!(float, "x", float, "y", float, "z") rightLegRotation() { 1400 return _rightLegRotation.value; 1401 } 1402 1403 public pure nothrow @property @safe Tuple!(float, "x", float, "y", float, "z") rightLegRotation(Tuple!(float, "x", float, "y", float, "z") value) { 1404 this._cached = false; 1405 this._rightLegRotation.value = value; 1406 if(!this._rightLegRotation.changed) { 1407 this._rightLegRotation.changed = true; 1408 this._changed ~= &this.encodeRightLegRotation; 1409 } 1410 return value; 1411 } 1412 1413 public pure nothrow @safe encodeRightLegRotation(Buffer buffer) { 1414 with(buffer) { 1415 writeBigEndianUbyte(17); 1416 writeBigEndianUbyte(7); 1417 writeBigEndianFloat(this._rightLegRotation.value.x); writeBigEndianFloat(this._rightLegRotation.value.y); writeBigEndianFloat(this._rightLegRotation.value.z); 1418 } 1419 } 1420 1421 public pure nothrow @property @safe @nogc byte instentientFlags() { 1422 return _instentientFlags.value; 1423 } 1424 1425 public pure nothrow @property @safe byte instentientFlags(byte value) { 1426 this._cached = false; 1427 this._instentientFlags.value = value; 1428 if(!this._instentientFlags.changed) { 1429 this._instentientFlags.changed = true; 1430 this._changed ~= &this.encodeInstentientFlags; 1431 } 1432 return value; 1433 } 1434 1435 public pure nothrow @safe encodeInstentientFlags(Buffer buffer) { 1436 with(buffer) { 1437 writeBigEndianUbyte(11); 1438 writeBigEndianUbyte(0); 1439 writeBigEndianByte(this._instentientFlags.value); 1440 } 1441 } 1442 1443 public pure nothrow @property @safe bool noAi() { 1444 return _instentientFlags.value._0; 1445 } 1446 1447 public pure nothrow @property @safe bool noAi(bool value) { 1448 _instentientFlags.value._0 = value; 1449 return value; 1450 } 1451 1452 public pure nothrow @property @safe bool leftHanded() { 1453 return _instentientFlags.value._1; 1454 } 1455 1456 public pure nothrow @property @safe bool leftHanded(bool value) { 1457 _instentientFlags.value._1 = value; 1458 return value; 1459 } 1460 1461 public pure nothrow @property @safe @nogc byte hanging() { 1462 return _hanging.value; 1463 } 1464 1465 public pure nothrow @property @safe byte hanging(byte value) { 1466 this._cached = false; 1467 this._hanging.value = value; 1468 if(!this._hanging.changed) { 1469 this._hanging.changed = true; 1470 this._changed ~= &this.encodeHanging; 1471 } 1472 return value; 1473 } 1474 1475 public pure nothrow @safe encodeHanging(Buffer buffer) { 1476 with(buffer) { 1477 writeBigEndianUbyte(12); 1478 writeBigEndianUbyte(0); 1479 writeBigEndianByte(this._hanging.value); 1480 } 1481 } 1482 1483 public pure nothrow @property @safe @nogc bool baby() { 1484 return _baby.value; 1485 } 1486 1487 public pure nothrow @property @safe bool baby(bool value) { 1488 this._cached = false; 1489 this._baby.value = value; 1490 if(!this._baby.changed) { 1491 this._baby.changed = true; 1492 this._changed ~= &this.encodeBaby; 1493 } 1494 return value; 1495 } 1496 1497 public pure nothrow @safe encodeBaby(Buffer buffer) { 1498 with(buffer) { 1499 writeBigEndianUbyte(12); 1500 writeBigEndianUbyte(6); 1501 writeBigEndianBool(this._baby.value); 1502 } 1503 } 1504 1505 public pure nothrow @property @safe @nogc byte horseFlags() { 1506 return _horseFlags.value; 1507 } 1508 1509 public pure nothrow @property @safe byte horseFlags(byte value) { 1510 this._cached = false; 1511 this._horseFlags.value = value; 1512 if(!this._horseFlags.changed) { 1513 this._horseFlags.changed = true; 1514 this._changed ~= &this.encodeHorseFlags; 1515 } 1516 return value; 1517 } 1518 1519 public pure nothrow @safe encodeHorseFlags(Buffer buffer) { 1520 with(buffer) { 1521 writeBigEndianUbyte(13); 1522 writeBigEndianUbyte(0); 1523 writeBigEndianByte(this._horseFlags.value); 1524 } 1525 } 1526 1527 public pure nothrow @property @safe bool horseTamed() { 1528 return _horseFlags.value._1; 1529 } 1530 1531 public pure nothrow @property @safe bool horseTamed(bool value) { 1532 _horseFlags.value._1 = value; 1533 return value; 1534 } 1535 1536 public pure nothrow @property @safe bool horseSaddled() { 1537 return _horseFlags.value._2; 1538 } 1539 1540 public pure nothrow @property @safe bool horseSaddled(bool value) { 1541 _horseFlags.value._2 = value; 1542 return value; 1543 } 1544 1545 public pure nothrow @property @safe bool horseChested() { 1546 return _horseFlags.value._3; 1547 } 1548 1549 public pure nothrow @property @safe bool horseChested(bool value) { 1550 _horseFlags.value._3 = value; 1551 return value; 1552 } 1553 1554 public pure nothrow @property @safe bool horseEating() { 1555 return _horseFlags.value._5; 1556 } 1557 1558 public pure nothrow @property @safe bool horseEating(bool value) { 1559 _horseFlags.value._5 = value; 1560 return value; 1561 } 1562 1563 public pure nothrow @property @safe bool horseRearing() { 1564 return _horseFlags.value._6; 1565 } 1566 1567 public pure nothrow @property @safe bool horseRearing(bool value) { 1568 _horseFlags.value._6 = value; 1569 return value; 1570 } 1571 1572 public pure nothrow @property @safe bool mouthOpen() { 1573 return _horseFlags.value._7; 1574 } 1575 1576 public pure nothrow @property @safe bool mouthOpen(bool value) { 1577 _horseFlags.value._7 = value; 1578 return value; 1579 } 1580 1581 public pure nothrow @property @safe @nogc uint horseType() { 1582 return _horseType.value; 1583 } 1584 1585 public pure nothrow @property @safe uint horseType(uint value) { 1586 this._cached = false; 1587 this._horseType.value = value; 1588 if(!this._horseType.changed) { 1589 this._horseType.changed = true; 1590 this._changed ~= &this.encodeHorseType; 1591 } 1592 return value; 1593 } 1594 1595 public pure nothrow @safe encodeHorseType(Buffer buffer) { 1596 with(buffer) { 1597 writeBigEndianUbyte(14); 1598 writeBigEndianUbyte(1); 1599 writeBytes(varuint.encode(this._horseType.value)); 1600 } 1601 } 1602 1603 public pure nothrow @property @safe @nogc uint horseVariant() { 1604 return _horseVariant.value; 1605 } 1606 1607 public pure nothrow @property @safe uint horseVariant(uint value) { 1608 this._cached = false; 1609 this._horseVariant.value = value; 1610 if(!this._horseVariant.changed) { 1611 this._horseVariant.changed = true; 1612 this._changed ~= &this.encodeHorseVariant; 1613 } 1614 return value; 1615 } 1616 1617 public pure nothrow @safe encodeHorseVariant(Buffer buffer) { 1618 with(buffer) { 1619 writeBigEndianUbyte(15); 1620 writeBigEndianUbyte(1); 1621 writeBytes(varuint.encode(this._horseVariant.value)); 1622 } 1623 } 1624 1625 public pure nothrow @property @safe @nogc sul.protocol.java210.types.OptionalUuid ownerUuid() { 1626 return _ownerUuid.value; 1627 } 1628 1629 public pure nothrow @property @safe sul.protocol.java210.types.OptionalUuid ownerUuid(sul.protocol.java210.types.OptionalUuid value) { 1630 this._cached = false; 1631 this._ownerUuid.value = value; 1632 if(!this._ownerUuid.changed) { 1633 this._ownerUuid.changed = true; 1634 this._changed ~= &this.encodeOwnerUuid; 1635 } 1636 return value; 1637 } 1638 1639 public pure nothrow @safe encodeOwnerUuid(Buffer buffer) { 1640 with(buffer) { 1641 writeBigEndianUbyte(16); 1642 writeBigEndianUbyte(11); 1643 this._ownerUuid.value.encode(bufferInstance); 1644 } 1645 } 1646 1647 public pure nothrow @property @safe @nogc uint horseArmor() { 1648 return _horseArmor.value; 1649 } 1650 1651 public pure nothrow @property @safe uint horseArmor(uint value) { 1652 this._cached = false; 1653 this._horseArmor.value = value; 1654 if(!this._horseArmor.changed) { 1655 this._horseArmor.changed = true; 1656 this._changed ~= &this.encodeHorseArmor; 1657 } 1658 return value; 1659 } 1660 1661 public pure nothrow @safe encodeHorseArmor(Buffer buffer) { 1662 with(buffer) { 1663 writeBigEndianUbyte(17); 1664 writeBigEndianUbyte(1); 1665 writeBytes(varuint.encode(this._horseArmor.value)); 1666 } 1667 } 1668 1669 public pure nothrow @property @safe @nogc bool pigSaddled() { 1670 return _pigSaddled.value; 1671 } 1672 1673 public pure nothrow @property @safe bool pigSaddled(bool value) { 1674 this._cached = false; 1675 this._pigSaddled.value = value; 1676 if(!this._pigSaddled.changed) { 1677 this._pigSaddled.changed = true; 1678 this._changed ~= &this.encodePigSaddled; 1679 } 1680 return value; 1681 } 1682 1683 public pure nothrow @safe encodePigSaddled(Buffer buffer) { 1684 with(buffer) { 1685 writeBigEndianUbyte(13); 1686 writeBigEndianUbyte(6); 1687 writeBigEndianBool(this._pigSaddled.value); 1688 } 1689 } 1690 1691 public pure nothrow @property @safe @nogc uint rabbitVariant() { 1692 return _rabbitVariant.value; 1693 } 1694 1695 public pure nothrow @property @safe uint rabbitVariant(uint value) { 1696 this._cached = false; 1697 this._rabbitVariant.value = value; 1698 if(!this._rabbitVariant.changed) { 1699 this._rabbitVariant.changed = true; 1700 this._changed ~= &this.encodeRabbitVariant; 1701 } 1702 return value; 1703 } 1704 1705 public pure nothrow @safe encodeRabbitVariant(Buffer buffer) { 1706 with(buffer) { 1707 writeBigEndianUbyte(13); 1708 writeBigEndianUbyte(1); 1709 writeBytes(varuint.encode(this._rabbitVariant.value)); 1710 } 1711 } 1712 1713 public pure nothrow @property @safe @nogc bool standingUp() { 1714 return _standingUp.value; 1715 } 1716 1717 public pure nothrow @property @safe bool standingUp(bool value) { 1718 this._cached = false; 1719 this._standingUp.value = value; 1720 if(!this._standingUp.changed) { 1721 this._standingUp.changed = true; 1722 this._changed ~= &this.encodeStandingUp; 1723 } 1724 return value; 1725 } 1726 1727 public pure nothrow @safe encodeStandingUp(Buffer buffer) { 1728 with(buffer) { 1729 writeBigEndianUbyte(13); 1730 writeBigEndianUbyte(6); 1731 writeBigEndianBool(this._standingUp.value); 1732 } 1733 } 1734 1735 public pure nothrow @property @safe @nogc byte sheepFlagsAndColor() { 1736 return _sheepFlagsAndColor.value; 1737 } 1738 1739 public pure nothrow @property @safe byte sheepFlagsAndColor(byte value) { 1740 this._cached = false; 1741 this._sheepFlagsAndColor.value = value; 1742 if(!this._sheepFlagsAndColor.changed) { 1743 this._sheepFlagsAndColor.changed = true; 1744 this._changed ~= &this.encodeSheepFlagsAndColor; 1745 } 1746 return value; 1747 } 1748 1749 public pure nothrow @safe encodeSheepFlagsAndColor(Buffer buffer) { 1750 with(buffer) { 1751 writeBigEndianUbyte(13); 1752 writeBigEndianUbyte(0); 1753 writeBigEndianByte(this._sheepFlagsAndColor.value); 1754 } 1755 } 1756 1757 public pure nothrow @property @safe bool sheared() { 1758 return _sheepFlagsAndColor.value._7; 1759 } 1760 1761 public pure nothrow @property @safe bool sheared(bool value) { 1762 _sheepFlagsAndColor.value._7 = value; 1763 return value; 1764 } 1765 1766 public pure nothrow @property @safe @nogc byte tameableFlags() { 1767 return _tameableFlags.value; 1768 } 1769 1770 public pure nothrow @property @safe byte tameableFlags(byte value) { 1771 this._cached = false; 1772 this._tameableFlags.value = value; 1773 if(!this._tameableFlags.changed) { 1774 this._tameableFlags.changed = true; 1775 this._changed ~= &this.encodeTameableFlags; 1776 } 1777 return value; 1778 } 1779 1780 public pure nothrow @safe encodeTameableFlags(Buffer buffer) { 1781 with(buffer) { 1782 writeBigEndianUbyte(13); 1783 writeBigEndianUbyte(0); 1784 writeBigEndianByte(this._tameableFlags.value); 1785 } 1786 } 1787 1788 public pure nothrow @property @safe bool sitting() { 1789 return _tameableFlags.value._0; 1790 } 1791 1792 public pure nothrow @property @safe bool sitting(bool value) { 1793 _tameableFlags.value._0 = value; 1794 return value; 1795 } 1796 1797 public pure nothrow @property @safe bool angry() { 1798 return _tameableFlags.value._1; 1799 } 1800 1801 public pure nothrow @property @safe bool angry(bool value) { 1802 _tameableFlags.value._1 = value; 1803 return value; 1804 } 1805 1806 public pure nothrow @property @safe bool tamed() { 1807 return _tameableFlags.value._2; 1808 } 1809 1810 public pure nothrow @property @safe bool tamed(bool value) { 1811 _tameableFlags.value._2 = value; 1812 return value; 1813 } 1814 1815 public pure nothrow @property @safe @nogc uint ocelotVariant() { 1816 return _ocelotVariant.value; 1817 } 1818 1819 public pure nothrow @property @safe uint ocelotVariant(uint value) { 1820 this._cached = false; 1821 this._ocelotVariant.value = value; 1822 if(!this._ocelotVariant.changed) { 1823 this._ocelotVariant.changed = true; 1824 this._changed ~= &this.encodeOcelotVariant; 1825 } 1826 return value; 1827 } 1828 1829 public pure nothrow @safe encodeOcelotVariant(Buffer buffer) { 1830 with(buffer) { 1831 writeBigEndianUbyte(15); 1832 writeBigEndianUbyte(1); 1833 writeBytes(varuint.encode(this._ocelotVariant.value)); 1834 } 1835 } 1836 1837 public pure nothrow @property @safe @nogc float wolfHealth() { 1838 return _wolfHealth.value; 1839 } 1840 1841 public pure nothrow @property @safe float wolfHealth(float value) { 1842 this._cached = false; 1843 this._wolfHealth.value = value; 1844 if(!this._wolfHealth.changed) { 1845 this._wolfHealth.changed = true; 1846 this._changed ~= &this.encodeWolfHealth; 1847 } 1848 return value; 1849 } 1850 1851 public pure nothrow @safe encodeWolfHealth(Buffer buffer) { 1852 with(buffer) { 1853 writeBigEndianUbyte(15); 1854 writeBigEndianUbyte(2); 1855 writeBigEndianFloat(this._wolfHealth.value); 1856 } 1857 } 1858 1859 public pure nothrow @property @safe @nogc bool begging() { 1860 return _begging.value; 1861 } 1862 1863 public pure nothrow @property @safe bool begging(bool value) { 1864 this._cached = false; 1865 this._begging.value = value; 1866 if(!this._begging.changed) { 1867 this._begging.changed = true; 1868 this._changed ~= &this.encodeBegging; 1869 } 1870 return value; 1871 } 1872 1873 public pure nothrow @safe encodeBegging(Buffer buffer) { 1874 with(buffer) { 1875 writeBigEndianUbyte(16); 1876 writeBigEndianUbyte(6); 1877 writeBigEndianBool(this._begging.value); 1878 } 1879 } 1880 1881 public pure nothrow @property @safe @nogc uint collarColor() { 1882 return _collarColor.value; 1883 } 1884 1885 public pure nothrow @property @safe uint collarColor(uint value) { 1886 this._cached = false; 1887 this._collarColor.value = value; 1888 if(!this._collarColor.changed) { 1889 this._collarColor.changed = true; 1890 this._changed ~= &this.encodeCollarColor; 1891 } 1892 return value; 1893 } 1894 1895 public pure nothrow @safe encodeCollarColor(Buffer buffer) { 1896 with(buffer) { 1897 writeBigEndianUbyte(17); 1898 writeBigEndianUbyte(1); 1899 writeBytes(varuint.encode(this._collarColor.value)); 1900 } 1901 } 1902 1903 public pure nothrow @property @safe @nogc uint profession() { 1904 return _profession.value; 1905 } 1906 1907 public pure nothrow @property @safe uint profession(uint value) { 1908 this._cached = false; 1909 this._profession.value = value; 1910 if(!this._profession.changed) { 1911 this._profession.changed = true; 1912 this._changed ~= &this.encodeProfession; 1913 } 1914 return value; 1915 } 1916 1917 public pure nothrow @safe encodeProfession(Buffer buffer) { 1918 with(buffer) { 1919 writeBigEndianUbyte(13); 1920 writeBigEndianUbyte(1); 1921 writeBytes(varuint.encode(this._profession.value)); 1922 } 1923 } 1924 1925 public pure nothrow @property @safe @nogc byte createdByPlayer() { 1926 return _createdByPlayer.value; 1927 } 1928 1929 public pure nothrow @property @safe byte createdByPlayer(byte value) { 1930 this._cached = false; 1931 this._createdByPlayer.value = value; 1932 if(!this._createdByPlayer.changed) { 1933 this._createdByPlayer.changed = true; 1934 this._changed ~= &this.encodeCreatedByPlayer; 1935 } 1936 return value; 1937 } 1938 1939 public pure nothrow @safe encodeCreatedByPlayer(Buffer buffer) { 1940 with(buffer) { 1941 writeBigEndianUbyte(12); 1942 writeBigEndianUbyte(0); 1943 writeBigEndianByte(this._createdByPlayer.value); 1944 } 1945 } 1946 1947 public pure nothrow @property @safe @nogc byte snowmanFlags() { 1948 return _snowmanFlags.value; 1949 } 1950 1951 public pure nothrow @property @safe byte snowmanFlags(byte value) { 1952 this._cached = false; 1953 this._snowmanFlags.value = value; 1954 if(!this._snowmanFlags.changed) { 1955 this._snowmanFlags.changed = true; 1956 this._changed ~= &this.encodeSnowmanFlags; 1957 } 1958 return value; 1959 } 1960 1961 public pure nothrow @safe encodeSnowmanFlags(Buffer buffer) { 1962 with(buffer) { 1963 writeBigEndianUbyte(12); 1964 writeBigEndianUbyte(0); 1965 writeBigEndianByte(this._snowmanFlags.value); 1966 } 1967 } 1968 1969 public pure nothrow @property @safe bool pumpkinless() { 1970 return _snowmanFlags.value._4; 1971 } 1972 1973 public pure nothrow @property @safe bool pumpkinless(bool value) { 1974 _snowmanFlags.value._4 = value; 1975 return value; 1976 } 1977 1978 public pure nothrow @property @safe @nogc uint shulkerDirection() { 1979 return _shulkerDirection.value; 1980 } 1981 1982 public pure nothrow @property @safe uint shulkerDirection(uint value) { 1983 this._cached = false; 1984 this._shulkerDirection.value = value; 1985 if(!this._shulkerDirection.changed) { 1986 this._shulkerDirection.changed = true; 1987 this._changed ~= &this.encodeShulkerDirection; 1988 } 1989 return value; 1990 } 1991 1992 public pure nothrow @safe encodeShulkerDirection(Buffer buffer) { 1993 with(buffer) { 1994 writeBigEndianUbyte(12); 1995 writeBigEndianUbyte(10); 1996 writeBytes(varuint.encode(this._shulkerDirection.value)); 1997 } 1998 } 1999 2000 public pure nothrow @property @safe @nogc sul.protocol.java210.types.OptionalPosition shulkerAttachment() { 2001 return _shulkerAttachment.value; 2002 } 2003 2004 public pure nothrow @property @safe sul.protocol.java210.types.OptionalPosition shulkerAttachment(sul.protocol.java210.types.OptionalPosition value) { 2005 this._cached = false; 2006 this._shulkerAttachment.value = value; 2007 if(!this._shulkerAttachment.changed) { 2008 this._shulkerAttachment.changed = true; 2009 this._changed ~= &this.encodeShulkerAttachment; 2010 } 2011 return value; 2012 } 2013 2014 public pure nothrow @safe encodeShulkerAttachment(Buffer buffer) { 2015 with(buffer) { 2016 writeBigEndianUbyte(13); 2017 writeBigEndianUbyte(9); 2018 this._shulkerAttachment.value.encode(bufferInstance); 2019 } 2020 } 2021 2022 public pure nothrow @property @safe @nogc byte shulkerShieldHeight() { 2023 return _shulkerShieldHeight.value; 2024 } 2025 2026 public pure nothrow @property @safe byte shulkerShieldHeight(byte value) { 2027 this._cached = false; 2028 this._shulkerShieldHeight.value = value; 2029 if(!this._shulkerShieldHeight.changed) { 2030 this._shulkerShieldHeight.changed = true; 2031 this._changed ~= &this.encodeShulkerShieldHeight; 2032 } 2033 return value; 2034 } 2035 2036 public pure nothrow @safe encodeShulkerShieldHeight(Buffer buffer) { 2037 with(buffer) { 2038 writeBigEndianUbyte(14); 2039 writeBigEndianUbyte(0); 2040 writeBigEndianByte(this._shulkerShieldHeight.value); 2041 } 2042 } 2043 2044 public pure nothrow @property @safe @nogc byte blazeOnFire() { 2045 return _blazeOnFire.value; 2046 } 2047 2048 public pure nothrow @property @safe byte blazeOnFire(byte value) { 2049 this._cached = false; 2050 this._blazeOnFire.value = value; 2051 if(!this._blazeOnFire.changed) { 2052 this._blazeOnFire.changed = true; 2053 this._changed ~= &this.encodeBlazeOnFire; 2054 } 2055 return value; 2056 } 2057 2058 public pure nothrow @safe encodeBlazeOnFire(Buffer buffer) { 2059 with(buffer) { 2060 writeBigEndianUbyte(12); 2061 writeBigEndianUbyte(0); 2062 writeBigEndianByte(this._blazeOnFire.value); 2063 } 2064 } 2065 2066 public pure nothrow @property @safe @nogc uint creeperState() { 2067 return _creeperState.value; 2068 } 2069 2070 public pure nothrow @property @safe uint creeperState(uint value) { 2071 this._cached = false; 2072 this._creeperState.value = value; 2073 if(!this._creeperState.changed) { 2074 this._creeperState.changed = true; 2075 this._changed ~= &this.encodeCreeperState; 2076 } 2077 return value; 2078 } 2079 2080 public pure nothrow @safe encodeCreeperState(Buffer buffer) { 2081 with(buffer) { 2082 writeBigEndianUbyte(12); 2083 writeBigEndianUbyte(1); 2084 writeBytes(varuint.encode(this._creeperState.value)); 2085 } 2086 } 2087 2088 public pure nothrow @property @safe @nogc bool charged() { 2089 return _charged.value; 2090 } 2091 2092 public pure nothrow @property @safe bool charged(bool value) { 2093 this._cached = false; 2094 this._charged.value = value; 2095 if(!this._charged.changed) { 2096 this._charged.changed = true; 2097 this._changed ~= &this.encodeCharged; 2098 } 2099 return value; 2100 } 2101 2102 public pure nothrow @safe encodeCharged(Buffer buffer) { 2103 with(buffer) { 2104 writeBigEndianUbyte(13); 2105 writeBigEndianUbyte(6); 2106 writeBigEndianBool(this._charged.value); 2107 } 2108 } 2109 2110 public pure nothrow @property @safe @nogc bool ignited() { 2111 return _ignited.value; 2112 } 2113 2114 public pure nothrow @property @safe bool ignited(bool value) { 2115 this._cached = false; 2116 this._ignited.value = value; 2117 if(!this._ignited.changed) { 2118 this._ignited.changed = true; 2119 this._changed ~= &this.encodeIgnited; 2120 } 2121 return value; 2122 } 2123 2124 public pure nothrow @safe encodeIgnited(Buffer buffer) { 2125 with(buffer) { 2126 writeBigEndianUbyte(14); 2127 writeBigEndianUbyte(6); 2128 writeBigEndianBool(this._ignited.value); 2129 } 2130 } 2131 2132 public pure nothrow @property @safe @nogc byte guardianFlags() { 2133 return _guardianFlags.value; 2134 } 2135 2136 public pure nothrow @property @safe byte guardianFlags(byte value) { 2137 this._cached = false; 2138 this._guardianFlags.value = value; 2139 if(!this._guardianFlags.changed) { 2140 this._guardianFlags.changed = true; 2141 this._changed ~= &this.encodeGuardianFlags; 2142 } 2143 return value; 2144 } 2145 2146 public pure nothrow @safe encodeGuardianFlags(Buffer buffer) { 2147 with(buffer) { 2148 writeBigEndianUbyte(12); 2149 writeBigEndianUbyte(0); 2150 writeBigEndianByte(this._guardianFlags.value); 2151 } 2152 } 2153 2154 public pure nothrow @property @safe bool retractingSpikes() { 2155 return _guardianFlags.value._1; 2156 } 2157 2158 public pure nothrow @property @safe bool retractingSpikes(bool value) { 2159 _guardianFlags.value._1 = value; 2160 return value; 2161 } 2162 2163 public pure nothrow @property @safe bool elder() { 2164 return _guardianFlags.value._2; 2165 } 2166 2167 public pure nothrow @property @safe bool elder(bool value) { 2168 _guardianFlags.value._2 = value; 2169 return value; 2170 } 2171 2172 public pure nothrow @property @safe @nogc uint guardianTarget() { 2173 return _guardianTarget.value; 2174 } 2175 2176 public pure nothrow @property @safe uint guardianTarget(uint value) { 2177 this._cached = false; 2178 this._guardianTarget.value = value; 2179 if(!this._guardianTarget.changed) { 2180 this._guardianTarget.changed = true; 2181 this._changed ~= &this.encodeGuardianTarget; 2182 } 2183 return value; 2184 } 2185 2186 public pure nothrow @safe encodeGuardianTarget(Buffer buffer) { 2187 with(buffer) { 2188 writeBigEndianUbyte(13); 2189 writeBigEndianUbyte(1); 2190 writeBytes(varuint.encode(this._guardianTarget.value)); 2191 } 2192 } 2193 2194 public pure nothrow @property @safe @nogc uint skeletonType() { 2195 return _skeletonType.value; 2196 } 2197 2198 public pure nothrow @property @safe uint skeletonType(uint value) { 2199 this._cached = false; 2200 this._skeletonType.value = value; 2201 if(!this._skeletonType.changed) { 2202 this._skeletonType.changed = true; 2203 this._changed ~= &this.encodeSkeletonType; 2204 } 2205 return value; 2206 } 2207 2208 public pure nothrow @safe encodeSkeletonType(Buffer buffer) { 2209 with(buffer) { 2210 writeBigEndianUbyte(12); 2211 writeBigEndianUbyte(1); 2212 writeBytes(varuint.encode(this._skeletonType.value)); 2213 } 2214 } 2215 2216 public pure nothrow @property @safe @nogc bool swingingArms() { 2217 return _swingingArms.value; 2218 } 2219 2220 public pure nothrow @property @safe bool swingingArms(bool value) { 2221 this._cached = false; 2222 this._swingingArms.value = value; 2223 if(!this._swingingArms.changed) { 2224 this._swingingArms.changed = true; 2225 this._changed ~= &this.encodeSwingingArms; 2226 } 2227 return value; 2228 } 2229 2230 public pure nothrow @safe encodeSwingingArms(Buffer buffer) { 2231 with(buffer) { 2232 writeBigEndianUbyte(13); 2233 writeBigEndianUbyte(6); 2234 writeBigEndianBool(this._swingingArms.value); 2235 } 2236 } 2237 2238 public pure nothrow @property @safe @nogc byte climbing() { 2239 return _climbing.value; 2240 } 2241 2242 public pure nothrow @property @safe byte climbing(byte value) { 2243 this._cached = false; 2244 this._climbing.value = value; 2245 if(!this._climbing.changed) { 2246 this._climbing.changed = true; 2247 this._changed ~= &this.encodeClimbing; 2248 } 2249 return value; 2250 } 2251 2252 public pure nothrow @safe encodeClimbing(Buffer buffer) { 2253 with(buffer) { 2254 writeBigEndianUbyte(12); 2255 writeBigEndianUbyte(0); 2256 writeBigEndianByte(this._climbing.value); 2257 } 2258 } 2259 2260 public pure nothrow @property @safe @nogc uint centerHeadTarget() { 2261 return _centerHeadTarget.value; 2262 } 2263 2264 public pure nothrow @property @safe uint centerHeadTarget(uint value) { 2265 this._cached = false; 2266 this._centerHeadTarget.value = value; 2267 if(!this._centerHeadTarget.changed) { 2268 this._centerHeadTarget.changed = true; 2269 this._changed ~= &this.encodeCenterHeadTarget; 2270 } 2271 return value; 2272 } 2273 2274 public pure nothrow @safe encodeCenterHeadTarget(Buffer buffer) { 2275 with(buffer) { 2276 writeBigEndianUbyte(12); 2277 writeBigEndianUbyte(1); 2278 writeBytes(varuint.encode(this._centerHeadTarget.value)); 2279 } 2280 } 2281 2282 public pure nothrow @property @safe @nogc uint leftHeadTarget() { 2283 return _leftHeadTarget.value; 2284 } 2285 2286 public pure nothrow @property @safe uint leftHeadTarget(uint value) { 2287 this._cached = false; 2288 this._leftHeadTarget.value = value; 2289 if(!this._leftHeadTarget.changed) { 2290 this._leftHeadTarget.changed = true; 2291 this._changed ~= &this.encodeLeftHeadTarget; 2292 } 2293 return value; 2294 } 2295 2296 public pure nothrow @safe encodeLeftHeadTarget(Buffer buffer) { 2297 with(buffer) { 2298 writeBigEndianUbyte(13); 2299 writeBigEndianUbyte(1); 2300 writeBytes(varuint.encode(this._leftHeadTarget.value)); 2301 } 2302 } 2303 2304 public pure nothrow @property @safe @nogc uint rightHeadTarget() { 2305 return _rightHeadTarget.value; 2306 } 2307 2308 public pure nothrow @property @safe uint rightHeadTarget(uint value) { 2309 this._cached = false; 2310 this._rightHeadTarget.value = value; 2311 if(!this._rightHeadTarget.changed) { 2312 this._rightHeadTarget.changed = true; 2313 this._changed ~= &this.encodeRightHeadTarget; 2314 } 2315 return value; 2316 } 2317 2318 public pure nothrow @safe encodeRightHeadTarget(Buffer buffer) { 2319 with(buffer) { 2320 writeBigEndianUbyte(14); 2321 writeBigEndianUbyte(1); 2322 writeBytes(varuint.encode(this._rightHeadTarget.value)); 2323 } 2324 } 2325 2326 public pure nothrow @property @safe @nogc uint invulnerableTime() { 2327 return _invulnerableTime.value; 2328 } 2329 2330 public pure nothrow @property @safe uint invulnerableTime(uint value) { 2331 this._cached = false; 2332 this._invulnerableTime.value = value; 2333 if(!this._invulnerableTime.changed) { 2334 this._invulnerableTime.changed = true; 2335 this._changed ~= &this.encodeInvulnerableTime; 2336 } 2337 return value; 2338 } 2339 2340 public pure nothrow @safe encodeInvulnerableTime(Buffer buffer) { 2341 with(buffer) { 2342 writeBigEndianUbyte(15); 2343 writeBigEndianUbyte(1); 2344 writeBytes(varuint.encode(this._invulnerableTime.value)); 2345 } 2346 } 2347 2348 public pure nothrow @property @safe @nogc uint zombieType() { 2349 return _zombieType.value; 2350 } 2351 2352 public pure nothrow @property @safe uint zombieType(uint value) { 2353 this._cached = false; 2354 this._zombieType.value = value; 2355 if(!this._zombieType.changed) { 2356 this._zombieType.changed = true; 2357 this._changed ~= &this.encodeZombieType; 2358 } 2359 return value; 2360 } 2361 2362 public pure nothrow @safe encodeZombieType(Buffer buffer) { 2363 with(buffer) { 2364 writeBigEndianUbyte(13); 2365 writeBigEndianUbyte(1); 2366 writeBytes(varuint.encode(this._zombieType.value)); 2367 } 2368 } 2369 2370 public pure nothrow @property @safe @nogc bool converting() { 2371 return _converting.value; 2372 } 2373 2374 public pure nothrow @property @safe bool converting(bool value) { 2375 this._cached = false; 2376 this._converting.value = value; 2377 if(!this._converting.changed) { 2378 this._converting.changed = true; 2379 this._changed ~= &this.encodeConverting; 2380 } 2381 return value; 2382 } 2383 2384 public pure nothrow @safe encodeConverting(Buffer buffer) { 2385 with(buffer) { 2386 writeBigEndianUbyte(14); 2387 writeBigEndianUbyte(6); 2388 writeBigEndianBool(this._converting.value); 2389 } 2390 } 2391 2392 public pure nothrow @property @safe @nogc bool handsHeldUp() { 2393 return _handsHeldUp.value; 2394 } 2395 2396 public pure nothrow @property @safe bool handsHeldUp(bool value) { 2397 this._cached = false; 2398 this._handsHeldUp.value = value; 2399 if(!this._handsHeldUp.changed) { 2400 this._handsHeldUp.changed = true; 2401 this._changed ~= &this.encodeHandsHeldUp; 2402 } 2403 return value; 2404 } 2405 2406 public pure nothrow @safe encodeHandsHeldUp(Buffer buffer) { 2407 with(buffer) { 2408 writeBigEndianUbyte(15); 2409 writeBigEndianUbyte(6); 2410 writeBigEndianBool(this._handsHeldUp.value); 2411 } 2412 } 2413 2414 public pure nothrow @property @safe @nogc uint carriedBlock() { 2415 return _carriedBlock.value; 2416 } 2417 2418 public pure nothrow @property @safe uint carriedBlock(uint value) { 2419 this._cached = false; 2420 this._carriedBlock.value = value; 2421 if(!this._carriedBlock.changed) { 2422 this._carriedBlock.changed = true; 2423 this._changed ~= &this.encodeCarriedBlock; 2424 } 2425 return value; 2426 } 2427 2428 public pure nothrow @safe encodeCarriedBlock(Buffer buffer) { 2429 with(buffer) { 2430 writeBigEndianUbyte(12); 2431 writeBigEndianUbyte(12); 2432 writeBytes(varuint.encode(this._carriedBlock.value)); 2433 } 2434 } 2435 2436 public pure nothrow @property @safe @nogc bool screaming() { 2437 return _screaming.value; 2438 } 2439 2440 public pure nothrow @property @safe bool screaming(bool value) { 2441 this._cached = false; 2442 this._screaming.value = value; 2443 if(!this._screaming.changed) { 2444 this._screaming.changed = true; 2445 this._changed ~= &this.encodeScreaming; 2446 } 2447 return value; 2448 } 2449 2450 public pure nothrow @safe encodeScreaming(Buffer buffer) { 2451 with(buffer) { 2452 writeBigEndianUbyte(13); 2453 writeBigEndianUbyte(6); 2454 writeBigEndianBool(this._screaming.value); 2455 } 2456 } 2457 2458 public pure nothrow @property @safe @nogc uint dragonPhase() { 2459 return _dragonPhase.value; 2460 } 2461 2462 public pure nothrow @property @safe uint dragonPhase(uint value) { 2463 this._cached = false; 2464 this._dragonPhase.value = value; 2465 if(!this._dragonPhase.changed) { 2466 this._dragonPhase.changed = true; 2467 this._changed ~= &this.encodeDragonPhase; 2468 } 2469 return value; 2470 } 2471 2472 public pure nothrow @safe encodeDragonPhase(Buffer buffer) { 2473 with(buffer) { 2474 writeBigEndianUbyte(12); 2475 writeBigEndianUbyte(1); 2476 writeBytes(varuint.encode(this._dragonPhase.value)); 2477 } 2478 } 2479 2480 public pure nothrow @property @safe @nogc bool ghastAttacking() { 2481 return _ghastAttacking.value; 2482 } 2483 2484 public pure nothrow @property @safe bool ghastAttacking(bool value) { 2485 this._cached = false; 2486 this._ghastAttacking.value = value; 2487 if(!this._ghastAttacking.changed) { 2488 this._ghastAttacking.changed = true; 2489 this._changed ~= &this.encodeGhastAttacking; 2490 } 2491 return value; 2492 } 2493 2494 public pure nothrow @safe encodeGhastAttacking(Buffer buffer) { 2495 with(buffer) { 2496 writeBigEndianUbyte(12); 2497 writeBigEndianUbyte(6); 2498 writeBigEndianBool(this._ghastAttacking.value); 2499 } 2500 } 2501 2502 public pure nothrow @property @safe @nogc uint slimeSize() { 2503 return _slimeSize.value; 2504 } 2505 2506 public pure nothrow @property @safe uint slimeSize(uint value) { 2507 this._cached = false; 2508 this._slimeSize.value = value; 2509 if(!this._slimeSize.changed) { 2510 this._slimeSize.changed = true; 2511 this._changed ~= &this.encodeSlimeSize; 2512 } 2513 return value; 2514 } 2515 2516 public pure nothrow @safe encodeSlimeSize(Buffer buffer) { 2517 with(buffer) { 2518 writeBigEndianUbyte(12); 2519 writeBigEndianUbyte(1); 2520 writeBytes(varuint.encode(this._slimeSize.value)); 2521 } 2522 } 2523 2524 public pure nothrow @property @safe @nogc uint shakingPower() { 2525 return _shakingPower.value; 2526 } 2527 2528 public pure nothrow @property @safe uint shakingPower(uint value) { 2529 this._cached = false; 2530 this._shakingPower.value = value; 2531 if(!this._shakingPower.changed) { 2532 this._shakingPower.changed = true; 2533 this._changed ~= &this.encodeShakingPower; 2534 } 2535 return value; 2536 } 2537 2538 public pure nothrow @safe encodeShakingPower(Buffer buffer) { 2539 with(buffer) { 2540 writeBigEndianUbyte(6); 2541 writeBigEndianUbyte(1); 2542 writeBytes(varuint.encode(this._shakingPower.value)); 2543 } 2544 } 2545 2546 public pure nothrow @property @safe @nogc uint shakingDirection() { 2547 return _shakingDirection.value; 2548 } 2549 2550 public pure nothrow @property @safe uint shakingDirection(uint value) { 2551 this._cached = false; 2552 this._shakingDirection.value = value; 2553 if(!this._shakingDirection.changed) { 2554 this._shakingDirection.changed = true; 2555 this._changed ~= &this.encodeShakingDirection; 2556 } 2557 return value; 2558 } 2559 2560 public pure nothrow @safe encodeShakingDirection(Buffer buffer) { 2561 with(buffer) { 2562 writeBigEndianUbyte(7); 2563 writeBigEndianUbyte(1); 2564 writeBytes(varuint.encode(this._shakingDirection.value)); 2565 } 2566 } 2567 2568 public pure nothrow @property @safe @nogc float shakingMultiplier() { 2569 return _shakingMultiplier.value; 2570 } 2571 2572 public pure nothrow @property @safe float shakingMultiplier(float value) { 2573 this._cached = false; 2574 this._shakingMultiplier.value = value; 2575 if(!this._shakingMultiplier.changed) { 2576 this._shakingMultiplier.changed = true; 2577 this._changed ~= &this.encodeShakingMultiplier; 2578 } 2579 return value; 2580 } 2581 2582 public pure nothrow @safe encodeShakingMultiplier(Buffer buffer) { 2583 with(buffer) { 2584 writeBigEndianUbyte(8); 2585 writeBigEndianUbyte(2); 2586 writeBigEndianFloat(this._shakingMultiplier.value); 2587 } 2588 } 2589 2590 public pure nothrow @property @safe @nogc uint minecartBlock() { 2591 return _minecartBlock.value; 2592 } 2593 2594 public pure nothrow @property @safe uint minecartBlock(uint value) { 2595 this._cached = false; 2596 this._minecartBlock.value = value; 2597 if(!this._minecartBlock.changed) { 2598 this._minecartBlock.changed = true; 2599 this._changed ~= &this.encodeMinecartBlock; 2600 } 2601 return value; 2602 } 2603 2604 public pure nothrow @safe encodeMinecartBlock(Buffer buffer) { 2605 with(buffer) { 2606 writeBigEndianUbyte(9); 2607 writeBigEndianUbyte(1); 2608 writeBytes(varuint.encode(this._minecartBlock.value)); 2609 } 2610 } 2611 2612 public pure nothrow @property @safe @nogc uint minecartBlockPosition() { 2613 return _minecartBlockPosition.value; 2614 } 2615 2616 public pure nothrow @property @safe uint minecartBlockPosition(uint value) { 2617 this._cached = false; 2618 this._minecartBlockPosition.value = value; 2619 if(!this._minecartBlockPosition.changed) { 2620 this._minecartBlockPosition.changed = true; 2621 this._changed ~= &this.encodeMinecartBlockPosition; 2622 } 2623 return value; 2624 } 2625 2626 public pure nothrow @safe encodeMinecartBlockPosition(Buffer buffer) { 2627 with(buffer) { 2628 writeBigEndianUbyte(10); 2629 writeBigEndianUbyte(1); 2630 writeBytes(varuint.encode(this._minecartBlockPosition.value)); 2631 } 2632 } 2633 2634 public pure nothrow @property @safe @nogc bool minecartCustomBlock() { 2635 return _minecartCustomBlock.value; 2636 } 2637 2638 public pure nothrow @property @safe bool minecartCustomBlock(bool value) { 2639 this._cached = false; 2640 this._minecartCustomBlock.value = value; 2641 if(!this._minecartCustomBlock.changed) { 2642 this._minecartCustomBlock.changed = true; 2643 this._changed ~= &this.encodeMinecartCustomBlock; 2644 } 2645 return value; 2646 } 2647 2648 public pure nothrow @safe encodeMinecartCustomBlock(Buffer buffer) { 2649 with(buffer) { 2650 writeBigEndianUbyte(11); 2651 writeBigEndianUbyte(6); 2652 writeBigEndianBool(this._minecartCustomBlock.value); 2653 } 2654 } 2655 2656 public pure nothrow @property @safe @nogc bool furnacePowered() { 2657 return _furnacePowered.value; 2658 } 2659 2660 public pure nothrow @property @safe bool furnacePowered(bool value) { 2661 this._cached = false; 2662 this._furnacePowered.value = value; 2663 if(!this._furnacePowered.changed) { 2664 this._furnacePowered.changed = true; 2665 this._changed ~= &this.encodeFurnacePowered; 2666 } 2667 return value; 2668 } 2669 2670 public pure nothrow @safe encodeFurnacePowered(Buffer buffer) { 2671 with(buffer) { 2672 writeBigEndianUbyte(12); 2673 writeBigEndianUbyte(6); 2674 writeBigEndianBool(this._furnacePowered.value); 2675 } 2676 } 2677 2678 public pure nothrow @property @safe @nogc string command() { 2679 return _command.value; 2680 } 2681 2682 public pure nothrow @property @safe string command(string value) { 2683 this._cached = false; 2684 this._command.value = value; 2685 if(!this._command.changed) { 2686 this._command.changed = true; 2687 this._changed ~= &this.encodeCommand; 2688 } 2689 return value; 2690 } 2691 2692 public pure nothrow @safe encodeCommand(Buffer buffer) { 2693 with(buffer) { 2694 writeBigEndianUbyte(12); 2695 writeBigEndianUbyte(3); 2696 writeBytes(varuint.encode(cast(uint)this._command.value.length)); writeString(this._command.value); 2697 } 2698 } 2699 2700 public pure nothrow @property @safe @nogc string lastOutput() { 2701 return _lastOutput.value; 2702 } 2703 2704 public pure nothrow @property @safe string lastOutput(string value) { 2705 this._cached = false; 2706 this._lastOutput.value = value; 2707 if(!this._lastOutput.changed) { 2708 this._lastOutput.changed = true; 2709 this._changed ~= &this.encodeLastOutput; 2710 } 2711 return value; 2712 } 2713 2714 public pure nothrow @safe encodeLastOutput(Buffer buffer) { 2715 with(buffer) { 2716 writeBigEndianUbyte(13); 2717 writeBigEndianUbyte(4); 2718 writeBytes(varuint.encode(cast(uint)this._lastOutput.value.length)); writeString(this._lastOutput.value); 2719 } 2720 } 2721 2722 public pure nothrow @property @safe @nogc uint fuseTime() { 2723 return _fuseTime.value; 2724 } 2725 2726 public pure nothrow @property @safe uint fuseTime(uint value) { 2727 this._cached = false; 2728 this._fuseTime.value = value; 2729 if(!this._fuseTime.changed) { 2730 this._fuseTime.changed = true; 2731 this._changed ~= &this.encodeFuseTime; 2732 } 2733 return value; 2734 } 2735 2736 public pure nothrow @safe encodeFuseTime(Buffer buffer) { 2737 with(buffer) { 2738 writeBigEndianUbyte(6); 2739 writeBigEndianUbyte(1); 2740 writeBytes(varuint.encode(this._fuseTime.value)); 2741 } 2742 } 2743 2744 public pure nothrow @safe encode(Buffer buffer) { 2745 with(buffer) { 2746 if(this._cached) { 2747 buffer.writeBytes(this._cache); 2748 } else { 2749 immutable start = buffer._buffer.length; 2750 foreach(del ; this._changed) del(buffer); 2751 writeBigEndianUbyte(255); 2752 this._cached = true; 2753 this._cache = buffer._buffer[start..$]; 2754 } 2755 } 2756 } 2757 2758 public static pure nothrow @safe Metadata decode(Buffer buffer) { 2759 auto metadata = new Metadata(); 2760 with(buffer) { 2761 ubyte id; 2762 while(_index < _buffer.length && (id=readBigEndianUbyte()) != 255) { 2763 switch(readBigEndianUbyte()) { 2764 case 0: 2765 byte _0; 2766 _0=readBigEndianByte(); 2767 metadata.decoded ~= DecodedMetadata.fromByte(id, _0); 2768 break; 2769 case 1: 2770 uint _1; 2771 _1=varuint.decode(_buffer, &_index); 2772 metadata.decoded ~= DecodedMetadata.fromInt(id, _1); 2773 break; 2774 case 2: 2775 float _2; 2776 _2=readBigEndianFloat(); 2777 metadata.decoded ~= DecodedMetadata.fromFloat(id, _2); 2778 break; 2779 case 3: 2780 string _3; 2781 uint xm=varuint.decode(_buffer, &_index); _3=readString(xm); 2782 metadata.decoded ~= DecodedMetadata.fromString(id, _3); 2783 break; 2784 case 4: 2785 string _4; 2786 uint xq=varuint.decode(_buffer, &_index); _4=readString(xq); 2787 metadata.decoded ~= DecodedMetadata.fromChat(id, _4); 2788 break; 2789 case 5: 2790 sul.protocol.java210.types.Slot _5; 2791 _5.decode(bufferInstance); 2792 metadata.decoded ~= DecodedMetadata.fromSlot(id, _5); 2793 break; 2794 case 6: 2795 bool _6; 2796 _6=readBigEndianBool(); 2797 metadata.decoded ~= DecodedMetadata.fromBool(id, _6); 2798 break; 2799 case 7: 2800 Tuple!(float, "x", float, "y", float, "z") _7; 2801 _7.x=readBigEndianFloat(); _7.y=readBigEndianFloat(); _7.z=readBigEndianFloat(); 2802 metadata.decoded ~= DecodedMetadata.fromRotation(id, _7); 2803 break; 2804 case 8: 2805 ulong _8; 2806 _8=readBigEndianUlong(); 2807 metadata.decoded ~= DecodedMetadata.fromPosition(id, _8); 2808 break; 2809 case 9: 2810 sul.protocol.java210.types.OptionalPosition _9; 2811 _9.decode(bufferInstance); 2812 metadata.decoded ~= DecodedMetadata.fromOptionalPosition(id, _9); 2813 break; 2814 case 10: 2815 uint _10; 2816 _10=varuint.decode(_buffer, &_index); 2817 metadata.decoded ~= DecodedMetadata.fromDirection(id, _10); 2818 break; 2819 case 11: 2820 sul.protocol.java210.types.OptionalUuid _11; 2821 _11.decode(bufferInstance); 2822 metadata.decoded ~= DecodedMetadata.fromUuid(id, _11); 2823 break; 2824 case 12: 2825 uint _12; 2826 _12=varuint.decode(_buffer, &_index); 2827 metadata.decoded ~= DecodedMetadata.fromBlock(id, _12); 2828 break; 2829 default: 2830 break; 2831 } 2832 } 2833 } 2834 return metadata; 2835 } 2836 2837 } 2838 2839 class DecodedMetadata { 2840 2841 public immutable ubyte id; 2842 public immutable ubyte type; 2843 2844 union { 2845 byte byte_; 2846 uint int_; 2847 float float_; 2848 string string_; 2849 string chat; 2850 sul.protocol.java210.types.Slot slot; 2851 bool bool_; 2852 Tuple!(float, "x", float, "y", float, "z") rotation; 2853 ulong position; 2854 sul.protocol.java210.types.OptionalPosition optional_position; 2855 uint direction; 2856 sul.protocol.java210.types.OptionalUuid uuid; 2857 uint block; 2858 } 2859 2860 private pure nothrow @safe @nogc this(ubyte id, ubyte type) { 2861 this.id = id; 2862 this.type = type; 2863 } 2864 2865 public static pure nothrow @trusted DecodedMetadata fromByte(ubyte id, byte value) { 2866 auto ret = new DecodedMetadata(id, 0); 2867 ret.byte_ = value; 2868 return ret; 2869 } 2870 2871 public static pure nothrow @trusted DecodedMetadata fromInt(ubyte id, uint value) { 2872 auto ret = new DecodedMetadata(id, 1); 2873 ret.int_ = value; 2874 return ret; 2875 } 2876 2877 public static pure nothrow @trusted DecodedMetadata fromFloat(ubyte id, float value) { 2878 auto ret = new DecodedMetadata(id, 2); 2879 ret.float_ = value; 2880 return ret; 2881 } 2882 2883 public static pure nothrow @trusted DecodedMetadata fromString(ubyte id, string value) { 2884 auto ret = new DecodedMetadata(id, 3); 2885 ret.string_ = value; 2886 return ret; 2887 } 2888 2889 public static pure nothrow @trusted DecodedMetadata fromChat(ubyte id, string value) { 2890 auto ret = new DecodedMetadata(id, 4); 2891 ret.chat = value; 2892 return ret; 2893 } 2894 2895 public static pure nothrow @trusted DecodedMetadata fromSlot(ubyte id, sul.protocol.java210.types.Slot value) { 2896 auto ret = new DecodedMetadata(id, 5); 2897 ret.slot = value; 2898 return ret; 2899 } 2900 2901 public static pure nothrow @trusted DecodedMetadata fromBool(ubyte id, bool value) { 2902 auto ret = new DecodedMetadata(id, 6); 2903 ret.bool_ = value; 2904 return ret; 2905 } 2906 2907 public static pure nothrow @trusted DecodedMetadata fromRotation(ubyte id, Tuple!(float, "x", float, "y", float, "z") value) { 2908 auto ret = new DecodedMetadata(id, 7); 2909 ret.rotation = value; 2910 return ret; 2911 } 2912 2913 public static pure nothrow @trusted DecodedMetadata fromPosition(ubyte id, ulong value) { 2914 auto ret = new DecodedMetadata(id, 8); 2915 ret.position = value; 2916 return ret; 2917 } 2918 2919 public static pure nothrow @trusted DecodedMetadata fromOptionalPosition(ubyte id, sul.protocol.java210.types.OptionalPosition value) { 2920 auto ret = new DecodedMetadata(id, 9); 2921 ret.optional_position = value; 2922 return ret; 2923 } 2924 2925 public static pure nothrow @trusted DecodedMetadata fromDirection(ubyte id, uint value) { 2926 auto ret = new DecodedMetadata(id, 10); 2927 ret.direction = value; 2928 return ret; 2929 } 2930 2931 public static pure nothrow @trusted DecodedMetadata fromUuid(ubyte id, sul.protocol.java210.types.OptionalUuid value) { 2932 auto ret = new DecodedMetadata(id, 11); 2933 ret.uuid = value; 2934 return ret; 2935 } 2936 2937 public static pure nothrow @trusted DecodedMetadata fromBlock(ubyte id, uint value) { 2938 auto ret = new DecodedMetadata(id, 12); 2939 ret.block = value; 2940 return ret; 2941 } 2942 2943 }