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