mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-17 13:00:04 +08:00
44 lines
1.9 KiB
Diff
44 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Encode42 <me@encode42.dev>
|
|
Date: Tue, 8 Dec 2020 17:15:15 -0500
|
|
Subject: [PATCH] Rabid Wolf API
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
|
index 150aa7b0876b50e2e92bab18721c548b8e6d5515..54ecf2998eb7ee711fb56e3d8ed3f49129db4147 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
|
@@ -209,6 +209,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
|
GoalKey<Phantom> ORBIT_CRYSTAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal"));
|
|
GoalKey<Drowned> DROWNED_ATTACK_VILLAGER = GoalKey.of(Drowned.class, NamespacedKey.minecraft("drowned_attack_villager"));
|
|
GoalKey<Zombie> ZOMBIE_ATTACK_VILLAGER = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_villager"));
|
|
+ GoalKey<Wolf> AVOID_RABID_WOLF = GoalKey.of(Wolf.class, NamespacedKey.minecraft("avoid_rabid_wolf"));
|
|
// Purpur end
|
|
|
|
/**
|
|
diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java
|
|
index 84db38388bf7a58e66d6cd29620b4fe64b0a897e..82ebd99549ce9f9e6427a50cef424e9007735708 100644
|
|
--- a/src/main/java/org/bukkit/entity/Wolf.java
|
|
+++ b/src/main/java/org/bukkit/entity/Wolf.java
|
|
@@ -69,4 +69,20 @@ public interface Wolf extends Tameable, Sittable, io.papermc.paper.entity.Collar
|
|
* @param interested Whether the wolf is interested
|
|
*/
|
|
public void setInterested(boolean interested);
|
|
+
|
|
+ // Purpur start
|
|
+ /**
|
|
+ * Checks if this wolf is rabid
|
|
+ *
|
|
+ * @return whether the wolf is rabid
|
|
+ */
|
|
+ public boolean isRabid();
|
|
+
|
|
+ /**
|
|
+ * Sets this wolf to be rabid or not
|
|
+ *
|
|
+ * @param rabid whether the wolf should be rabid
|
|
+ */
|
|
+ public void setRabid(boolean rabid);
|
|
+ // Purpur end
|
|
}
|