Update to Minecraft 1.10

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-06-09 11:43:49 +10:00
parent 604d9373c0
commit a39b7e5f3a
161 changed files with 1176 additions and 1147 deletions

View File

@@ -59,8 +59,8 @@
+
public Chunk(World world, ChunkSnapshot chunksnapshot, int i, int j) {
this(world, i, j);
short short0 = 256;
@@ -466,7 +503,8 @@
boolean flag = true;
@@ -467,7 +504,8 @@
}
}
@@ -70,20 +70,7 @@
block.onPlace(this.world, blockposition, iblockdata);
}
@@ -547,7 +585,11 @@
int j = MathHelper.floor(entity.locZ / 16.0D);
if (i != this.locX || j != this.locZ) {
- Chunk.e.warn("Wrong location! (" + i + ", " + j + ") should be (" + this.locX + ", " + this.locZ + "), " + entity, new Object[] { entity});
+ // CraftBukkit start
+ Bukkit.getLogger().warning("Wrong location for " + entity + " in world '" + world.getWorld().getName() + "'!");
+ // Chunk.e.warn("Wrong location! (" + i + ", " + j + ") should be (" + this.locX + ", " + this.locZ + "), " + entity, new Object[] { entity});
+ Bukkit.getLogger().warning("Entity is at " + entity.locX + "," + entity.locZ + " (chunk " + i + "," + j + ") but was stored in chunk " + this.locX + "," + this.locZ);
+ // CraftBukkit end
entity.die();
}
@@ -602,7 +644,15 @@
@@ -604,7 +642,15 @@
@Nullable
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
@@ -100,7 +87,7 @@
if (tileentity == null) {
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
@@ -637,6 +687,13 @@
@@ -639,6 +685,13 @@
tileentity.z();
this.tileEntities.put(blockposition, tileentity);
@@ -114,17 +101,18 @@
}
}
@@ -680,7 +737,21 @@
}
@@ -681,9 +734,21 @@
int i = aentityslice.length;
for (int i = 0; i < this.entitySlices.length; ++i) {
- this.world.c((Collection) this.entitySlices[i]);
for (int j = 0; j < i; ++j) {
- EntitySlice entityslice = aentityslice[j];
+ // CraftBukkit start
+ List<Entity> newList = Lists.newArrayList(this.entitySlices[i]);
+ List<Entity> newList = Lists.newArrayList(aentityslice[j]);
+ java.util.Iterator<Entity> iter = newList.iterator();
+ while (iter.hasNext()) {
+ Entity entity = iter.next();
+
- this.world.c((Collection) entityslice);
+ // Do not pass along players, as doing so can get them stuck outside of time.
+ // (which for example disables inventory icon updates and prevents block breaking)
+ if (entity instanceof EntityPlayer) {
@@ -137,7 +125,7 @@
}
}
@@ -738,8 +809,8 @@
@@ -745,8 +810,8 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -148,7 +136,7 @@
}
}
}
@@ -802,6 +873,29 @@
@@ -809,6 +874,29 @@
} else {
this.o();
chunkgenerator.recreateStructures(this.locX, this.locZ);