30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
|
From 4f1f3e86720cb5cdab0838d9df83fe3586e5cf6b Mon Sep 17 00:00:00 2001
|
||
|
From: Iceee <andrew@opticgaming.tv>
|
||
|
Date: Fri, 1 May 2015 01:39:22 -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 d876a63a8..364625859 100644
|
||
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||
|
@@ -107,7 +107,14 @@ public class Explosion {
|
||
|
int k1 = MathHelper.floor(this.posY + (double) this.size + 1.0D);
|
||
|
int l1 = MathHelper.floor(this.posZ - (double) this.size - 1.0D);
|
||
|
int i2 = MathHelper.floor(this.posZ + (double) this.size + 1.0D);
|
||
|
- List list = this.world.getEntities(this.source, AxisAlignedBB.a((double) i, (double) k, (double) l1, (double) j, (double) k1, (double) i2));
|
||
|
+ // PaperSpigot start - Fix lag from explosions processing dead entities
|
||
|
+ List list = this.world.getEntities(this.source, AxisAlignedBB.a((double) i, (double) k, (double) l1, (double) j, (double) k1, (double) i2), new IEntitySelector() {
|
||
|
+ @Override
|
||
|
+ public boolean a(Entity entity) {
|
||
|
+ return !entity.dead;
|
||
|
+ }
|
||
|
+ });
|
||
|
+ // PaperSpigot end
|
||
|
Vec3D vec3d = Vec3D.a(this.posX, this.posY, this.posZ);
|
||
|
|
||
|
for (int j2 = 0; j2 < list.size(); ++j2) {
|
||
|
--
|
||
|
2.13.3
|
||
|
|