aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0383-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch
blob: affb67bc230f4be850eaf85db12f21d048525854 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 14567b0450b943b00f8a36375b813f5efd73f4d8 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sun, 2 Jun 2019 21:12:42 -0500
Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative


diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
index ec579e7f1..9e5da2a0f 100644
--- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
+++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
@@ -174,6 +174,12 @@ public class EntityAreaEffectCloud extends Entity {
         super.B_();
         boolean flag = this.q();
         float f = this.getRadius();
+        // Paper start - fix MC-114618
+        if (f < 0.5F) {
+            this.die();
+            return;
+        }
+        // Paper end
 
         if (this.world.isClientSide) {
             EnumParticle enumparticle = this.getParticle();
@@ -253,10 +259,12 @@ public class EntityAreaEffectCloud extends Entity {
 
             if (this.radiusPerTick != 0.0F) {
                 f += this.radiusPerTick;
-                if (f < 0.5F) {
-                    this.die();
-                    return;
-                }
+                // Paper start - moved up - fix MC-114618
+                //if (f < 0.5F) {
+                //    this.die();
+                //    return;
+                //}
+                // Paper end
 
                 this.setRadius(f);
             }
-- 
2.21.0