Paper/patches/server/0043-Fix-lag-from-explosions-processing-dead-entities.patch

20 lines
1.3 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Wed, 2 Mar 2016 01:39:52 -0600
Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 93c6d28df13077a2759fecf31d7dba5db10e11f9..598050c77c5a875d3fa27271debd916ab8b5259f 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
2024-04-24 01:30:03 +02:00
@@ -226,7 +226,7 @@ public class Explosion {
2021-06-11 14:02:28 +02:00
int i1 = Mth.floor(this.y + (double) f2 + 1.0D);
int j1 = Mth.floor(this.z - (double) f2 - 1.0D);
int k1 = Mth.floor(this.z + (double) f2 + 1.0D);
- List<Entity> list = this.level.getEntities(this.source, new AABB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1));
+ List<Entity> list = this.level.getEntities(this.source, new AABB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), (com.google.common.base.Predicate<Entity>) entity -> entity.isAlive() && !entity.isSpectator()); // Paper - Fix lag from explosions processing dead entities
Vec3 vec3d = new Vec3(this.x, this.y, this.z);
2023-09-21 21:54:46 +02:00
Iterator iterator = list.iterator();
2021-06-11 14:02:28 +02:00