3131import org .spongepowered .api .data .Keys ;
3232import org .spongepowered .api .data .SerializableDataHolder ;
3333import org .spongepowered .api .data .value .ListValue ;
34+ import org .spongepowered .api .data .value .SetValue ;
3435import org .spongepowered .api .data .value .Value ;
3536import org .spongepowered .api .event .cause .entity .damage .source .DamageSource ;
3637import org .spongepowered .api .projectile .source .EntityProjectileSource ;
@@ -376,7 +377,7 @@ default Optional<Value.Mutable<Entity>> vehicle() {
376377 *
377378 * @return The "base vehicle" of the entity vehicle riding chain
378379 */
379- default Optional <Value . Mutable <Entity >> baseVehicle () {
380+ default Optional <Value <Entity >> baseVehicle () {
380381 return this .getValue (Keys .BASE_VEHICLE ).map (Value ::asMutable );
381382 }
382383
@@ -385,7 +386,7 @@ default Optional<Value.Mutable<Entity>> baseVehicle() {
385386 *
386387 * @return Whether this entity is on the ground
387388 */
388- default Value . Mutable <Boolean > onGround () {
389+ default Value <Boolean > onGround () {
389390 return this .requireValue (Keys .ON_GROUND ).asMutable ();
390391 }
391392
@@ -437,7 +438,7 @@ default Optional<Value.Mutable<UUID>> notifier() {
437438 /**
438439 * {@link Keys#FIRE_TICKS}
439440 *
440- * @return The amount of time in ticks an Entity is will continue burn for.
441+ * @return The amount of time in ticks the entity is will continue burn for
441442 */
442443 default Optional <Value .Mutable <Ticks >> fireTicks () {
443444 return this .getValue (Keys .FIRE_TICKS ).map (Value ::asMutable );
@@ -446,19 +447,208 @@ default Optional<Value.Mutable<Ticks>> fireTicks() {
446447 /**
447448 * {@link Keys#FIRE_DAMAGE_DELAY}
448449 *
449- * @return The amount of time to delay in ticks before an Entity will be burned by fire.
450+ * @return The amount of time to delay in ticks before the entity will be burned by fire
450451 */
451- default Optional < Value .Mutable <Ticks > > fireImmuneTicks () {
452- return this .getValue (Keys .FIRE_DAMAGE_DELAY ).map ( Value :: asMutable );
452+ default Value .Mutable <Ticks > fireImmuneTicks () {
453+ return this .requireValue (Keys .FIRE_DAMAGE_DELAY ).asMutable ( );
453454 }
454455
455456 /**
456457 * {@link Keys#TRANSIENT}
457458 *
458459 * @return The transient state
459460 */
460- default Optional <Value .Mutable <Boolean >> isTransient () {
461- return this .getValue (Keys .TRANSIENT ).map (Value ::asMutable );
461+ default Value .Mutable <Boolean > isTransient () {
462+ return this .requireValue (Keys .TRANSIENT ).asMutable ();
463+ }
464+
465+ /**
466+ * {@link Keys#AGE}
467+ *
468+ * @return The age of this entity
469+ */
470+ default Value .Mutable <Integer > age () {
471+ return this .requireValue (Keys .AGE ).asMutable ();
472+ }
473+
474+ /**
475+ * {@link Keys#BASE_SIZE}
476+ *
477+ * @return The base size of the entity
478+ */
479+ default Value <Double > baseSize () {
480+ return this .requireValue (Keys .BASE_SIZE );
481+ }
482+
483+ /**
484+ * {@link Keys#EYE_HEIGHT}
485+ *
486+ * @return The height of the eyes
487+ */
488+ default Value <Double > eyeHeight () {
489+ return this .requireValue (Keys .EYE_HEIGHT );
490+ }
491+
492+ /**
493+ * {@link Keys#EYE_POSITION}
494+ *
495+ * @return The position of the eyes
496+ */
497+ default Value <Vector3d > eyePosition () {
498+ return this .requireValue (Keys .EYE_POSITION );
499+ }
500+
501+ /**
502+ * {@link Keys#HEIGHT}
503+ *
504+ * @return The height of the entity
505+ */
506+ default Value <Double > height () {
507+ return this .requireValue (Keys .HEIGHT );
508+ }
509+
510+ /**
511+ * {@link Keys#INVULNERABILITY_TICKS}
512+ *
513+ * @return The amount of ticks the entity will remain invulnerable for
514+ */
515+ default Value .Mutable <Ticks > invulnerabilityTicks () {
516+ return this .requireValue (Keys .INVULNERABILITY_TICKS ).asMutable ();
517+ }
518+
519+ /**
520+ * {@link Keys#IS_CUSTOM_NAME_VISIBLE}
521+ *
522+ * @return Whether a custom name is visible on the entity
523+ */
524+ default Value .Mutable <Boolean > customNameVisible () {
525+ return this .requireValue (Keys .IS_CUSTOM_NAME_VISIBLE ).asMutable ();
526+ }
527+
528+ /**
529+ * {@link Keys#IS_GLOWING}
530+ *
531+ * @return Whether the entity has a glowing outline
532+ */
533+ default Value .Mutable <Boolean > glowing () {
534+ return this .requireValue (Keys .IS_GLOWING ).asMutable ();
535+ }
536+
537+ /**
538+ * {@link Keys#IS_INVISIBLE}
539+ *
540+ * @return Whether the entity is currently invisible
541+ */
542+ default Value .Mutable <Boolean > invisible () {
543+ return this .requireValue (Keys .IS_INVISIBLE ).asMutable ();
544+ }
545+
546+ /**
547+ * {@link Keys#INVULNERABLE}
548+ *
549+ * @return Whether the entity is invulnerable
550+ */
551+ default Value .Mutable <Boolean > invulnerable () {
552+ return this .requireValue (Keys .INVULNERABLE ).asMutable ();
553+ }
554+
555+ /**
556+ * {@link Keys#IS_SNEAKING}
557+ *
558+ * @return Whether the entity is sneaking
559+ */
560+ default Value .Mutable <Boolean > sneaking () {
561+ return this .requireValue (Keys .IS_SNEAKING ).asMutable ();
562+ }
563+
564+ /**
565+ * {@link Keys#IS_SPRINTING}
566+ *
567+ * @return Whether the entity is sprinting
568+ */
569+ default Value .Mutable <Boolean > sprinting () {
570+ return this .requireValue (Keys .IS_SPRINTING ).asMutable ();
571+ }
572+
573+ /**
574+ * {@link Keys#IS_WET}
575+ *
576+ * @return Whether the entity is wet
577+ */
578+ default Value <Boolean > wet () {
579+ return this .requireValue (Keys .IS_WET ).asMutable ();
580+ }
581+
582+ /**
583+ * {@link Keys#MAX_AIR}
584+ *
585+ * @return The max air supply
586+ */
587+ default Value .Mutable <Integer > maxAir () {
588+ return this .requireValue (Keys .MAX_AIR ).asMutable ();
589+ }
590+
591+ /**
592+ * {@link Keys#REMAINING_AIR}
593+ *
594+ * @return The remaining air supply
595+ */
596+ default Value .Mutable <Integer > remainingAir () {
597+ return this .requireValue (Keys .REMAINING_AIR ).asMutable ();
598+ }
599+
600+ /**
601+ * {@link Keys#SCOREBOARD_TAGS}
602+ *
603+ * @return The scoreboard tags applied to the entity
604+ */
605+ default SetValue .Mutable <String > scoreboardTags () {
606+ return this .requireValue (Keys .SCOREBOARD_TAGS ).asMutable ();
607+ }
608+
609+ /**
610+ * {@link Keys#VANISH}
611+ *
612+ * @return Whether the entity is vanished
613+ */
614+ default Value .Mutable <Boolean > vanish () {
615+ return this .requireValue (Keys .VANISH ).asMutable ();
616+ }
617+
618+ /**
619+ * {@link Keys#VANISH_IGNORES_COLLISION}
620+ *
621+ * @return Whether the entity ignores collision with other entities
622+ */
623+ default Value .Mutable <Boolean > vanishIgnoresCollision () {
624+ return this .requireValue (Keys .VANISH_IGNORES_COLLISION ).asMutable ();
625+ }
626+
627+ /**
628+ * {@link Keys#VANISH_PREVENTS_TARGETING}
629+ *
630+ * @return Whether the entity can be targeted for attack by another entity
631+ */
632+ default Value .Mutable <Boolean > vanishPreventsTargeting () {
633+ return this .requireValue (Keys .VANISH_PREVENTS_TARGETING ).asMutable ();
634+ }
635+
636+ /**
637+ * {@link Keys#CUSTOM_NAME}
638+ *
639+ * @return The custom name of the entity
640+ */
641+ default Optional <Value .Mutable <Component >> customName () {
642+ return this .getValue (Keys .CUSTOM_NAME ).map (Value ::asMutable );
643+ }
644+
645+ /**
646+ * {@link Keys#SWIFTNESS}
647+ *
648+ * @return The current swiftness of the entity
649+ */
650+ default Optional <Value .Mutable <Double >> swiftness () {
651+ return this .getValue (Keys .SWIFTNESS ).map (Value ::asMutable );
462652 }
463653
464654 @ Override
0 commit comments