mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
save stuff here
This commit is contained in:
@@ -7,7 +7,7 @@ Configurable chance to spawn a wolf that is rabid.
|
||||
Rabid wolves attack all players, mobs, and animals.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index 3cd49c57d6dc4b0db31c3ac40447c89ce7e193d7..d8acf9fde413d2661cb14ff4d198f6e138a1e549 100644
|
||||
index 074f1860e755348a5a3a8e9df383896656cee9af..563347f7b683d796f7d3575206d40656247a897c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
@@ -94,7 +94,7 @@ index 3cd49c57d6dc4b0db31c3ac40447c89ce7e193d7..d8acf9fde413d2661cb14ff4d198f6e1
|
||||
private static final float TAME_HEALTH = 20.0F;
|
||||
private float interestedAngle;
|
||||
@@ -134,6 +172,37 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
return this.level.purpurConfig.wolfBreedingTicks;
|
||||
return this.level().purpurConfig.wolfBreedingTicks;
|
||||
}
|
||||
|
||||
+ public boolean isRabid() {
|
||||
@@ -184,7 +184,7 @@ index 3cd49c57d6dc4b0db31c3ac40447c89ce7e193d7..d8acf9fde413d2661cb14ff4d198f6e1
|
||||
this.level().broadcastEntityEvent(this, (byte) 6);
|
||||
}
|
||||
+ // Purpur start
|
||||
+ else if (this.level.purpurConfig.wolfMilkCuresRabies && itemstack.getItem() == Items.MILK_BUCKET && this.isRabid()) {
|
||||
+ else if (this.level().purpurConfig.wolfMilkCuresRabies && itemstack.getItem() == Items.MILK_BUCKET && this.isRabid()) {
|
||||
+ if (!player.isCreative()) {
|
||||
+ player.setItemInHand(hand, new ItemStack(Items.BUCKET));
|
||||
+ }
|
||||
@@ -222,19 +222,19 @@ index e43fd3e59fd8c74828ae65965fade27f56beef65..b2f133c8baabba1cffa6e92ea0f85453
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 75a55280a0f57ef3586f3c32d5b37de504ee1fcc..15a8ec2ee6677d6dd5b0fd60ae1d02c7c6c21548 100644
|
||||
index b29c4380dc2bc7c0aab0e47b5714f14883e7a919..f9a21e10b3d9faf9d7890ea3ca1c7fd3e1ccc03c 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1479,6 +1479,8 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
@@ -1929,6 +1929,8 @@ public class PurpurWorldConfig {
|
||||
public boolean wolfRidableInWater = true;
|
||||
public boolean wolfControllable = true;
|
||||
public double wolfMaxHealth = 8.0D;
|
||||
+ public boolean wolfMilkCuresRabies = true;
|
||||
+ public double wolfNaturalRabid = 0.0D;
|
||||
public int wolfBreedingTicks = 6000;
|
||||
private void wolfSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
@@ -1487,6 +1489,8 @@ public class PurpurWorldConfig {
|
||||
wolfRidable = getBoolean("mobs.wolf.ridable", wolfRidable);
|
||||
@@ -1940,6 +1942,8 @@ public class PurpurWorldConfig {
|
||||
set("mobs.wolf.attributes.max_health", oldValue);
|
||||
}
|
||||
wolfMaxHealth = getDouble("mobs.wolf.attributes.max_health", wolfMaxHealth);
|
||||
|
||||
Reference in New Issue
Block a user