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,18 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
@@ -146,4 +_,15 @@
return this.getKey().hashCode();
}
}
+ // Purpur start - Configurable chance for wolves to spawn rabid
+ @Override
+ public boolean isRabid() {
+ return getHandle().isRabid();
+ }
+
+ @Override
+ public void setRabid(boolean isRabid) {
+ getHandle().setRabid(isRabid);
+ }
+ // Purpur end - Configurable chance for wolves to spawn rabid
}