13
0
geforkt von Mirrors/Paper
Paper/CraftBukkit-Patches/0150-Don-t-copy-NavigationListener-Map-on-Iteration.patch

35 Zeilen
1.8 KiB
Diff

From 9972735b263dcf4615b6e27f0b1ca1a18c10ad2b Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Fri, 18 Mar 2016 14:41:20 +1100
Subject: [PATCH] Don't copy NavigationListener Map on Iteration.
diff --git a/src/main/java/net/minecraft/server/NavigationListener.java b/src/main/java/net/minecraft/server/NavigationListener.java
index f82ea80..39a4032 100644
--- a/src/main/java/net/minecraft/server/NavigationListener.java
+++ b/src/main/java/net/minecraft/server/NavigationListener.java
@@ -15,12 +15,14 @@ public class NavigationListener implements IWorldAccess {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, int i) {
if (this.a(world, blockposition, iblockdata, iblockdata1)) {
- NavigationAbstract[] anavigationabstract = (NavigationAbstract[]) this.b.keySet().toArray(new NavigationAbstract[0]);
- NavigationAbstract[] anavigationabstract1 = anavigationabstract;
- int j = anavigationabstract.length;
-
- for (int k = 0; k < j; ++k) {
- NavigationAbstract navigationabstract = anavigationabstract1[k];
+ // Spigot start
+ // NavigationAbstract[] anavigationabstract = (NavigationAbstract[]) this.b.keySet().toArray(new NavigationAbstract[0]);
+ // NavigationAbstract[] anavigationabstract1 = anavigationabstract;
+ // int j = anavigationabstract.length;
+
+ for (NavigationAbstract navigationabstract : this.b.keySet()) {
+ // NavigationAbstract navigationabstract = anavigationabstract1[k];
+ // Spigot end
if (navigationabstract != null && !navigationabstract.i()) {
PathEntity pathentity = navigationabstract.k();
--
2.5.0