2018-07-19 06:42:43 +02:00
From 9b56f5d637b6d50dc41d75c71e609141ae9174a7 Mon Sep 17 00:00:00 2001
2015-06-02 07:56:10 +02:00
From: Iceee <andrew@opticgaming.tv>
2016-03-01 00:09:49 +01:00
Date: Wed, 2 Mar 2016 01:39:52 -0600
2015-06-02 07:56:10 +02:00
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
2018-07-19 06:42:43 +02:00
index 37e6e5922..6b9f6c956 100644
2015-06-02 07:56:10 +02:00
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
2018-07-15 03:53:17 +02:00
@@ -110,7 +110,14 @@ public class Explosion {
2015-06-02 07:56:10 +02:00
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));
2016-03-01 00:09:49 +01:00
+ // Paper start - Fix lag from explosions processing dead entities
2016-05-12 04:07:46 +02:00
+ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate<Entity>() {
2015-06-02 07:56:10 +02:00
+ @Override
+ public boolean apply(Entity entity) {
2018-07-19 06:42:43 +02:00
+ return IEntitySelector.d.test(entity) && !entity.dead;
2015-06-02 07:56:10 +02:00
+ }
+ });
2016-03-01 00:09:49 +01:00
+ // Paper end
2015-06-02 07:56:10 +02:00
Vec3D vec3d = new Vec3D(this.posX, this.posY, this.posZ);
for (int l1 = 0; l1 < list.size(); ++l1) {
--
2018-07-04 09:55:24 +02:00
2.18.0
2015-06-02 07:56:10 +02:00