From c3a023021d94aa86edfaf8262b25354a8acddf01 Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Thu, 16 Mar 2023 02:51:40 -0500 Subject: [PATCH] Added IProjectile and its events. --- java/noppes/npcs/api/entity/IProjectile.java | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 java/noppes/npcs/api/entity/IProjectile.java diff --git a/java/noppes/npcs/api/entity/IProjectile.java b/java/noppes/npcs/api/entity/IProjectile.java new file mode 100644 index 0000000..f05b1ae --- /dev/null +++ b/java/noppes/npcs/api/entity/IProjectile.java @@ -0,0 +1,47 @@ +package noppes.npcs.api.entity; + +import noppes.npcs.api.item.IItemStack; + +public interface IProjectile { + + public IItemStack getItem(); + + public void setItem(IItemStack item); + + /** + * @return Returns whether the arrow flies in a straight line or not + */ + public boolean getHasGravity(); + + /** + * @param bo Whether the arrow flies in a straight line or not + */ + public void setHasGravity(boolean bo); + + public int getAccuracy(); + + public void setAccuracy(int accuracy); + + /** + * Entity where the projectile heads towards + * The position for the projectile needs to have been set for this + */ + public void setHeading(IEntity entity); + + /** + * Position where the projectile heads towards. + * The position for the projectile needs to have been set for this + */ + public void setHeading(double x, double y, double z); + + /** + * @param yaw Rotation yaw + * @param pitch Rotation pitch + */ + public void setHeading(float yaw, float pitch); + + /** + * For scripters to enable projectile events in their current scripting container + */ + public void enableEvents(); +}