Don't apply potion effects on load either

This commit is contained in:
jmp
2020-12-12 03:31:45 -08:00
parent bbe5a58267
commit 5e2d6977ca

View File

@@ -19,7 +19,7 @@ index f730fa484..e3ac6ebfd 100644
if (enumhand == EnumHand.MAIN_HAND) {
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index 6c25f667e..b28f1a374 100644
index 6c25f667e..5fe2e9f4b 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -14,11 +14,42 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
@@ -129,15 +129,18 @@ index 6c25f667e..b28f1a374 100644
this.c(nbttagcompound);
}
@@ -128,6 +192,7 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
@@ -128,6 +192,10 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
if (nbttagcompound.hasKeyOfType("CollarColor", 99)) {
this.setCollarColor(EnumColor.fromColorIndex(nbttagcompound.getInt("CollarColor")));
}
+ setRabid(nbttagcompound.getBoolean("Purpur.IsRabid")); // Purpur
+ // Purpur start
+ this.isRabid = nbttagcompound.getBoolean("Purpur.IsRabid");
+ this.updatePathfinders(false);
+ // Purpur end
this.a((WorldServer) this.world, nbttagcompound);
}
@@ -172,6 +237,11 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
@@ -172,6 +240,11 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
public void tick() {
super.tick();
if (this.isAlive()) {
@@ -149,7 +152,7 @@ index 6c25f667e..b28f1a374 100644
this.bv = this.bu;
if (this.eY()) {
this.bu += (1.0F - this.bu) * 0.4F;
@@ -343,6 +413,20 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
@@ -343,6 +416,20 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
return EnumInteractionResult.SUCCESS;
}