35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
|
From 0a28244be139c7dcf293c1b611f8916d99b90595 Mon Sep 17 00:00:00 2001
|
||
|
From: Alfie Cleveland <alfeh@me.com>
|
||
|
Date: Mon, 9 Jul 2018 01:35:54 -0500
|
||
|
Subject: [PATCH] PotionEffect fixes
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
index 6766d666..c30ffec6 100644
|
||
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
@@ -1058,12 +1058,18 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||
|
|
||
|
protected void a(MobEffect mobeffect, boolean flag) {
|
||
|
super.a(mobeffect, flag);
|
||
|
- this.playerConnection.sendPacket(new PacketPlayOutEntityEffect(this.getId(), mobeffect));
|
||
|
+
|
||
|
+ if (this.playerConnection != null) {
|
||
|
+ this.playerConnection.sendPacket(new PacketPlayOutEntityEffect(this.getId(), mobeffect));
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
protected void b(MobEffect mobeffect) {
|
||
|
super.b(mobeffect);
|
||
|
- this.playerConnection.sendPacket(new PacketPlayOutRemoveEntityEffect(this.getId(), mobeffect));
|
||
|
+
|
||
|
+ if (this.playerConnection != null) {
|
||
|
+ this.playerConnection.sendPacket(new PacketPlayOutRemoveEntityEffect(this.getId(), mobeffect));
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
public void enderTeleportTo(double d0, double d1, double d2) {
|
||
|
--
|
||
|
2.15.2 (Apple Git-101.1)
|
||
|
|