PaperMC/Spigot-Server-Patches-Unmapped/0354-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch
2021-04-25 18:37:43 -05:00

24 lines
1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Mon, 27 May 2019 17:35:39 -0500
Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative
size
diff --git a/src/main/java/net/minecraft/world/entity/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/world/entity/EntityAreaEffectCloud.java
index 47099ecd70e5077cad8372446d54e28398785bec..679dfe75ea68e38679cd7d6348d0e24ca61911e4 100644
--- a/src/main/java/net/minecraft/world/entity/EntityAreaEffectCloud.java
+++ b/src/main/java/net/minecraft/world/entity/EntityAreaEffectCloud.java
@@ -196,6 +196,12 @@ public class EntityAreaEffectCloud extends Entity {
super.tick();
boolean flag = this.k();
float f = this.getRadius();
+ // Paper start - fix MC-114618
+ if (f < 0.0F) {
+ this.die();
+ return;
+ }
+ // Paper end
if (this.world.isClientSide) {
ParticleParam particleparam = this.getParticle();