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