File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
src/main/java/org/spongepowered/api Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,24 @@ public final class Keys {
572572 */
573573 public static final Key <Value <BossBar >> BOSS_BAR = Keys .key (ResourceKey .sponge ("boss_bar" ), BossBar .class );
574574
575+ /**
576+ * The width of the interactable form of an {@link Entity}.
577+ *
578+ * <p>Together with {@link #BOUNDING_BOX_HEIGHT} this defines
579+ * the size of the {@link Entity}'s bounding box.</p>
580+ * Readonly(Entity.class) expect Interaction
581+ */
582+ public static final Key <Value <Double >> BOUNDING_BOX_BASE_SIZE = Keys .key (ResourceKey .sponge ("bounding_box_base_size" ), Double .class );
583+
584+ /**
585+ * The height of the interactable form of an {@link Entity}.
586+ *
587+ * <p>Together with {@link #BOUNDING_BOX_BASE_SIZE} this defines
588+ * the size of the {@link Entity}'s bounding box.</p>
589+ * Readonly(Entity.class) expect Interaction
590+ */
591+ public static final Key <Value <Double >> BOUNDING_BOX_HEIGHT = Keys .key (ResourceKey .sponge ("bounding_box_height" ), Double .class );
592+
575593 /**
576594 * The {@link BlockType}s able to be broken by an {@link ItemStack}.
577595 */
Original file line number Diff line number Diff line change @@ -655,4 +655,22 @@ default Optional<Value.Mutable<Double>> swiftness() {
655655
656656 @ Override
657657 HoverEvent <HoverEvent .ShowEntity > asHoverEvent (final UnaryOperator <HoverEvent .ShowEntity > op );
658+
659+ /**
660+ * {@link Keys#BOUNDING_BOX_BASE_SIZE}
661+ *
662+ * @return The bounding box base size of the entity
663+ */
664+ default Value .Mutable <Double > boundingBoxBaseSize () {
665+ return this .requireValue (Keys .BOUNDING_BOX_BASE_SIZE ).asMutable ();
666+ }
667+
668+ /**
669+ * {@link Keys#BOUNDING_BOX_HEIGHT}
670+ *
671+ * @return The bounding box height of the entity
672+ */
673+ default Value .Mutable <Double > boundingBoxHeight () {
674+ return this .requireValue (Keys .BOUNDING_BOX_HEIGHT ).asMutable ();
675+ }
658676}
You can’t perform that action at this time.
0 commit comments