Add aggressive mob API (#9838)
This commit is contained in:
parent
dd47ec6fe2
commit
9ee60eca7d
9 changed files with 89 additions and 16 deletions
|
@ -8,10 +8,10 @@ and to perform an attack.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f2e3233a3d1744e32fb76d3731b9858ef0067e30
|
||||
index 0000000000000000000000000000000000000000..b5eb4239763f8f919bc328d95c846d5ef1a9d24f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -0,0 +1,35 @@
|
||||
+package com.destroystokyo.paper.entity;
|
||||
+
|
||||
+import org.bukkit.entity.LivingEntity;
|
||||
|
@ -32,13 +32,17 @@ index 0000000000000000000000000000000000000000..f2e3233a3d1744e32fb76d3731b9858e
|
|||
+ * Sets that the Entity is "charging" up an attack, by raising its hands
|
||||
+ *
|
||||
+ * @param raiseHands Whether the entities hands are raised to charge attack
|
||||
+ * @deprecated use {@link #isAggressive()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void setChargingAttack(boolean raiseHands);
|
||||
+
|
||||
+ /**
|
||||
+ * Alias to {@link LivingEntity#isHandRaised()}, if the entity is charging an attack
|
||||
+ * @return If entities hands are raised
|
||||
+ * @deprecated use {@link #isHandRaised()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ default boolean isChargingAttack() {
|
||||
+ return isHandRaised();
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue