From a34f61611bbf0a64750772df5c04060ef578c580 Mon Sep 17 00:00:00 2001 From: Iceee Date: Mon, 1 Jun 2015 22:56:10 -0700 Subject: [PATCH] Fix lag from explosions processing dead entities --- ...-explosions-processing-dead-entities.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Spigot-Server-Patches/0053-Fix-lag-from-explosions-processing-dead-entities.patch diff --git a/Spigot-Server-Patches/0053-Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/0053-Fix-lag-from-explosions-processing-dead-entities.patch new file mode 100644 index 000000000..76473777f --- /dev/null +++ b/Spigot-Server-Patches/0053-Fix-lag-from-explosions-processing-dead-entities.patch @@ -0,0 +1,29 @@ +From 68d1459d3bcdf6511939362dc87a94af899af2ea Mon Sep 17 00:00:00 2001 +From: Iceee +Date: Mon, 1 Jun 2015 22:54:18 -0700 +Subject: [PATCH] Fix lag from explosions processing dead entities + + +diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java +index 3720006..fdf886a 100644 +--- a/src/main/java/net/minecraft/server/Explosion.java ++++ b/src/main/java/net/minecraft/server/Explosion.java +@@ -103,7 +103,14 @@ public class Explosion { + int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D); + int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D); + int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D); +- List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); ++ // PaperSpigot start - Fix lag from explosions processing dead entities ++ List list = this.world.a(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { ++ @Override ++ public boolean apply(Entity entity) { ++ return IEntitySelector.d.apply(entity) && !entity.dead; ++ } ++ }); ++ // PaperSpigot end + Vec3D vec3d = new Vec3D(this.posX, this.posY, this.posZ); + + for (int l1 = 0; l1 < list.size(); ++l1) { +-- +1.9.5.msysgit.1 +