Drowned is a RangedEntity (fixes API for Drowned to support Ranged)

This commit is contained in:
Aikar 2020-04-09 21:30:38 -04:00
parent 83b03eee04
commit ebbca5cedb
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
2 changed files with 34 additions and 2 deletions

View File

@ -1,4 +1,4 @@
From d73f296bc9c8ec8389e3d97d1ab5ac721045b7a4 Mon Sep 17 00:00:00 2001
From 746faf7473c797fa89e6aa95fbddcfc48cdbb07b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 26 Jun 2018 21:34:40 -0400
Subject: [PATCH] RangedEntity API
@ -43,6 +43,20 @@ index 000000000..f2e3233a3
+ return isHandRaised();
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Drowned.java b/src/main/java/org/bukkit/entity/Drowned.java
index 1dee177ae..8d1ad9ef7 100644
--- a/src/main/java/org/bukkit/entity/Drowned.java
+++ b/src/main/java/org/bukkit/entity/Drowned.java
@@ -1,6 +1,8 @@
package org.bukkit.entity;
+import com.destroystokyo.paper.entity.RangedEntity;
+
/**
* Drowned zombie.
*/
-public interface Drowned extends Zombie { }
+public interface Drowned extends Zombie, RangedEntity { } // Paper
diff --git a/src/main/java/org/bukkit/entity/Illusioner.java b/src/main/java/org/bukkit/entity/Illusioner.java
index 7c92c431b..14e6c5ee0 100644
--- a/src/main/java/org/bukkit/entity/Illusioner.java

View File

@ -1,4 +1,4 @@
From 449c1b103b950dc66deac0b506dc15aa8888be64 Mon Sep 17 00:00:00 2001
From 80454b845746cb5463b2e17de487af1e69c84703 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 26 Jun 2018 22:00:49 -0400
Subject: [PATCH] RangedEntity API
@ -45,6 +45,24 @@ index b4178ce1e8..9b79ac77db 100644
+ // - see EntitySkeletonAbstract melee goal
+ void q(boolean flag); default void setChargingAttack(boolean charging) { q(charging); }; // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
index 6e41dfd923..390183fffd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
@@ -1,11 +1,12 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftRangedEntity;
import net.minecraft.server.EntityDrowned;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Drowned;
import org.bukkit.entity.EntityType;
-public class CraftDrowned extends CraftZombie implements Drowned {
+public class CraftDrowned extends CraftZombie implements Drowned, CraftRangedEntity<EntityDrowned> { // Paper
public CraftDrowned(CraftServer server, EntityDrowned entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
index 2ec1af8be4..f31d3eed3a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java