SPIGOT-1953: Don't copy NavigationListener Map on Iteration.

This commit is contained in:
md_5 2016-03-18 14:41:42 +11:00 committed by Zach Brown
parent 1bd454082e
commit 409596021c
5 changed files with 1784 additions and 1738 deletions

View File

@ -1,4 +1,4 @@
From 8c42dbc73322f86252eaede8e0263ebfb01c79bf Mon Sep 17 00:00:00 2001 From 166aa5db2d713b8877a070bf885da3f94f66cfb6 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000 Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations Subject: [PATCH] Skeleton API Implementations
@ -64,10 +64,10 @@ index dca8520..bf48e6e 100644
+ // Spigot end + // Spigot end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7f10a0f..6290da9 100644 index 27c1851..cc88297 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -562,4 +562,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -563,4 +563,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isGlowing() { public boolean isGlowing() {
return getHandle().glowing; return getHandle().glowing;
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,14 @@
From 492f8e02361c2461be3ae85cee55530e6f5da2be Mon Sep 17 00:00:00 2001 From acfe9bfa8054fcc76549ec2c963fdf7ccdfbea77 Mon Sep 17 00:00:00 2001
From: DerFlash <bte@freenet.de> From: DerFlash <bte@freenet.de>
Date: Sat, 3 Aug 2013 19:53:48 +1000 Date: Sat, 3 Aug 2013 19:53:48 +1000
Subject: [PATCH] Add Getter for Entity Invulnerability Subject: [PATCH] Add Getter for Entity Invulnerability
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 6290da9..8f65054 100644 index cc88297..0fc57de 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -566,6 +566,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -567,6 +567,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
// Spigot start // Spigot start
private final Spigot spigot = new Spigot() private final Spigot spigot = new Spigot()
{ {

View File

@ -1,4 +1,4 @@
From a1e22855914ea5e8402a720e6f895971199d756f Mon Sep 17 00:00:00 2001 From 53ee60cb03a718db23c05a44991b29186c01b0c0 Mon Sep 17 00:00:00 2001
From: Andrew Krieger <Slizyboy@hotmail.com> From: Andrew Krieger <Slizyboy@hotmail.com>
Date: Tue, 24 Dec 2013 07:55:23 -0800 Date: Tue, 24 Dec 2013 07:55:23 -0800
Subject: [PATCH] Cross World Entity Teleportation Subject: [PATCH] Cross World Entity Teleportation
@ -6,10 +6,10 @@ Subject: [PATCH] Cross World Entity Teleportation
Use Entity.teleportTo for cross-world teleportation in CraftEntity. Use Entity.teleportTo for cross-world teleportation in CraftEntity.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 8f65054..f80ac2c 100644 index 0fc57de..6f4b46f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -243,7 +243,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -244,7 +244,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
// If this entity is riding another entity, we must dismount before teleporting. // If this entity is riding another entity, we must dismount before teleporting.
entity.stopRiding(); entity.stopRiding();

View File

@ -0,0 +1,34 @@
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