mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
20 lines
1.4 KiB
Diff
20 lines
1.4 KiB
Diff
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/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
index 9ef8b671d5f969c71ac00ec1b49874ac05ca84ac..67685dfa8eb4a74e70ef982291a55d145d6abc66 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()) {
|