aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/unapplied/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/unapplied/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch')
-rw-r--r--patches/unapplied/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/unapplied/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/unapplied/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch
new file mode 100644
index 0000000000..9dc78a5f91
--- /dev/null
+++ b/patches/unapplied/server/0042-Fix-lag-from-explosions-processing-dead-entities.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Iceee <[email protected]>
+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/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
+index 1df33018470136344d8843e5e429aa7f9b40b750..0eb25fabfff0e8a050c6dfb8cd24e703f679db76 100644
+--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
++++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
+@@ -185,7 +185,7 @@ public class ServerExplosion implements Explosion {
+ int l = Mth.floor(this.center.y + (double) f + 1.0D);
+ int i1 = Mth.floor(this.center.z - (double) f - 1.0D);
+ int j1 = Mth.floor(this.center.z + (double) f + 1.0D);
+- List<Entity> list = this.level.getEntities(this.source, new AABB((double) i, (double) k, (double) i1, (double) j, (double) l, (double) j1));
++ List<Entity> list = this.level.getEntities(this.source, new AABB((double) i, (double) k, (double) i1, (double) j, (double) l, (double) j1), (com.google.common.base.Predicate<Entity>) entity -> entity.isAlive() && !entity.isSpectator()); // Paper - Fix lag from explosions processing dead entities
+ Iterator iterator = list.iterator();
+
+ while (iterator.hasNext()) {