PaperMC/Spigot-Server-Patches/0354-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch

25 lines
1 KiB
Diff
Raw Normal View History

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/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
index 6955fe7f7728987553d2a86fe3966deb5eea077d..35fb12c23bf46d3211ae5756fd604196bdc16da5 100644
--- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
+++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
@@ -176,6 +176,12 @@ public class EntityAreaEffectCloud extends Entity {
super.tick();
2020-06-25 16:09:55 +02:00
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();