Configurable chance for wolves to spawn rabid

Configurable chance to spawn a wolf that is rabid.
Rabid wolves attack all players, mobs, and animals.
This commit is contained in:
Encode42
2025-01-10 00:28:49 -08:00
committed by granny
parent ce45f0538f
commit 19fb31302f
9 changed files with 77 additions and 130 deletions

View File

@@ -0,0 +1,23 @@
--- a/src/main/java/org/bukkit/entity/Wolf.java
+++ b/src/main/java/org/bukkit/entity/Wolf.java
@@ -108,4 +_,20 @@
return Registry.WOLF_VARIANT.getOrThrow(NamespacedKey.minecraft(key));
}
}
+
+ // 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
}