From c81789f27ea5c3d6e26acfdfb1893af43a2dc890 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 10 Mar 2016 16:23:26 +1100 Subject: [PATCH] SPIGOT-1864: Improve entity collision capping --- CraftBukkit-Patches/0069-Cap-Entity-Collisions.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CraftBukkit-Patches/0069-Cap-Entity-Collisions.patch b/CraftBukkit-Patches/0069-Cap-Entity-Collisions.patch index 941dbd8175..0cf32bba04 100644 --- a/CraftBukkit-Patches/0069-Cap-Entity-Collisions.patch +++ b/CraftBukkit-Patches/0069-Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.isInteractable() && !list.isEmpty()) { // Spigot: Add isInteractable() condition - for (int i = 0; i < list.size(); ++i) { -+ numCollisions -= world.spigotConfig.maxCollisionsPerEntity; // Spigot ++ numCollisions = Math.max(0, numCollisions - world.spigotConfig.maxCollisionsPerEntity); // Spigot + for (int i = 0; i < list.size() && numCollisions < world.spigotConfig.maxCollisionsPerEntity; ++i) { Entity entity = (Entity) list.get(i); // TODO better check now?