Upstream merge

This commit is contained in:
Thinkofdeath
2015-03-22 19:50:13 +00:00
parent 9263823b95
commit 3ce8cf1a9a
3 changed files with 5 additions and 45 deletions

View File

@@ -70,8 +70,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Chunk chunk = (Chunk) data[0]; Chunk chunk = (Chunk) data[0];
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1]; NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
chunk.entitySlices[k] = new EntitySlice(Entity.class);
} public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
// CraftBukkit end // CraftBukkit end
- -
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot + world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot

View File

@@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -0,0 +0,0 @@ public abstract class TileEntity { @@ -0,0 +0,0 @@ public abstract class TileEntity {
// CraftBukkit start - add method // CraftBukkit start - add method
public InventoryHolder getOwner() { public InventoryHolder getOwner() {
if (world == null) return null;
- org.bukkit.block.BlockState state = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState(); - org.bukkit.block.BlockState state = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState();
+ // Spigot start + // Spigot start
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()); + org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());

View File

@@ -26,15 +26,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.world = world; this.world = world;
this.locX = i; this.locX = i;
this.locZ = j; this.locZ = j;
@@ -0,0 +0,0 @@ public class Chunk { this.heightMap = new int[256];
/* CraftBukkit start
for (int k = 0; k < this.entitySlices.length; ++k) { for (int k = 0; k < this.entitySlices.length; ++k) {
- this.entitySlices[k] = new EntitySlice(Entity.class); - this.entitySlices[k] = new EntitySlice(Entity.class);
+ this.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot + this.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot
} }
// CraftBukkit end */
Arrays.fill(this.f, -999);
@@ -0,0 +0,0 @@ public class Chunk { @@ -0,0 +0,0 @@ public class Chunk {
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
@@ -59,45 +58,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return this.entitySlices; return this.entitySlices;
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
// CraftBukkit start - 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
}
// CraftBukkit end
chunk.addEntities();
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -0,0 +0,0 @@ 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
}
// CraftBukkit end
world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
if (chunk != null) {
// moved from Chunk.<init>
for (int k = 0; k < chunk.entitySlices.length; ++k) {
- chunk.entitySlices[k] = new EntitySlice(net.minecraft.server.Entity.class);
+ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList();
}
world.chunkProviderServer.chunks.put(LongHash.toLong(cx, cz), chunk);
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java