Upstream merge

This commit is contained in:
Thinkofdeath 2015-03-16 19:47:37 +00:00 committed by Zach Brown
parent fdaf03d521
commit a34dea5aed
6 changed files with 32 additions and 32 deletions

View file

@ -1,4 +1,4 @@
From 008870e6f7853620df13f818d842b38fd3cb8b34 Mon Sep 17 00:00:00 2001
From a376bbb1502c9b583505da0f9530028c3e3939be Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 12:56:02 +1000
Subject: [PATCH] Better Chunk Tick Selection
@ -6,7 +6,7 @@ Subject: [PATCH] Better Chunk Tick Selection
An optimized chunk ticking algorithm which better selects chunks around players which are active on the server.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 89c8634..fbd1796 100644
index ba285af..f0ee966 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,7 +68,7 @@ public abstract class World implements IBlockAccess {
@ -63,7 +63,7 @@ index 89c8634..fbd1796 100644
this.L = this.random.nextInt(12000);
this.allowMonsters = true;
this.allowAnimals = true;
@@ -1962,17 +1993,44 @@ public abstract class World implements IBlockAccess {
@@ -1964,17 +1995,44 @@ public abstract class World implements IBlockAccess {
int k;
int l;

View file

@ -1,4 +1,4 @@
From 76f5dd6901a83046e9efcdb1196ba7744771364d Mon Sep 17 00:00:00 2001
From 95a74b57dd4a6a150a5a66536193291216570011 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Tue, 25 Mar 2014 16:10:01 +1100
Subject: [PATCH] Async Operation Catching
@ -78,7 +78,7 @@ index 5ef2be4..8d50e05 100644
this.trackedPlayers.remove(entityplayer);
entityplayer.d(this.tracker);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f58e618..52a801f 100644
index 2ba4afb..39234a8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -940,6 +940,7 @@ public abstract class World implements IBlockAccess {
@ -97,7 +97,7 @@ index f58e618..52a801f 100644
entity.die();
if (entity instanceof EntityHuman) {
this.players.remove(entity);
@@ -2498,6 +2500,7 @@ public abstract class World implements IBlockAccess {
@@ -2500,6 +2502,7 @@ public abstract class World implements IBlockAccess {
}
public void b(Collection<Entity> collection) {

View file

@ -1,4 +1,4 @@
From 278839905bbaefedb7174999b94257775bc866b2 Mon Sep 17 00:00:00 2001
From 19f7bd13f82c081da0b3fb8d39473414ba18ebe4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Spigot Timings
@ -56,7 +56,7 @@ index 63d548c..c143d01 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index b7d09a9..5c0ab6c 100644
index cae8455..4e47890 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -46,7 +46,9 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -69,16 +69,16 @@ index b7d09a9..5c0ab6c 100644
if (data != null) {
Chunk chunk = (Chunk) data[0];
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
@@ -399,7 +401,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
@@ -403,7 +405,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
chunk.entitySlices[k] = new EntitySlice(Entity.class);
}
// CraftBukkit end
-
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
if (nbttaglist1 != null) {
@@ -425,7 +427,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -429,7 +431,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
@ -88,7 +88,7 @@ index b7d09a9..5c0ab6c 100644
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
if (nbttaglist2 != null) {
@@ -438,6 +441,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -442,6 +445,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
@ -97,7 +97,7 @@ index b7d09a9..5c0ab6c 100644
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
@@ -457,6 +462,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -461,6 +466,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
@ -419,7 +419,7 @@ index 8afd376..71bf63a 100644
private static Map<String, Class<? extends TileEntity>> f = Maps.newHashMap();
private static Map<Class<? extends TileEntity>, String> g = Maps.newHashMap();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 52a801f..b831e55 100644
index 39234a8..0c32ba7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -21,6 +21,7 @@ import org.bukkit.Bukkit;
@ -791,10 +791,10 @@ index 0000000..558574f
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 0f445df..a43870a 100644
index c31f17f..1178ad7 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -53,7 +53,9 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
@@ -49,7 +49,9 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
chunk.addEntities();
if (queuedChunk.provider.chunkProvider != null) {

View file

@ -1,4 +1,4 @@
From 5f13de821399a3edf4c2248058841defef030bf6 Mon Sep 17 00:00:00 2001
From 758898e89aaa2eb9657cdc3297a7efef8ae810b7 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 22 Jun 2013 16:12:02 +1000
Subject: [PATCH] Allow Disabling of Random Lighting Updates
@ -18,10 +18,10 @@ index cd206f6..f75bd24 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2758a1d..3218138 100644
index 1be4a0c..9423200 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2088,7 +2088,7 @@ public abstract class World implements IBlockAccess {
@@ -2090,7 +2090,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.a("playerCheckLight");

View file

@ -1,14 +1,14 @@
From e0775a83d8d6e9c9df2920ee88762a4342a610a8 Mon Sep 17 00:00:00 2001
From f8338a7104c5166a9da9495b60a7cdc7cadf0c20 Mon Sep 17 00:00:00 2001
From: "Evan A. Haskell" <eah2119@gmail.com>
Date: Thu, 26 Jun 2014 18:37:29 -0400
Subject: [PATCH] Fix Null Tile Entity Worlds
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1507117..4a92bd0 100644
index a847e0d..24a6a1d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1944,6 +1944,7 @@ public abstract class World implements IBlockAccess {
@@ -1946,6 +1946,7 @@ public abstract class World implements IBlockAccess {
}
}

View file

@ -1,4 +1,4 @@
From 32510863cbbd124bae1daeff599e7348519f8f88 Mon Sep 17 00:00:00 2001
From ca24944ba98f745b47e77fb86cd9911cd07dfa36 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Fri, 20 Feb 2015 21:33:36 +1100
Subject: [PATCH] Use Standard List for EntitySlices.
@ -72,19 +72,19 @@ index c143d01..4ac27d0 100644
}
// CraftBukkit end
chunk.addEntities();
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index a43870a..f099976 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -44,7 +44,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 4e47890..1f6212e 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -402,7 +402,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
// moved from Chunk.<init>
for (int k = 0; k < chunk.entitySlices.length; ++k) {
- chunk.entitySlices[k] = new EntitySlice(Entity.class);
+ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot
}
queuedChunk.loader.loadEntities(chunk, queuedChunk.compound.getCompound("Level"), queuedChunk.world);
// CraftBukkit end
world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 0143623..621a717 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java