Minecraft 1.9.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-05-10 21:47:39 +10:00
parent c9a6e9175c
commit d506c12c07
236 changed files with 1471 additions and 1822 deletions

View File

@@ -9,10 +9,10 @@
+
public class Chunk {
private static final Logger d = LogManager.getLogger();
@@ -41,6 +44,34 @@
private int w;
private ConcurrentLinkedQueue<BlockPosition> x;
private static final Logger e = LogManager.getLogger();
@@ -42,6 +45,34 @@
private ConcurrentLinkedQueue<BlockPosition> y;
public boolean d;
+ // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
+ private int neighbors = 0x1 << 12;
@@ -44,12 +44,11 @@
+
public Chunk(World world, int i, int j) {
this.sections = new ChunkSection[16];
this.f = new byte[256];
@@ -61,8 +92,15 @@
this.g = new byte[256];
@@ -62,8 +93,14 @@
Arrays.fill(this.g, -999);
Arrays.fill(this.f, (byte) -1);
+
Arrays.fill(this.h, -999);
Arrays.fill(this.g, (byte) -1);
+ // CraftBukkit start
+ this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
}
@@ -61,7 +60,7 @@
public Chunk(World world, ChunkSnapshot chunksnapshot, int i, int j) {
this(world, i, j);
short short0 = 256;
@@ -463,7 +501,8 @@
@@ -466,7 +503,8 @@
}
}
@@ -71,22 +70,22 @@
block.onPlace(this.world, blockposition, iblockdata);
}
@@ -544,7 +583,11 @@
@@ -547,7 +585,11 @@
int j = MathHelper.floor(entity.locZ / 16.0D);
if (i != this.locX || j != this.locZ) {
- Chunk.d.warn("Wrong location! (" + i + ", " + j + ") should be (" + this.locX + ", " + this.locZ + "), " + entity, new Object[] { entity});
- 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.d.warn("Wrong location! (" + i + ", " + j + ") should be (" + this.locX + ", " + this.locZ + "), " + entity, new Object[] { entity});
+ // 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();
}
@@ -597,7 +640,15 @@
}
@@ -602,7 +644,15 @@
@Nullable
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
- TileEntity tileentity = (TileEntity) this.tileEntities.get(blockposition);
+ // CraftBukkit start
@@ -101,7 +100,7 @@
if (tileentity == null) {
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
@@ -632,6 +683,13 @@
@@ -637,6 +687,13 @@
tileentity.z();
this.tileEntities.put(blockposition, tileentity);
@@ -115,7 +114,7 @@
}
}
@@ -675,7 +733,21 @@
@@ -680,7 +737,21 @@
}
for (int i = 0; i < this.entitySlices.length; ++i) {
@@ -138,7 +137,7 @@
}
}
@@ -733,8 +805,8 @@
@@ -738,8 +809,8 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -149,7 +148,7 @@
}
}
}
@@ -797,6 +869,29 @@
@@ -802,6 +873,29 @@
} else {
this.o();
chunkgenerator.recreateStructures(this.locX, this.locZ);