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