Update to Minecraft 1.13.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-08-26 12:00:00 +10:00
parent 034c12d001
commit f578d94680
182 changed files with 1891 additions and 1879 deletions

View File

@@ -8,10 +8,10 @@
+
public class Chunk implements IChunkAccess {
private static final Logger e = LogManager.getLogger();
@@ -58,6 +60,35 @@
private int E;
private final AtomicInteger F;
private static final Logger d = LogManager.getLogger();
@@ -57,6 +59,35 @@
private int D;
private final AtomicInteger E;
+ // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
+ private int neighbors = 0x1 << 12;
@@ -44,11 +44,11 @@
+
public Chunk(World world, int i, int j, BiomeBase[] abiomebase, ChunkConverter chunkconverter, TickList<Block> ticklist, TickList<FluidType> ticklist1, long k) {
this.sections = new ChunkSection[16];
this.h = new boolean[256];
@@ -95,8 +126,16 @@
this.t = ticklist;
this.u = ticklist1;
this.A = k;
this.g = new boolean[256];
@@ -94,8 +125,16 @@
this.s = ticklist;
this.t = ticklist1;
this.z = k;
+ // CraftBukkit start
+ this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
+ this.chunkKey = ChunkCoordIntPair.a(this.locX, this.locZ);
@@ -62,7 +62,7 @@
public Chunk(World world, ProtoChunk protochunk, int i, int j) {
this(world, i, j, protochunk.getBiomeIndex(), protochunk.v(), protochunk.n(), protochunk.o(), protochunk.m());
@@ -136,14 +175,15 @@
@@ -135,14 +174,15 @@
HeightMap.Type heightmap_type = (HeightMap.Type) iterator.next();
if (heightmap_type.c() == HeightMap.Use.LIVE_WORLD) {
@@ -74,13 +74,13 @@
}
}
this.y = true;
this.x = true;
this.a(ChunkStatus.FULLCHUNK);
+ this.newChunk = true; // CraftBukkit
}
public Set<BlockPosition> t() {
@@ -474,7 +514,8 @@
@@ -473,7 +513,8 @@
}
}
@@ -90,7 +90,7 @@
iblockdata.onPlace(this.world, blockposition, iblockdata1);
}
@@ -654,7 +695,12 @@
@@ -653,7 +694,12 @@
@Nullable
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
@@ -104,7 +104,7 @@
if (tileentity == null) {
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
@@ -689,6 +735,13 @@
@@ -688,6 +734,13 @@
tileentity.z();
this.tileEntities.put(blockposition, tileentity);
@@ -118,8 +118,8 @@
}
}
@@ -719,6 +772,17 @@
this.world.a((Collection) entityslice);
@@ -720,6 +773,17 @@
}));
}
+ // CraftBukkit start
@@ -136,7 +136,7 @@
}
public void removeEntities() {
@@ -735,9 +799,21 @@
@@ -736,9 +800,21 @@
int i = aentityslice.length;
for (int j = 0; j < i; ++j) {
@@ -154,13 +154,13 @@
+ }
+ }
- this.world.c((Collection) entityslice);
+ this.world.c(newList);
- this.world.b((Collection) entityslice);
+ this.world.b((Collection) newList);
+ // CraftBukkit end
}
}
@@ -799,8 +875,8 @@
@@ -800,8 +876,8 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -171,37 +171,37 @@
}
}
}
@@ -1006,13 +1082,13 @@
@@ -1007,13 +1083,13 @@
@Nullable
public LongSet b(String s) {
- return (LongSet) this.r.computeIfAbsent(s, (s) -> {
+ return (LongSet) this.r.computeIfAbsent(s, (s1) -> { // CraftBukkit - decompile error
- return (LongSet) this.q.computeIfAbsent(s, (s) -> {
+ return (LongSet) this.q.computeIfAbsent(s, (s1) -> { // CraftBukkit - decompile error
return new LongOpenHashSet();
});
}
public void a(String s, long i) {
- ((LongSet) this.r.computeIfAbsent(s, (s) -> {
+ ((LongSet) this.r.computeIfAbsent(s, (s1) -> { // CraftBukkit - decompile error
- ((LongSet) this.q.computeIfAbsent(s, (s) -> {
+ ((LongSet) this.q.computeIfAbsent(s, (s1) -> { // CraftBukkit - decompile error
return new LongOpenHashSet();
})).add(i);
}
@@ -1061,14 +1137,14 @@
}
if (this.t instanceof ProtoChunkTickList) {
- ((ProtoChunkTickList) this.t).a(this.world.I(), (blockposition) -> {
if (this.s instanceof ProtoChunkTickList) {
- ((ProtoChunkTickList) this.s).a(this.world.J(), (blockposition) -> {
- return this.world.getType(blockposition).getBlock();
+ ((ProtoChunkTickList<Block>) this.t).a(this.world.I(), (blockposition1) -> { // CraftBukkit - decompile error
+ ((ProtoChunkTickList<Block>) this.s).a(this.world.J(), (blockposition1) -> { // CraftBukkit - decompile error
+ return this.world.getType(blockposition1).getBlock();
});
}
if (this.u instanceof ProtoChunkTickList) {
- ((ProtoChunkTickList) this.u).a(this.world.H(), (blockposition) -> {
if (this.t instanceof ProtoChunkTickList) {
- ((ProtoChunkTickList) this.t).a(this.world.I(), (blockposition) -> {
- return this.world.b(blockposition).c();
+ ((ProtoChunkTickList<FluidType>) this.u).a(this.world.H(), (blockposition1) -> { // CraftBukkit - decompile error
+ ((ProtoChunkTickList<FluidType>) this.t).a(this.world.I(), (blockposition1) -> { // CraftBukkit - decompile error
+ return this.world.b(blockposition1).c();
});
}