Remove extra import.

This commit is contained in:
md_5 2013-03-23 19:09:47 +11:00
parent 7ded14ad0a
commit 625b08c947

View File

@ -1,27 +1,19 @@
From fe1107743148622b05f1eb1c2a6f697f3a0261a5 Mon Sep 17 00:00:00 2001 From e730f3308cb5b9849a4833b3eda0de48f56fcc58 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 19:08:41 +1100 Date: Sat, 23 Mar 2013 19:08:41 +1100
Subject: [PATCH] Limit Custom Map Rendering Subject: [PATCH] Limit Custom Map Rendering
The default CraftBukkit render sequence for maps is ridiculously slow. By only using it when a custom renderer has been added (rarely in most cases), we can fallback to the Vanilla renderer for general usage. This leads to a much higher effiency overall, especially if no plugins are rendering such maps. The default CraftBukkit render sequence for maps is ridiculously slow. By only using it when a custom renderer has been added (rarely in most cases), we can fallback to the Vanilla renderer for general usage. This leads to a much higher effiency overall, especially if no plugins are rendering such maps.
--- ---
.../net/minecraft/server/WorldMapHumanTracker.java | 25 ++++++++++++++-------- .../net/minecraft/server/WorldMapHumanTracker.java | 24 ++++++++++++++--------
.../org/bukkit/craftbukkit/map/CraftMapView.java | 2 +- .../org/bukkit/craftbukkit/map/CraftMapView.java | 2 +-
2 files changed, 17 insertions(+), 10 deletions(-) 2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/main/java/net/minecraft/server/WorldMapHumanTracker.java b/src/main/java/net/minecraft/server/WorldMapHumanTracker.java diff --git a/src/main/java/net/minecraft/server/WorldMapHumanTracker.java b/src/main/java/net/minecraft/server/WorldMapHumanTracker.java
index bf3e6fe..c59ac18 100644 index bf3e6fe..49449c9 100644
--- a/src/main/java/net/minecraft/server/WorldMapHumanTracker.java --- a/src/main/java/net/minecraft/server/WorldMapHumanTracker.java
+++ b/src/main/java/net/minecraft/server/WorldMapHumanTracker.java +++ b/src/main/java/net/minecraft/server/WorldMapHumanTracker.java
@@ -1,6 +1,7 @@ @@ -41,23 +41,29 @@ public class WorldMapHumanTracker {
package net.minecraft.server;
import java.util.Iterator;
+import org.bukkit.map.MapCursor;
public class WorldMapHumanTracker {
@@ -41,23 +42,29 @@ public class WorldMapHumanTracker {
int i; int i;
int j; int j;
@ -47,7 +39,7 @@ index bf3e6fe..c59ac18 100644
- abyte[i * 3 + 3] = (byte) cursor.getY(); - abyte[i * 3 + 3] = (byte) cursor.getY();
+ // Spigot start + // Spigot start
+ for (Iterator iterator = ((custom) ? render.cursors.iterator() : this.worldMap.g.values().iterator()); iterator.hasNext(); ++i) { + for (Iterator iterator = ((custom) ? render.cursors.iterator() : this.worldMap.g.values().iterator()); iterator.hasNext(); ++i) {
+ org.bukkit.map.MapCursor cursor = (custom) ? (MapCursor) iterator.next() : null; + org.bukkit.map.MapCursor cursor = (custom) ? (org.bukkit.map.MapCursor) iterator.next() : null;
+ if (cursor != null && !cursor.isVisible()) continue; + if (cursor != null && !cursor.isVisible()) continue;
+ WorldMapDecoration deco = (custom) ? null : (WorldMapDecoration) iterator.next(); + WorldMapDecoration deco = (custom) ? null : (WorldMapDecoration) iterator.next();
+ +
@ -59,7 +51,7 @@ index bf3e6fe..c59ac18 100644
// CraftBukkit end // CraftBukkit end
boolean flag = !itemstack.z(); boolean flag = !itemstack.z();
@@ -92,7 +99,7 @@ public class WorldMapHumanTracker { @@ -92,7 +98,7 @@ public class WorldMapHumanTracker {
abyte1[2] = (byte) j; abyte1[2] = (byte) j;
for (int i1 = 0; i1 < abyte1.length - 3; ++i1) { for (int i1 = 0; i1 < abyte1.length - 3; ++i1) {