13
0
geforkt von Mirrors/Paper
Dieser Commit ist enthalten in:
Thinkofdeath 2015-03-22 19:50:13 +00:00 committet von Zach Brown
Ursprung f1c39a0f62
Commit 3aef9e976f
13 geänderte Dateien mit 67 neuen und 107 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 75dfbcf387efcbb563549aaaa6838a6438f14571 Mon Sep 17 00:00:00 2001
From 93c1cbc882a2a4e4f98139641e6ac3426eca9234 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations
@ -25,10 +25,10 @@ index 629e6b8..4b3fcac 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0d80c41..eb2f6db 100644
index 621c89f..20357f9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1357,4 +1357,14 @@ public class CraftWorld implements World {
@@ -1353,4 +1353,14 @@ public class CraftWorld implements World {
cps.queueUnload(chunk.locX, chunk.locZ);
}
}
@ -104,7 +104,7 @@ index 64e346d..243e8e5 100644
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 05923b4..058141d 100644
index 16a35b8..c1879f4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1313,4 +1313,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -1,4 +1,4 @@
From 19f7bd13f82c081da0b3fb8d39473414ba18ebe4 Mon Sep 17 00:00:00 2001
From b2f4b5f64bd93400de5fdfa33cb672c101a8e7bb 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
@ -6,10 +6,10 @@ Subject: [PATCH] Spigot Timings
Overhauls the Timings System adding performance tracking all around the Minecraft Server
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 0ad6f17..c213307 100644
index 3923cd1..f22e695 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -903,6 +903,7 @@ public class Chunk {
@@ -901,6 +901,7 @@ public class Chunk {
}
public void loadNearby(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
@ -17,7 +17,7 @@ index 0ad6f17..c213307 100644
boolean flag = ichunkprovider.isChunkLoaded(i, j - 1);
boolean flag1 = ichunkprovider.isChunkLoaded(i + 1, j);
boolean flag2 = ichunkprovider.isChunkLoaded(i, j + 1);
@@ -949,6 +950,7 @@ public class Chunk {
@@ -947,6 +948,7 @@ public class Chunk {
}
}
@ -26,7 +26,7 @@ index 0ad6f17..c213307 100644
public BlockPosition h(BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 63d548c..c143d01 100644
index 9bd173b..74710f9 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -132,6 +132,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -37,7 +37,7 @@ index 63d548c..c143d01 100644
chunk = this.loadChunk(i, j);
if (chunk == null) {
if (this.chunkProvider == null) {
@@ -188,6 +189,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -183,6 +184,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
// CraftBukkit end
chunk.loadNearby(this, this, i, j);
@ -45,7 +45,7 @@ index 63d548c..c143d01 100644
}
return chunk;
@@ -222,7 +224,9 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -217,7 +219,9 @@ public class ChunkProviderServer implements IChunkProvider {
if (chunk != null) {
chunk.setLastSaved(this.world.getTime());
if (this.chunkProvider != null) {
@ -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 cae8455..4e47890 100644
index b7d09a9..5c0ab6c 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 cae8455..4e47890 100644
if (data != null) {
Chunk chunk = (Chunk) data[0];
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
@@ -403,7 +405,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
chunk.entitySlices[k] = new EntitySlice(Entity.class);
}
@@ -399,7 +401,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
// CraftBukkit end
-
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
if (nbttaglist1 != null) {
@@ -429,7 +431,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -425,7 +427,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
@ -88,7 +88,7 @@ index cae8455..4e47890 100644
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
if (nbttaglist2 != null) {
@@ -442,6 +445,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -438,6 +441,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
@ -97,7 +97,7 @@ index cae8455..4e47890 100644
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
@@ -461,6 +466,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -457,6 +462,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
@ -367,7 +367,7 @@ index 611a623..af2e9bc 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 6649c0b..20e09e5 100644
index a25e980..3595861 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1061,6 +1061,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@ -402,7 +402,7 @@ index 6649c0b..20e09e5 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 8afd376..71bf63a 100644
index d80bbaf..02c9250 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -6,10 +6,12 @@ import java.util.concurrent.Callable;
@ -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 39234a8..0c32ba7 100644
index d238c81..47778d1 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;

Datei anzeigen

@ -1,4 +1,4 @@
From 1f7ecc7b3a7c04ca6b298a5403936a4ed2edc380 Mon Sep 17 00:00:00 2001
From 08c7c84b760454e2192f92ba1b3a285227beebfe Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 17:29:54 +1000
Subject: [PATCH] Fix Mob Spawning Relative to View Distance
@ -8,7 +8,7 @@ Changes the mob spawning algorithm to properly account for view distance and the
Needs better documentation.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 3a05d9d..633af1d 100644
index f22e695..3d8d59a 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -42,6 +42,7 @@ public class Chunk {
@ -19,7 +19,7 @@ index 3a05d9d..633af1d 100644
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
private int neighbors = 0x1 << 12;
@@ -676,6 +677,22 @@ public class Chunk {
@@ -674,6 +675,22 @@ public class Chunk {
entity.af = k;
entity.ag = this.locZ;
this.entitySlices[k].add(entity);
@ -42,7 +42,7 @@ index 3a05d9d..633af1d 100644
}
public void b(Entity entity) {
@@ -692,6 +709,22 @@ public class Chunk {
@@ -690,6 +707,22 @@ public class Chunk {
}
this.entitySlices[i].remove(entity);

Datei anzeigen

@ -1,14 +1,14 @@
From 758898e89aaa2eb9657cdc3297a7efef8ae810b7 Mon Sep 17 00:00:00 2001
From 223d4bc324769a855fcdf33a0f2588e44c2110fe 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
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index cd206f6..f75bd24 100644
index 3d8d59a..3e72a01 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1021,7 +1021,7 @@ public class Chunk {
@@ -1019,7 +1019,7 @@ public class Chunk {
}
this.p = true;
@ -18,7 +18,7 @@ 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 1be4a0c..9423200 100644
index 38ebdbb..51db92b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2090,7 +2090,7 @@ public abstract class World implements IBlockAccess {

Datei anzeigen

@ -1,4 +1,4 @@
From 38117f2f0ee270dd3242749d0b3f0f4c19e0d544 Mon Sep 17 00:00:00 2001
From b7986cfe637a536c4a1ce520737f660ad52e314a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 27 Jun 2013 17:26:09 +1000
Subject: [PATCH] Properly Close Inventories
@ -6,10 +6,10 @@ Subject: [PATCH] Properly Close Inventories
Properly close inventories when unloading and switching worlds.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index f75bd24..08cf30e 100644
index 3e72a01..7e56837 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -830,6 +830,18 @@ public class Chunk {
@@ -828,6 +828,18 @@ public class Chunk {
while (iterator.hasNext()) {
TileEntity tileentity = (TileEntity) iterator.next();
@ -28,7 +28,7 @@ index f75bd24..08cf30e 100644
this.world.b(tileentity);
}
@@ -840,6 +852,18 @@ public class Chunk {
@@ -838,6 +850,18 @@ public class Chunk {
java.util.Iterator<Entity> iter = newList.iterator();
while (iter.hasNext()) {
Entity entity = iter.next();

Datei anzeigen

@ -1,14 +1,14 @@
From c7db17e4abe5169836622144425dc1dc165b15cb Mon Sep 17 00:00:00 2001
From a61ce4bfc2da63c20369fecaf29f8196a3b8fa84 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Mon, 2 Dec 2013 23:42:09 +0000
Subject: [PATCH] Fix some chunks not being sent to the client
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 08cf30e..6e5fe05 100644
index 7e56837..5208dbc 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1063,7 +1063,15 @@ public class Chunk {
@@ -1061,7 +1061,15 @@ public class Chunk {
}
public boolean isReady() {

Datei anzeigen

@ -1,4 +1,4 @@
From 0e8505239a1fb379830bfa7b713b18d91e2b7236 Mon Sep 17 00:00:00 2001
From aeca21a5b37af60031a55ef11c183c736da8750f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 16 May 2013 18:51:05 +1000
Subject: [PATCH] Orebfuscator
@ -25,10 +25,10 @@ index 9e0d5ad..ce91553 100644
if (block instanceof BlockFalling) {
((BlockFalling) block).a_(this.world, blockposition);
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 71c78bd..4564877 100644
index 6f3443b..dfc18e8 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -194,6 +194,7 @@ public class Explosion {
@@ -210,6 +210,7 @@ public class Explosion {
blockposition = (BlockPosition) iterator.next();
Block block = this.world.getType(blockposition).getBlock();
@ -91,7 +91,7 @@ index 0301fba..7a84a95 100644
public void a(BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3218138..b168454 100644
index 51db92b..c1789a0 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -497,6 +497,7 @@ public abstract class World implements IBlockAccess {

Datei anzeigen

@ -1,4 +1,4 @@
From 399bfbc662d9ecfb09fd37ec5f99c3ae6f85fff7 Mon Sep 17 00:00:00 2001
From dedd04392e2bfbd8e535271ed3515de2b9613fa1 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Fri, 20 Dec 2013 21:36:06 +0000
Subject: [PATCH] Particle API
@ -19,10 +19,10 @@ index 7de0de5..13f9e9d 100644
datavalue = 0;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f4b2f39..67b6dc3 100644
index 609b483..5dc77b1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -826,28 +826,18 @@ public class CraftWorld implements World {
@@ -822,28 +822,18 @@ public class CraftWorld implements World {
Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!");
}
@ -60,7 +60,7 @@ index f4b2f39..67b6dc3 100644
}
public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException {
@@ -1365,6 +1355,70 @@ public class CraftWorld implements World {
@@ -1361,6 +1351,70 @@ public class CraftWorld implements World {
// Spigot start
private final Spigot spigot = new Spigot()
{
@ -132,7 +132,7 @@ index f4b2f39..67b6dc3 100644
public Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c28b6bc..276c9fd 100644
index 08b6f1b..8a6ea4b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -322,9 +322,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -1,4 +1,4 @@
From f8798f6da120f52aeaaab8905b072637e102e27b Mon Sep 17 00:00:00 2001
From 978ecbb7abcde6a038fc3aad91e46215aeb6c03c Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 12 Jan 2014 21:07:18 +1100
Subject: [PATCH] Improve AutoSave Mechanism
@ -11,10 +11,10 @@ Instead we will mimic the save-all command in its behaviour, which is both safe
Also, only save modified chunks, or chunks with entities after 4 auto save passes
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 6e5fe05..db7f6bc 100644
index 5208dbc..f8bfc2d 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -944,7 +944,7 @@ public class Chunk {
@@ -942,7 +942,7 @@ public class Chunk {
if (this.r && this.world.getTime() != this.lastSaved || this.q) {
return true;
}
@ -47,10 +47,10 @@ index 3dd4201..4c254a7 100644
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 67b6dc3..c52b87c 100644
index 5dc77b1..62ad47d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -730,12 +730,17 @@ public class CraftWorld implements World {
@@ -726,12 +726,17 @@ public class CraftWorld implements World {
}
public void save() {

Datei anzeigen

@ -1,4 +1,4 @@
From 4bde8a418ed21c9e69acc0cc95477fae9904bcdd Mon Sep 17 00:00:00 2001
From aa2df27d6fe5a61cfb38c2560dcc5d320a2ec0d2 Mon Sep 17 00:00:00 2001
From: drXor <mcyoungsota@gmail.com>
Date: Sun, 23 Feb 2014 16:16:59 -0400
Subject: [PATCH] Implement Silenceable Lightning API
@ -39,10 +39,10 @@ index d355e68..286fdef 100644
//this.world.makeSound(this.locX, this.locY, this.locZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
float pitch = 0.8F + this.random.nextFloat() * 0.2F;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c52b87c..f0bafba 100644
index 62ad47d..6b26c8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1424,6 +1424,22 @@ public class CraftWorld implements World {
@@ -1420,6 +1420,22 @@ public class CraftWorld implements World {
{
CraftWorld.this.playEffect( location, effect, 0 );
}

Datei anzeigen

@ -1,17 +1,17 @@
From 992aa799cc060b43e0e7cb0a75caa0de2be81808 Mon Sep 17 00:00:00 2001
From 2e8d43c6ee43eb635c8e667ac86acc61be534c26 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 20 Apr 2014 11:16:54 +1000
Subject: [PATCH] Log null TileEntity Owner
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 71bf63a..a829555 100644
index 02c9250..0de85da 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -224,7 +224,14 @@ public abstract class TileEntity {
@@ -225,7 +225,14 @@ public abstract class TileEntity {
// CraftBukkit start - add method
public InventoryHolder getOwner() {
if (world == null) return null;
- org.bukkit.block.BlockState state = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState();
+ // Spigot start
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());

Datei anzeigen

@ -1,4 +1,4 @@
From 3016caecffd01b7e9372034bd7a917eb19219ee1 Mon Sep 17 00:00:00 2001
From 685cff3ef2bdd92f5a354766a873c2b6633a7ef4 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Sat, 19 Jul 2014 12:49:48 +0100
Subject: [PATCH] Don't spawn bonus ocelots when plugins spawn ocelots
@ -26,10 +26,10 @@ index 84c8721..ea5adbe 100644
EntityOcelot entityocelot = new EntityOcelot(this.world);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f0bafba..d381fd7 100644
index 6b26c8f..2bbe104 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1096,6 +1096,12 @@ public class CraftWorld implements World {
@@ -1092,6 +1092,12 @@ public class CraftWorld implements World {
}
if (entity != null) {

Datei anzeigen

@ -1,11 +1,11 @@
From a91315b617a10e50a22eb0fd1f33433fff9834f7 Mon Sep 17 00:00:00 2001
From c52a5aea5e364cebedf4c519f30fbc74a39b295e 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.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index db7f6bc..2141126 100644
index f8bfc2d..d5922fe 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -31,7 +31,7 @@ public class Chunk {
@ -17,7 +17,7 @@ index db7f6bc..2141126 100644
private boolean done;
private boolean lit;
private boolean p;
@@ -80,7 +80,7 @@ public class Chunk {
@@ -80,14 +80,14 @@ public class Chunk {
this.tileEntities = Maps.newHashMap();
this.v = 4096;
this.w = Queues.newConcurrentLinkedQueue();
@ -26,16 +26,15 @@ index db7f6bc..2141126 100644
this.world = world;
this.locX = i;
this.locZ = j;
@@ -88,7 +88,7 @@ public class Chunk {
this.heightMap = new int[256];
/* CraftBukkit start
for (int k = 0; k < this.entitySlices.length; ++k) {
- this.entitySlices[k] = new EntitySlice(Entity.class);
+ this.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot
}
// CraftBukkit end */
@@ -926,12 +926,12 @@ public class Chunk {
Arrays.fill(this.f, -999);
@@ -924,12 +924,12 @@ public class Chunk {
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
for (int k = i; k <= j; ++k) {
@ -50,7 +49,7 @@ index db7f6bc..2141126 100644
list.add((T) entity); // Fix decompile error
}
}
@@ -1311,7 +1311,7 @@ public class Chunk {
@@ -1309,7 +1309,7 @@ public class Chunk {
return this.tileEntities;
}
@ -59,45 +58,6 @@ index db7f6bc..2141126 100644
return this.entitySlices;
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index c143d01..4ac27d0 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -157,7 +157,7 @@ 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 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
}
// 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 d381fd7..7a1f2c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -268,7 +268,7 @@ 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
index 0143623..621a717 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java