Update to latest CB upstream.

This commit is contained in:
md_5 2013-03-25 18:57:00 +11:00
parent a0b8081a31
commit dda49a9d05
32 changed files with 135 additions and 254 deletions

View file

@ -1,4 +1,4 @@
From 51d316b1bc0e028efaa8c209d72fb3129c3c232e Mon Sep 17 00:00:00 2001
From f06fbf4660299434b863b47b71e37666062b312b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 17:57:27 +1100
Subject: [PATCH] Spigot Changes
@ -19,7 +19,7 @@ The set of changes which provide core Spigot functionality, which would otherwis
.../java/net/minecraft/server/ChunkSection.java | 31 ++++--
src/main/java/net/minecraft/server/EntityItem.java | 3 +-
.../java/net/minecraft/server/EntitySquid.java | 4 -
.../net/minecraft/server/PlayerConnection.java | 18 +++-
.../net/minecraft/server/PlayerConnection.java | 19 +++-
src/main/java/net/minecraft/server/PlayerList.java | 10 +-
.../net/minecraft/server/ThreadLoginVerifier.java | 21 ++++
src/main/java/net/minecraft/server/World.java | 111 +++++++++++++++++----
@ -29,7 +29,7 @@ The set of changes which provide core Spigot functionality, which would otherwis
src/main/java/org/bukkit/craftbukkit/Spigot.java | 20 ++++
.../craftbukkit/chunkio/ChunkIOProvider.java | 2 +-
src/main/resources/configurations/bukkit.yml | 26 +++++
24 files changed, 389 insertions(+), 78 deletions(-)
24 files changed, 390 insertions(+), 78 deletions(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java
diff --git a/.gitignore b/.gitignore
@ -145,10 +145,10 @@ index 8657860..50c5200 100644
world.setData(i, j, k, 0, 4);
} else {
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
index 56938cd..e65ad62 100644
index 3b00939..4ab0fb9 100644
--- a/src/main/java/net/minecraft/server/BlockSapling.java
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
@@ -25,7 +25,7 @@ public class BlockSapling extends BlockFlower {
@@ -26,7 +26,7 @@ public class BlockSapling extends BlockFlower {
public void a(World world, int i, int j, int k, Random random) {
if (!world.isStatic) {
super.a(world, i, j, k, random);
@ -171,7 +171,7 @@ index 8339a35..c17ce36 100644
if (l < 7) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 8f37333..c1f5cc2 100644
index cc30a04..b9704bd 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -13,8 +13,7 @@ import java.util.Set;
@ -267,7 +267,7 @@ index 8f37333..c1f5cc2 100644
if (pendingchunktosave != null) {
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 90e0636..051cf6d 100644
index 38f3038..03d511f 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -219,7 +219,7 @@ public class ChunkSection {
@ -345,7 +345,7 @@ index ee775bf..aa8d83f 100644
if (!this.world.isStatic && this.age >= 6000) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index 58a8110..c000125 100644
index be8a5ed..0c0157f 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -63,10 +63,6 @@ public class EntitySquid extends EntityWaterAnimal {
@ -360,10 +360,10 @@ index 58a8110..c000125 100644
super.c();
this.e = this.d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 13c2705..9ea4ee6 100644
index c81793a..133c310 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -839,8 +839,19 @@ public class PlayerConnection extends Connection {
@@ -840,8 +840,20 @@ public class PlayerConnection extends Connection {
this.chat(s, packet3chat.a_());
@ -381,10 +381,11 @@ index 13c2705..9ea4ee6 100644
- if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam
+ if (isCounted && chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam
+ // Spigot end
// CraftBukkit start
+ // CraftBukkit start
if (packet3chat.a_()) {
Waitable waitable = new Waitable() {
@@ -963,7 +974,7 @@ public class PlayerConnection extends Connection {
@Override
@@ -962,7 +974,7 @@ public class PlayerConnection extends Connection {
}
try {
@ -393,7 +394,7 @@ index 13c2705..9ea4ee6 100644
if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) {
return;
}
@@ -1346,8 +1357,9 @@ public class PlayerConnection extends Connection {
@@ -1345,8 +1357,9 @@ public class PlayerConnection extends Connection {
flag = false;
} else {
for (i = 0; i < packet130updatesign.lines[j].length(); ++i) {
@ -405,10 +406,10 @@ index 13c2705..9ea4ee6 100644
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6efb5b6..79c52f6 100644
index 464b250..28798af 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -304,7 +304,7 @@ public abstract class PlayerList {
@@ -303,7 +303,7 @@ public abstract class PlayerList {
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s1);
} else if (!this.isWhitelisted(s)) {
@ -417,7 +418,7 @@ index 6efb5b6..79c52f6 100644
} else {
String s2 = socketaddress.toString();
@@ -1045,7 +1045,13 @@ public abstract class PlayerList {
@@ -1044,7 +1044,13 @@ public abstract class PlayerList {
public void r() {
while (!this.players.isEmpty()) {
@ -465,7 +466,7 @@ index 0686ba0..c185f64 100644
URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b694789..2f8e066 100644
index 9698185..cddc890 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -67,14 +67,27 @@ public abstract class World implements IBlockAccess {
@ -620,7 +621,7 @@ index b694789..2f8e066 100644
-
- for (int l = -b0; l <= b0; ++l) {
- for (int i1 = -b0; i1 <= b0; ++i1) {
- // CraftBukkit start - don't tick chunks queued for unload
- // CraftBukkit start - Don't tick chunks queued for unload
- ChunkProviderServer chunkProviderServer = ((WorldServer) entityhuman.world).chunkProviderServer;
- if (chunkProviderServer.unloadQueue.contains(l + j, i1 + k)) {
- continue;
@ -660,7 +661,7 @@ index b694789..2f8e066 100644
entityhuman = (EntityHuman) this.players.get(i);
j = MathHelper.floor(entityhuman.locX) + this.random.nextInt(11) - 5;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ce54462..b7dfe40 100644
index a49419e..39505b2 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@
@ -733,7 +734,7 @@ index ce54462..b7dfe40 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6b3b9fe..872c4ac 100644
index 7b9c787..8e02225 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -146,7 +146,7 @@ public final class CraftServer implements Server {
@ -860,7 +861,7 @@ index 6b3b9fe..872c4ac 100644
player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command");
getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index adb2bba..150d581 100644
index b5a68af..9da842e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -77,7 +77,76 @@ public class CraftWorld implements World {
@ -968,7 +969,7 @@ index 0000000..4a4f949
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 48cf5ba..1d4764c 100644
index c896ba2..e99cb22 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -40,7 +40,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu

View file

@ -1,4 +1,4 @@
From 647c2af3d1c4528da8d3a3fcff68233cb3c47d5d Mon Sep 17 00:00:00 2001
From 530ba24d7d28e5ade3013e820d19914d4bb89510 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:52:41 +1100
Subject: [PATCH] View Distance
@ -12,10 +12,10 @@ This commit allows the user to select per world view distances, and view distanc
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index f788a62..98d6dd2 100644
index 0dfd190..c543bed 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -23,7 +23,7 @@ public class PlayerChunkMap {
@@ -22,7 +22,7 @@ public class PlayerChunkMap {
public PlayerChunkMap(WorldServer worldserver, int i) {
if (i > 15) {
throw new IllegalArgumentException("Too big view radius!");
@ -25,7 +25,7 @@ index f788a62..98d6dd2 100644
} else {
this.e = i;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b7dfe40..8706874 100644
index 39505b2..5a49b4d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -51,7 +51,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
@ -38,7 +38,7 @@ index b7dfe40..8706874 100644
this.entitiesById = new IntHashMap();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1153eea..a924438 100644
index f5e63f8..7c48dad 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -120,6 +120,9 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From ed50f7edd8769c0e6200638a0ea5bc199d8226a5 Mon Sep 17 00:00:00 2001
From e23a9931b30736363eca493eee4d6ea14dc7c0d5 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Sun, 23 Dec 2012 14:46:23 -0600
Subject: [PATCH] Implement 'lightening' of NibbleArrays - only allocate
@ -17,7 +17,7 @@ Fix nibble handling with NBT - arrays aren't copied by NBTByteArray
5 files changed, 197 insertions(+), 31 deletions(-)
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index c1f5cc2..bf6a9ae 100644
index b9704bd..7a98822 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -225,15 +225,15 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
@ -42,7 +42,7 @@ index c1f5cc2..bf6a9ae 100644
nbttaglist.add(nbttagcompound1);
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 051cf6d..42e669c 100644
index 03d511f..623399f 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -134,7 +134,8 @@ public class ChunkSection {
@ -70,7 +70,7 @@ index 051cf6d..42e669c 100644
this.tickingBlockCount = cntTicking;
@@ -225,12 +232,11 @@ public class ChunkSection {
public void a(NibbleArray nibblearray) {
// CraftBukkit start - don't hang on to an empty nibble array
// CraftBukkit start - Don't hang on to an empty nibble array
boolean empty = true;
- for (int i = 0; i < nibblearray.a.length; i++) {
- if (nibblearray.a[i] != 0) {
@ -313,7 +313,7 @@ index 14a6245..ee179be 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index c3b9113..e34e781 100644
index 79c3893..97b7b5b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -174,7 +174,18 @@ public class CraftChunk implements Chunk {

View file

@ -1,4 +1,4 @@
From 673562df1386db956378bc516a9b3e605ce410b0 Mon Sep 17 00:00:00 2001
From 94c486ec7cf0a346dbbfed0ab814bf73565d64d1 Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com>
Date: Fri, 18 Jan 2013 16:20:01 +0500
Subject: [PATCH] Optimize packet used to unload chunks for the client
@ -39,10 +39,10 @@ index ee179be..b51d90c 100644
this.lowPriority = true;
this.a = chunk.x;
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 5350644..185a609 100644
index 10a43b6..20f8e8a 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -51,7 +51,7 @@ class PlayerChunk {
@@ -52,7 +52,7 @@ class PlayerChunk {
public void b(EntityPlayer entityplayer) {
if (this.b.contains(entityplayer)) {

View file

@ -1,4 +1,4 @@
From 65c1f24a4c7d40f412f65fcbe558f66c9b1a14bd Mon Sep 17 00:00:00 2001
From 5cb573034b09dce4961f303547125845ce7f840d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 12:28:17 +1100
Subject: [PATCH] Tick loop optimization - sleep for as long as possible.
@ -11,10 +11,10 @@ Subject: [PATCH] Tick loop optimization - sleep for as long as possible.
create mode 100644 src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5c535cc..43b5d96 100644
index 5bf5fdc..9930618 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -85,6 +85,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -83,6 +83,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
// CraftBukkit end
@ -27,7 +27,7 @@ index 5c535cc..43b5d96 100644
public MinecraftServer(OptionSet options) { // CraftBukkit - signature file -> OptionSet
k = this;
@@ -379,39 +385,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -377,39 +383,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
public void run() {
try {
if (this.init()) {

View file

@ -1,4 +1,4 @@
From 975bd5c6ca17b8323adefe96e8ac767b63e150c0 Mon Sep 17 00:00:00 2001
From 30d1e78cd481297d45e30e4ca6d772b08aaf44e3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Improved Timings System
@ -19,10 +19,10 @@ Tracks nearly every point of minecraft internals and plugin events to give a goo
create mode 100644 src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index d5887a9..3772ad8 100644
index 8b280ab..31e3fce 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -103,6 +103,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -102,6 +102,7 @@ public class ChunkProviderServer implements IChunkProvider {
// CraftBukkit end
if (chunk == null) {
@ -30,7 +30,7 @@ index d5887a9..3772ad8 100644
chunk = this.loadChunk(i, j);
if (chunk == null) {
if (this.chunkProvider == null) {
@@ -141,6 +142,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -140,6 +141,7 @@ public class ChunkProviderServer implements IChunkProvider {
// CraftBukkit end
chunk.a(this, this, i, j);
@ -39,7 +39,7 @@ index d5887a9..3772ad8 100644
// CraftBukkit start - If we didn't need to load the chunk run the callback now
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fabe3ab..ccc4858 100644
index 8e743ec..8feb1d3 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -14,6 +14,7 @@ import org.bukkit.block.BlockFace;
@ -76,7 +76,7 @@ index fabe3ab..ccc4858 100644
protected void C() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 15fbf69..350560e 100644
index 9210d96..14854ac 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -513,6 +513,7 @@ public abstract class EntityLiving extends Entity {
@ -104,8 +104,8 @@ index 15fbf69..350560e 100644
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
}
// CraftBukkit start - delegate so we can handle providing a reason for health being regained
@@ -1265,6 +1269,7 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit start - Delegate so we can handle providing a reason for health being regained
@@ -1267,6 +1271,7 @@ public abstract class EntityLiving extends Entity {
}
public void c() {
@ -113,7 +113,7 @@ index 15fbf69..350560e 100644
if (this.bX > 0) {
--this.bX;
}
@@ -1316,6 +1321,7 @@ public abstract class EntityLiving extends Entity {
@@ -1318,6 +1323,7 @@ public abstract class EntityLiving extends Entity {
this.aA = this.yaw;
}
}
@ -121,7 +121,7 @@ index 15fbf69..350560e 100644
this.world.methodProfiler.b();
this.world.methodProfiler.a("jump");
@@ -1334,6 +1340,7 @@ public abstract class EntityLiving extends Entity {
@@ -1336,6 +1342,7 @@ public abstract class EntityLiving extends Entity {
this.world.methodProfiler.b();
this.world.methodProfiler.a("travel");
@ -129,7 +129,7 @@ index 15fbf69..350560e 100644
this.bD *= 0.98F;
this.bE *= 0.98F;
this.bF *= 0.9F;
@@ -1342,11 +1349,14 @@ public abstract class EntityLiving extends Entity {
@@ -1344,11 +1351,14 @@ public abstract class EntityLiving extends Entity {
this.aO *= this.bE();
this.e(this.bD, this.bE);
this.aO = f;
@ -145,7 +145,7 @@ index 15fbf69..350560e 100644
this.world.methodProfiler.b();
this.world.methodProfiler.a("looting");
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 43b5d96..28135f4 100644
index 9930618..4010cbf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -6,7 +6,6 @@ import java.security.KeyPair;
@ -156,7 +156,7 @@ index 43b5d96..28135f4 100644
import java.util.List;
import java.util.concurrent.Callable;
import java.util.logging.Level;
@@ -21,6 +20,7 @@ import jline.console.ConsoleReader;
@@ -19,6 +18,7 @@ import jline.console.ConsoleReader;
import joptsimple.OptionSet;
import org.bukkit.World.Environment;
@ -164,7 +164,7 @@ index 43b5d96..28135f4 100644
import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.server.RemoteServerCommandEvent;
import org.bukkit.event.world.WorldSaveEvent;
@@ -399,7 +399,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -397,7 +397,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
lastTick = curTime;
MinecraftServer.currentTick++;
@ -175,15 +175,15 @@ index 43b5d96..28135f4 100644
}
// Spigot end
} else {
@@ -499,6 +502,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -496,6 +499,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
public void r() {
this.methodProfiler.a("levels");
// CraftBukkit start - only send timeupdates to the people in that world
+ SpigotTimings.schedulerTimer.startTiming(); // Spigot
// CraftBukkit start
this.server.getScheduler().mainThreadHeartbeat(this.ticks);
// Run tasks that are waiting on processing
@@ -506,7 +510,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -504,7 +508,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
processQueue.remove().run();
}
@ -192,9 +192,9 @@ index 43b5d96..28135f4 100644
org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.tick();
+ SpigotTimings.chunkIOTickTimer.stopTiming(); // Spigot
// Send timeupdates to everyone, it will get the right time from the world the player is in.
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
@@ -558,7 +565,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -556,7 +563,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.methodProfiler.b();
this.methodProfiler.a("tracker");
@ -204,7 +204,7 @@ index 43b5d96..28135f4 100644
this.methodProfiler.b();
this.methodProfiler.b();
// } // CraftBukkit
@@ -567,14 +576,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -565,14 +574,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
this.methodProfiler.c("connection");
@ -226,7 +226,7 @@ index 43b5d96..28135f4 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9ea4ee6..60114e6 100644
index 133c310..a2d95e3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -963,6 +963,7 @@ public class PlayerConnection extends Connection {
@ -253,7 +253,7 @@ index 9ea4ee6..60114e6 100644
}
} catch (org.bukkit.command.CommandException ex) {
player.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command");
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
return;
}
@ -279,7 +279,7 @@ index db3fc42..174546d 100644
private static Map b = new HashMap();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e79e82a..6cd8a99 100644
index 307171b..0afe88d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -13,6 +13,7 @@ import java.util.concurrent.Callable;
@ -381,7 +381,7 @@ index e79e82a..6cd8a99 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8706874..8d2c73e 100644
index 5a49b4d..e41dfba 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -169,9 +169,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate

View file

@ -1,4 +1,4 @@
From e8ef7bc28ce65332a531646edaee333ae217a2f5 Mon Sep 17 00:00:00 2001
From 2f62fafb59381927864261a0c2b4cb4062cbddac Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 10:58:17 +1100
Subject: [PATCH] Add oreobfuscator for Spigot.
@ -18,7 +18,7 @@ Subject: [PATCH] Add oreobfuscator for Spigot.
create mode 100644 src/main/java/org/spigotmc/OrebfuscatorManager.java
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 96120d8..0e35c7e 100644
index 17d837d..ecc52b9 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -94,6 +94,7 @@ public class EntityFallingBlock extends Entity {
@ -30,7 +30,7 @@ index 96120d8..0e35c7e 100644
if (this.onGround) {
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 50646ce..c7405a7 100644
index b43953a..b907562 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -240,6 +240,7 @@ public class Explosion {
@ -54,7 +54,7 @@ index b51d90c..9c21129 100644
try {
this.inflatedBuffer = chunkmap.a;
diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
index 867ebd3..df63cf7 100644
index 129dc4f..9f8afe3 100644
--- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
+++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
@@ -28,6 +28,7 @@ public class Packet56MapChunkBulk extends Packet {
@ -107,10 +107,10 @@ index 867ebd3..df63cf7 100644
deflater.reset();
deflater.setInput(this.buildBuffer);
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 92e68be..2e19142 100644
index 91bed16..8af36ca 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -291,6 +291,11 @@ public class PlayerInteractManager {
@@ -285,6 +285,11 @@ public class PlayerInteractManager {
}
return false;
}
@ -123,7 +123,7 @@ index 92e68be..2e19142 100644
if (false) { // Never trigger
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 872c4ac..255de03 100644
index 8e02225..6e69856 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -163,6 +163,13 @@ public final class CraftServer implements Server {
@ -141,7 +141,7 @@ index 872c4ac..255de03 100644
private boolean value = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a924438..0d724cd 100644
index 7c48dad..d30219d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -123,6 +123,8 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From 54317fee9adac9c0c59edd7d8c1aaeaa91b3f77b Mon Sep 17 00:00:00 2001
From e340336a4447585d29f26ed58e406e016722f471 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Jan 2013 19:31:14 -0500
Subject: [PATCH] Reduce number of LivingEntity collision checks.
@ -8,10 +8,10 @@ Subject: [PATCH] Reduce number of LivingEntity collision checks.
1 file changed, 8 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 350560e..84a2926 100644
index 14854ac..322e37f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1428,12 +1428,20 @@ public abstract class EntityLiving extends Entity {
@@ -1430,12 +1430,20 @@ public abstract class EntityLiving extends Entity {
}
protected void bg() {

View file

@ -1,4 +1,4 @@
From 29e7a6b4fcb63e03681589270efac8a5beb2c0e8 Mon Sep 17 00:00:00 2001
From ba11a4120dd1864ccfd199f4c0e2d8a4cb5d3cc4 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 09:20:19 +1100
Subject: [PATCH] Detect, remove and warn about null tile entities.
@ -8,7 +8,7 @@ Subject: [PATCH] Detect, remove and warn about null tile entities.
1 file changed, 7 insertions(+)
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 6cd8a99..522320a 100644
index 0afe88d..c390e65 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1334,6 +1334,13 @@ public abstract class World implements IBlockAccess {
@ -22,7 +22,7 @@ index 6cd8a99..522320a 100644
+ continue;
+ }
+ // Spigot end
// CraftBukkit start - don't tick entities in chunks queued for unload
// CraftBukkit start - Don't tick entities in chunks queued for unload
ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer;
if (chunkProviderServer.unloadQueue.contains(tileentity.x >> 4, tileentity.z >> 4)) {
--

View file

@ -1,89 +0,0 @@
From 0de6bba3142ff26e1570ef9e0e08e89edfef21c5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Feb 2013 17:26:20 -0500
Subject: [PATCH] Only send maps in item frames upon tracking
Maps in item frames are full of bugs.
1) It sends an update of the Maps data to ALL players in the world, not just the players tracking it.
2) It sends an update EVERY tick, not every 10 ticks as intended.
To optimize performance of maps in item frames, we will only send it once a player tracks the ItemFrame until it completes, then that player will not receive more updates.
This means cursors will not dynamically update, but the map data should refresh every time the player moves away then back.
---
.../net/minecraft/server/EntityTrackerEntry.java | 25 ++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index 9c014ca..dd569f4 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -36,6 +36,7 @@ public class EntityTrackerEntry {
public boolean n = false;
public Set trackedPlayers = new HashSet();
+ public List<EntityPlayer> playersToUpdate = new java.util.ArrayList<EntityPlayer>(); // Spigot
public EntityTrackerEntry(Entity entity, int i, int j, boolean flag) {
this.tracker = entity;
this.b = i;
@@ -73,17 +74,17 @@ public class EntityTrackerEntry {
this.broadcast(new Packet39AttachEntity(this.tracker, this.tracker.vehicle));
}
- if (this.tracker instanceof EntityItemFrame && this.m % 10 == 0) {
+ if (this.tracker instanceof EntityItemFrame) { // Spigot - has to be ran every tick for general frames or they may pop off?
EntityItemFrame i4 = (EntityItemFrame) this.tracker;
ItemStack i5 = i4.i();
- if (i5 != null && i5.getItem() instanceof ItemWorldMap) {
+ if (this.m++ % 10 == 0 && i5 != null && i5.getItem() instanceof ItemWorldMap && playersToUpdate.size() > 0) { // Spigot
WorldMap i7 = Item.MAP.getSavedMap(i5, this.tracker.world);
- Iterator j0 = list.iterator();
+ Iterator j0 = playersToUpdate.iterator(); // Spigot
while (j0.hasNext()) {
- EntityHuman j1 = (EntityHuman) j0.next();
- EntityPlayer j2 = (EntityPlayer) j1;
+ //EntityHuman j1 = (EntityHuman) j0.next(); // Spigot - unused
+ EntityPlayer j2 = (EntityPlayer) j0.next(); // Spigot
i7.a(j2, i5);
if (j2.playerConnection.lowPriorityCount() <= 5) {
@@ -91,7 +92,7 @@ public class EntityTrackerEntry {
if (j3 != null) {
j2.playerConnection.sendPacket(j3);
- }
+ } else { j0.remove(); } // Spigot
}
}
}
@@ -333,6 +334,17 @@ public class EntityTrackerEntry {
}
}
+ // Spigot start - add player to list to receive initial map updates.
+ if (this.tracker instanceof EntityItemFrame) {
+ EntityItemFrame i4 = (EntityItemFrame) this.tracker;
+ ItemStack i5 = i4.i();
+
+ if (i5 != null && i5.getItem() instanceof ItemWorldMap) {
+ this.playersToUpdate.add(entityplayer);
+ }
+ }
+ // Spigot end
+
if (this.tracker instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) this.tracker;
@@ -359,6 +371,7 @@ public class EntityTrackerEntry {
}
} else if (this.trackedPlayers.contains(entityplayer)) {
this.trackedPlayers.remove(entityplayer);
+ this.playersToUpdate.remove(entityplayer); // Spigot
entityplayer.removeQueue.add(Integer.valueOf(this.tracker.id));
}
}
--
1.8.1-rc2

View file

@ -1,4 +1,4 @@
From c5ff374f643fb217cf6ce5424ee9135edae5e0ac Mon Sep 17 00:00:00 2001
From 5d7370768fa265d32405e2de1116047fd19a30b3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Feb 2013 05:10:21 -0500
Subject: [PATCH] Entity Activation Range
@ -19,7 +19,7 @@ This change can have dramatic impact on gameplay if configured too low. Balance
8 files changed, 264 insertions(+), 6 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ccc4858..24ab35f 100644
index 8feb1d3..482fecb 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -89,7 +89,7 @@ public abstract class Entity {
@ -60,7 +60,7 @@ index ccc4858..24ab35f 100644
this.datawatcher.a(0, Byte.valueOf((byte) 0));
this.datawatcher.a(1, Short.valueOf((short) 300));
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 4b47364..647b91f 100644
index 2c0f689..efda9a9 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -16,7 +16,7 @@ public class EntityArrow extends Entity implements IProjectile {
@ -89,7 +89,7 @@ index 6d54e97..924b6ed 100644
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 522320a..de0b6c6 100644
index c390e65..ccc49a5 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -13,6 +13,7 @@ import java.util.concurrent.Callable;
@ -124,7 +124,7 @@ index 522320a..de0b6c6 100644
entity.V = entity.locY;
entity.W = entity.locZ;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0d724cd..cfd08bf 100644
index d30219d..8dd1275 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -103,9 +103,15 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From ac30ba224906c71b30b4f9fd50ea27a3ce260b66 Mon Sep 17 00:00:00 2001
From 026e98083cbecbee32434f2fa4322469bee9f984 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 20 Feb 2013 23:07:53 -0500
Subject: [PATCH] Optimize getTileEntities performance
@ -9,14 +9,14 @@ Avoid traversing tile entities for every loaded chunk
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8d2c73e..b7ff543 100644
index e41dfba..fd86899 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -658,17 +658,20 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
public List getTileEntities(int i, int j, int k, int l, int i1, int j1) {
ArrayList arraylist = new ArrayList();
- // CraftBukkit start - use iterator
- // CraftBukkit start - Use iterator
- Iterator iterator = this.tileEntityList.iterator();
-
- while (iterator.hasNext()) {

View file

@ -1,4 +1,4 @@
From c08dc8eba98d8e16cbcca6e3571299cd423617eb Mon Sep 17 00:00:00 2001
From f58a44bb268cc0e7e34f09690f8e1d919ad3eb7d Mon Sep 17 00:00:00 2001
From: shakytom <tom.roberts00@gmail.com>
Date: Wed, 20 Feb 2013 22:34:38 -0500
Subject: [PATCH] Improved tile entity lookup for chunk sending
@ -10,7 +10,7 @@ This results in a good reduction of time spent in player ticking.
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 573c0f0..e6c5f91 100644
index 14f2521..59c463c 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -173,8 +173,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View file

@ -1,4 +1,4 @@
From 1dba07905ede84c7e1eb77db4d7c45284358a8a7 Mon Sep 17 00:00:00 2001
From 4f393627b7062f1ce569fc1115135020921417b0 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 08:58:35 +1100
Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the

View file

@ -1,4 +1,4 @@
From 82330dae19c04ca1d92033b449536f4f79d1e322 Mon Sep 17 00:00:00 2001
From 95dfd8902ffe673d170d5b3218d53c23b7c292f2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
@ -14,10 +14,10 @@ Subject: [PATCH] Watchdog Thread.
create mode 100644 src/main/java/org/spigotmc/WatchdogThread.java
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 28135f4..3689a3d 100644
index 4010cbf..168394f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -403,6 +403,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -401,6 +401,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.q();
SpigotTimings.serverTickTimer.stopTiming();
org.bukkit.CustomTimingsHandler.tick();
@ -25,7 +25,7 @@ index 28135f4..3689a3d 100644
}
// Spigot end
} else {
@@ -430,6 +431,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -428,6 +429,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.a(crashreport);
} finally {
try {
@ -386,7 +386,7 @@ index 0000000..10390b8
+ }
+}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index b741e37..ab8c5d6 100644
index 5822e41..a62ba24 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -31,6 +31,9 @@ settings:

View file

@ -1,4 +1,4 @@
From 96275c31d3c85ff5edecf5c6f9681629292546b4 Mon Sep 17 00:00:00 2001
From 6e754817948c35099c0c044f050fba777cb3efce Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 14 Feb 2013 17:32:20 +1100
Subject: [PATCH] Netty
@ -168,7 +168,7 @@ index 9c21129..fd2b9c9 100644
this.d = chunkmap.c;
this.c = chunkmap.b;
diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
index df63cf7..0d817a2 100644
index 9f8afe3..b1d3a17 100644
--- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
+++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
@@ -24,7 +24,7 @@ public class Packet56MapChunkBulk extends Packet {
@ -181,7 +181,7 @@ index df63cf7..0d817a2 100644
};
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
index 5f4bcf2..58687ed 100644
index eb474f5..fcfc3d2 100644
--- a/src/main/java/net/minecraft/server/PendingConnection.java
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
@@ -17,7 +17,7 @@ public class PendingConnection extends Connection {
@ -216,7 +216,7 @@ index 5f4bcf2..58687ed 100644
- if (packet254getinfo.a == 1) {
+ if (true) {
// CraftBukkit start - fix decompile issues, don't create a list from an array
// CraftBukkit start - Fix decompile issues, don't create a list from an array
Object[] list = new Object[] { 1, 60, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() };
diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java

View file

@ -1,4 +1,4 @@
From c9b8bc00e547b007a70f96813d3a838449ed56d1 Mon Sep 17 00:00:00 2001
From e389b3a9ebc93fd9a79b82a1e30975a67b9dc4b6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Feb 2013 20:45:20 +1100
Subject: [PATCH] Enable Improved ping sending
@ -10,7 +10,7 @@ Subject: [PATCH] Enable Improved ping sending
3 files changed, 18 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index e6c5f91..bd8dfa7 100644
index 59c463c..81ba038 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -51,6 +51,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -22,10 +22,10 @@ index e6c5f91..bd8dfa7 100644
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 79c52f6..c6513c8 100644
index 28798af..d212080 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -714,7 +714,23 @@ public abstract class PlayerList {
@@ -713,7 +713,23 @@ public abstract class PlayerList {
this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping));
}
// CraftBukkit end */
@ -50,7 +50,7 @@ index 79c52f6..c6513c8 100644
public void sendAll(Packet packet) {
for (int i = 0; i < this.players.size(); ++i) {
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index ab8c5d6..3a875da 100644
index a62ba24..8fa8c7a 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -31,6 +31,7 @@ settings:

View file

@ -1,4 +1,4 @@
From f9ec6953de1d80b95eea4b195973b9dda36f5e0f Mon Sep 17 00:00:00 2001
From cb4fe4f906ec5807b92d0a4b2559e177fc5aa33d Mon Sep 17 00:00:00 2001
From: EdGruberman <ed@rjump.com>
Date: Fri, 22 Feb 2013 09:23:51 -0700
Subject: [PATCH] Return bed location itself instead of next to bed; Fixes
@ -9,7 +9,7 @@ Subject: [PATCH] Return bed location itself instead of next to bed; Fixes
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 59e63ef..3c34a4c 100644
index 0deb4df..8eb93c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -626,10 +626,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View file

@ -1,24 +1,22 @@
From 60853843626f89e89aa8aab3d8d320f2d6855620 Mon Sep 17 00:00:00 2001
From d91a4eb8ba5fe0a504f7afda63495e7ef572b39f Mon Sep 17 00:00:00 2001
From: EdGruberman <ed@rjump.com>
Date: Tue, 12 Feb 2013 16:17:31 -0700
Subject: [PATCH] Remove dependency on CraftPlayer.getBedSpawnLocation; Fixes
BUKKIT-3604
---
src/main/java/net/minecraft/server/PlayerList.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
src/main/java/net/minecraft/server/PlayerList.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index c6513c8..ae7ed8f 100644
index d212080..126b177 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -491,8 +491,15 @@ public abstract class PlayerList {
boolean useTravelAgent = false; // don't use agent for custom worlds or return from THE_END
@@ -491,7 +491,14 @@ public abstract class PlayerList {
if (exitWorld != null) {
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
- // THE_END -> NORMAL; use bed if available, otherwise default spawn
- exit = ((CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
+ // THE_END -> NORMAL; use bed if available, otherwise default spawn (code modeled after vanilla moveToWorld)
// THE_END -> NORMAL; use bed if available, otherwise default spawn
- exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
+ ChunkCoordinates chunkcoordinates = entityplayer.getBed();
+ CraftWorld spawnWorld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld);
+ if (spawnWorld != null && chunkcoordinates != null) {

View file

@ -1,4 +1,4 @@
From c9da444994984d83c474cc78ab7bfdbe043d7c32 Mon Sep 17 00:00:00 2001
From ea2c851b4f7b59bf96ba3d2c3a5c9cd6a64eb374 Mon Sep 17 00:00:00 2001
From: Yariv Livay <yarivlivay@gmail.com>
Date: Sat, 2 Mar 2013 09:36:52 +1100
Subject: [PATCH] BUKKIT-3661, fixed missing HangingBreakEvent when
@ -9,10 +9,10 @@ Subject: [PATCH] BUKKIT-3661, fixed missing HangingBreakEvent when
1 file changed, 15 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
index c35a88a..f88d337 100644
index f697d85..1dfb02f 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -261,6 +261,21 @@ public abstract class EntityHanging extends Entity {
@@ -260,6 +260,21 @@ public abstract class EntityHanging extends Entity {
if (!this.world.isStatic && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
if (dead) return; // CraftBukkit

View file

@ -1,4 +1,4 @@
From ae8970c74947203e8cabaa71b44ef06b8fce2d16 Mon Sep 17 00:00:00 2001
From f5248bf39f6e3b52bfcf6e820ac4129ab1cd2f78 Mon Sep 17 00:00:00 2001
From: Yariv Livay <yarivlivay@gmail.com>
Date: Mon, 25 Feb 2013 22:26:36 +0200
Subject: [PATCH] Adds BUKKIT-3667, Faux sleepers wake up normally
@ -8,7 +8,7 @@ Subject: [PATCH] Adds BUKKIT-3667, Faux sleepers wake up normally
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index bd8dfa7..ba3fde9 100644
index 81ba038..f5910a2 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View file

@ -1,4 +1,4 @@
From 1d944d45bd7b34fa8e4898a52e3faa4ec352ac8a Mon Sep 17 00:00:00 2001
From fe1d0e9edcf6d93bbf376f8bb8c22cb653dec858 Mon Sep 17 00:00:00 2001
From: Yariv Livay <yarivlivay@gmail.com>
Date: Tue, 26 Feb 2013 20:14:34 +0200
Subject: [PATCH] BUKKIT-3668 Fix wrong block in BlockDispenseEvent when

View file

@ -1,4 +1,4 @@
From d41afe438e9c798c4f7a71b4aee044fc1c4b22ee Mon Sep 17 00:00:00 2001
From a015187204c0f42a84b06c1e52fa773289b34331 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 4 Mar 2013 18:45:52 +1100
Subject: [PATCH] PlayerItemDamageEvent
@ -8,7 +8,7 @@ Subject: [PATCH] PlayerItemDamageEvent
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 68e481c..de7e7ac 100644
index 7dc36a8..cd032ae 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -178,7 +178,13 @@ public final class ItemStack {

View file

@ -1,4 +1,4 @@
From 7139041a01222ac05965b666a600f65ddb8d9598 Mon Sep 17 00:00:00 2001
From 8f41e1d281463c438033bb26874dc50c9c660c82 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 17 Mar 2013 19:02:50 +1100
Subject: [PATCH] Faster UUID for entities
@ -9,7 +9,7 @@ It is overkill to create a new SecureRandom on each entity create and then use i
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0538e20..150f5f8 100644
index 482fecb..52ecc09 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -154,7 +154,7 @@ public abstract class Entity {

View file

@ -1,4 +1,4 @@
From c175ccfef07273eda13c576a9a7f79e5eb945b01 Mon Sep 17 00:00:00 2001
From a7b8ea293d6a2ef96c39eac11a54113e7dd24288 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 18 Mar 2013 20:01:44 +1100
Subject: [PATCH] Prevent NPE in CraftSign

View file

@ -1,4 +1,4 @@
From 940d1800403acd4b01d5d674d67ebf0bd6797906 Mon Sep 17 00:00:00 2001
From 8ab023dfa03c86b4b50d844243ba1b0cec58cd69 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 21 Mar 2013 17:00:54 +1100
Subject: [PATCH] Stage DataWatcher & WatchableObject.

View file

@ -1,4 +1,4 @@
From 1f4574435a3791f1b922ff6b6a79b13a25795353 Mon Sep 17 00:00:00 2001
From 03aae0cc202874295f7350ba9220a2bbb5e5a6ca Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Feb 2013 11:58:47 -0500
Subject: [PATCH] Entity Tracking Ranges
@ -30,7 +30,7 @@ index db62084..32ce51d 100644
i = this.d;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index cfd08bf..1b24d07 100644
index 8dd1275..13dc9fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -107,6 +107,12 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From 80ee5d4d880cbcf81dd8c988cce5ba09e9214882 Mon Sep 17 00:00:00 2001
From 0919f10de72408b11f3c85ae790d510e5d20341a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 11:15:11 +1100
Subject: [PATCH] BungeeCord Support
@ -11,7 +11,7 @@ Subject: [PATCH] BungeeCord Support
3 files changed, 17 insertions(+)
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
index 58687ed..ae73a43 100644
index fcfc3d2..3448fc5 100644
--- a/src/main/java/net/minecraft/server/PendingConnection.java
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
@@ -219,4 +219,17 @@ public class PendingConnection extends Connection {

View file

@ -1,4 +1,4 @@
From b2a141a19dbaeee632b24975df66523116d0fe8b Mon Sep 17 00:00:00 2001
From bd682f09980ae91156c9f240bcaf0537d78ab207 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 13:04:45 +1100
Subject: [PATCH] Texture Pack Resolutions
@ -12,10 +12,10 @@ Fix issues when specifiying a server texture pack URL with resolution != 16.
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3689a3d..9a78084 100644
index 168394f..3b2d9d3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1075,7 +1075,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -1073,7 +1073,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public int S() {
@ -45,7 +45,7 @@ index bce217e..8fd635f 100644
if (metrics == null) {
try {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a7abd6e..56cdfb7 100644
index 8eb93c0..f9a7645 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -828,7 +828,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View file

@ -1,4 +1,4 @@
From 98830ca8c740c06391a4c4a0d08044299d244d2c Mon Sep 17 00:00:00 2001
From 74a63a8ecb9e74b2143d1be51b97fae01c971a7b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 13:31:23 +1100
Subject: [PATCH] Entity Tracking Intervals

View file

@ -1,4 +1,4 @@
From eab583f5316f3d7e32c74c9f613139e82dad849c Mon Sep 17 00:00:00 2001
From e7453e62d74d4fd71b90e1893ee1e815f24f920f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 19:08:41 +1100
Subject: [PATCH] Limit Custom Map Rendering

View file

@ -1,29 +0,0 @@
From 58995adb5304f5f8cc8e87c11204ad12e209157c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 24 Mar 2013 18:52:26 +1100
Subject: [PATCH] Close Minecart Containers
Close Minecart containers when they change worlds via entity portal.
---
src/main/java/net/minecraft/server/EntityMinecartContainer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index c207076..74f579d 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -149,6 +149,11 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
}
public void c(int i) {
+ // Spigot start
+ for (HumanEntity h : transaction) {
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
+ }
+ // Spigot end
this.b = false;
super.c(i);
}
--
1.8.1-rc2