Improve Light Queue and force enable it for all
There is no reason for the light queue to even be an option. This enables the light queue for everyone. This also improves the "can we still tick" time logic to always check before running a light operation. previously, we always executed at least 10 on the first world (but not other worlds...), but we are seeing light take up some heavy time, so improving that for now. I've now also improved recheck gaps logic to happen at the end of all single block updates This also prevents multiple gap checks, as previously if a tick skipped the gaps check, the next tick would end up re-adding the entry again, resulting in multiple gap checks. This now just sets a marker "We need to recheck gaps" and will only occur once. This also should reduce chunk loads, as previously, we checked if the neighbor chunks were loaded for the gap check, however those neighbor chunks might of unloaded before the light queue operation actually ran. Now, the neighbor chunk is done when the gap check is being done, so it should avoid loading chunks. Fixes #1466 Fixes #1431
Dieser Commit ist enthalten in:
Ursprung
b6c3d89496
Commit
e07e0cb3ca
@ -1,4 +1,4 @@
|
||||
From 3d33437ccf59ffaab3dd7b23e615245d9f4b2882 Mon Sep 17 00:00:00 2001
|
||||
From 9cf6515af10a67c0778bbd697d12254907ad766a Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Wed, 2 Mar 2016 00:52:31 -0600
|
||||
Subject: [PATCH] Lighting Queue
|
||||
@ -28,7 +28,7 @@ index 145cb274b0..eff9dcf54f 100644
|
||||
|
||||
public static Timing getTickList(WorldServer worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 39d565db1f..f0d1ae630e 100644
|
||||
index 39d565db1f..9fd1bde0ef 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -130,4 +130,10 @@ public class PaperWorldConfig {
|
||||
@ -36,16 +36,25 @@ index 39d565db1f..f0d1ae630e 100644
|
||||
log("Top of the nether void damage: " + netherVoidTopDamage);
|
||||
}
|
||||
+
|
||||
+ public boolean queueLightUpdates;
|
||||
+ public boolean queueLightUpdates = true; // This doesn't need to be configurable, it's not buggy.
|
||||
+ private void queueLightUpdates() {
|
||||
+ queueLightUpdates = getBoolean("queue-light-updates", false);
|
||||
+ log("Lighting Queue enabled: " + queueLightUpdates);
|
||||
+ //queueLightUpdates = getBoolean("queue-light-updates", false);
|
||||
+ //log("Lighting Queue enabled: " + queueLightUpdates);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 4622e92b05..d4bebddab0 100644
|
||||
index 4622e92b05..703c377f93 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -38,7 +38,7 @@ public class Chunk implements IChunkAccess {
|
||||
public final Map<HeightMap.Type, HeightMap> heightMap;
|
||||
public final int locX;
|
||||
public final int locZ;
|
||||
- private boolean l;
|
||||
+ private boolean l; public boolean needsGapCheck() { return l; } // Paper - OBFHELPER
|
||||
private final ChunkConverter m;
|
||||
public final Map<BlockPosition, TileEntity> tileEntities;
|
||||
public final List<Entity>[] entitySlices; // Spigot
|
||||
@@ -90,6 +90,7 @@ public class Chunk implements IChunkAccess {
|
||||
return removed;
|
||||
}
|
||||
@ -54,21 +63,15 @@ index 4622e92b05..d4bebddab0 100644
|
||||
// Paper end
|
||||
public boolean areNeighborsLoaded(final int radius) {
|
||||
switch (radius) {
|
||||
@@ -280,6 +281,13 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -277,6 +278,7 @@ public class Chunk implements IChunkAccess {
|
||||
this.l = true;
|
||||
}
|
||||
|
||||
+ private void recheckGaps(boolean flag) { g(flag); } // Paper - OBFHELPER
|
||||
private void g(boolean flag) {
|
||||
this.world.methodProfiler.a("recheckGaps");
|
||||
if (this.world.areChunksLoaded(new BlockPosition(this.locX * 16 + 8, 0, this.locZ * 16 + 8), 16)) {
|
||||
+ this.runOrQueueLightUpdate(() -> recheckGaps(flag)); // Paper - Queue light update
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void recheckGaps(boolean flag) {
|
||||
+ if (true) {
|
||||
+ // Paper end
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
for (int j = 0; j < 16; ++j) {
|
||||
if (this.g[i + j * 16]) {
|
||||
@@ -530,6 +538,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -530,6 +532,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (flag1) {
|
||||
this.initLighting();
|
||||
} else {
|
||||
@ -76,7 +79,7 @@ index 4622e92b05..d4bebddab0 100644
|
||||
int i1 = iblockdata.b(this.world, blockposition);
|
||||
int j1 = iblockdata1.b(this.world, blockposition);
|
||||
|
||||
@@ -537,6 +546,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -537,6 +540,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i1 != j1 && (i1 < j1 || this.getBrightness(EnumSkyBlock.SKY, blockposition) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 0)) {
|
||||
this.c(i, k);
|
||||
}
|
||||
@ -84,6 +87,26 @@ index 4622e92b05..d4bebddab0 100644
|
||||
}
|
||||
|
||||
TileEntity tileentity;
|
||||
@@ -974,10 +978,16 @@ public class Chunk implements IChunkAccess {
|
||||
return false;
|
||||
}
|
||||
|
||||
- public void d(boolean flag) {
|
||||
- if (this.l && this.world.worldProvider.g() && !flag) {
|
||||
- this.g(this.world.isClientSide);
|
||||
+ // Paper start
|
||||
+ private boolean shouldRecheckGaps = false;
|
||||
+ public void doGapCheck() {
|
||||
+ if (shouldRecheckGaps) {
|
||||
+ this.recheckGaps(false);
|
||||
+ shouldRecheckGaps = false;
|
||||
}
|
||||
+ }
|
||||
+ public void d(boolean flag) {
|
||||
+ shouldRecheckGaps = this.needsGapCheck() && this.world.worldProvider.hasNaturalLight() && !flag; // Paper
|
||||
|
||||
this.u = true;
|
||||
|
||||
@@ -1307,6 +1317,16 @@ public class Chunk implements IChunkAccess {
|
||||
return this.D == 8;
|
||||
}
|
||||
@ -136,10 +159,10 @@ index d6ea4ae532..5086fe4027 100644
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java
|
||||
new file mode 100644
|
||||
index 0000000000..60562f1fd2
|
||||
index 0000000000..f3d6eb7694
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java
|
||||
@@ -0,0 +1,92 @@
|
||||
@@ -0,0 +1,91 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import co.aikar.timings.Timing;
|
||||
@ -149,12 +172,8 @@ index 0000000000..60562f1fd2
|
||||
+
|
||||
+class PaperLightingQueue {
|
||||
+ private static final long MAX_TIME = (long) (1000000000 / 20 * .95);
|
||||
+ private static int updatesThisTick;
|
||||
+
|
||||
+
|
||||
+ static void processQueue(long curTime) {
|
||||
+ updatesThisTick = 0;
|
||||
+
|
||||
+ final long startTime = System.nanoTime();
|
||||
+ final long maxTickTime = MAX_TIME - (startTime - curTime);
|
||||
+
|
||||
@ -165,10 +184,11 @@ index 0000000000..60562f1fd2
|
||||
+ }
|
||||
+
|
||||
+ ObjectCollection<Chunk> loadedChunks = ((WorldServer) world).getChunkProviderServer().chunks.values();
|
||||
+ for (Chunk chunk : loadedChunks.toArray(new Chunk[loadedChunks.size()])) {
|
||||
+ for (Chunk chunk : loadedChunks.toArray(new Chunk[0])) {
|
||||
+ if (chunk.lightingQueue.processQueue(startTime, maxTickTime)) {
|
||||
+ break START;
|
||||
+ }
|
||||
+ chunk.doGapCheck();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
@ -195,12 +215,10 @@ index 0000000000..60562f1fd2
|
||||
+ try (Timing ignored = chunk.world.timings.lightingQueueTimer.startTiming()) {
|
||||
+ Runnable lightUpdate;
|
||||
+ while ((lightUpdate = this.poll()) != null) {
|
||||
+ lightUpdate.run();
|
||||
+ if (startTime > 0 && ++PaperLightingQueue.updatesThisTick % 10 == 0 && PaperLightingQueue.updatesThisTick > 10) {
|
||||
+ if (System.nanoTime() - startTime > maxTickTime) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (startTime > 0 && isOutOfTime(maxTickTime, System.nanoTime() - startTime)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ lightUpdate.run();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ -231,6 +249,10 @@ index 0000000000..60562f1fd2
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private static boolean isOutOfTime(long maxTickTime, long l) {
|
||||
+ return l > maxTickTime;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 499d64ea2c..e06da6bef9 100644
|
||||
@ -245,6 +267,19 @@ index 499d64ea2c..e06da6bef9 100644
|
||||
this.methodProfiler.e();
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
||||
index 517b1e7124..53ce7d5e11 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
||||
@@ -7,7 +7,7 @@ public abstract class WorldProvider {
|
||||
protected World b;
|
||||
protected boolean c;
|
||||
protected boolean d;
|
||||
- protected boolean e;
|
||||
+ protected boolean e; public boolean hasNaturalLight() { return e; } // Paper - OBFHELPER
|
||||
protected final float[] f = new float[16];
|
||||
private final float[] g = new float[4];
|
||||
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 07cd7c6cb6ebf9dabf473e6f87e56756bb943d51 Mon Sep 17 00:00:00 2001
|
||||
From 0d4bbe55a64c6a48f3a3416166665d87c4112ac0 Mon Sep 17 00:00:00 2001
|
||||
From: DoctorDark <doctordark11@gmail.com>
|
||||
Date: Wed, 16 Mar 2016 02:21:39 -0500
|
||||
Subject: [PATCH] Configurable end credits
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 4b36a0f053..53921b381e 100644
|
||||
index 9fd1bde0ef..29d5f30545 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -136,4 +136,10 @@ public class PaperWorldConfig {
|
||||
queueLightUpdates = getBoolean("queue-light-updates", false);
|
||||
log("Lighting Queue enabled: " + queueLightUpdates);
|
||||
//queueLightUpdates = getBoolean("queue-light-updates", false);
|
||||
//log("Lighting Queue enabled: " + queueLightUpdates);
|
||||
}
|
||||
+
|
||||
+ public boolean disableEndCredits;
|
||||
@ -20,7 +20,7 @@ index 4b36a0f053..53921b381e 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 3112ee5453..9f23c0d2c2 100644
|
||||
index 09e2859c4a..95ab3d2cda 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -41,5 +41,5 @@ index 3112ee5453..9f23c0d2c2 100644
|
||||
this.cx = true;
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From abe0eee68d380641a40195a483dceb26caa084e9 Mon Sep 17 00:00:00 2001
|
||||
From e61e80dd98e4bd16ff5d3277d7d7666b248eedca Mon Sep 17 00:00:00 2001
|
||||
From: CullanP <cullanpage@gmail.com>
|
||||
Date: Thu, 3 Mar 2016 02:13:38 -0600
|
||||
Subject: [PATCH] Avoid hopper searches if there are no items
|
||||
@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
|
||||
Combined, this adds up a lot.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index d4bebddab..d41cd7a6e 100644
|
||||
index 703c377f93..a04a296172 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -91,6 +91,10 @@ public class Chunk implements IChunkAccess {
|
||||
@ -28,7 +28,7 @@ index d4bebddab..d41cd7a6e 100644
|
||||
// Paper end
|
||||
public boolean areNeighborsLoaded(final int radius) {
|
||||
switch (radius) {
|
||||
@@ -691,6 +695,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -685,6 +689,11 @@ public class Chunk implements IChunkAccess {
|
||||
entity.ag = this.locZ;
|
||||
this.entitySlices[k].add(entity);
|
||||
// Paper start
|
||||
@ -40,7 +40,7 @@ index d4bebddab..d41cd7a6e 100644
|
||||
entity.setCurrentChunk(this);
|
||||
entityCounts.increment(entity.getMinecraftKeyString());
|
||||
// Paper end
|
||||
@@ -716,6 +725,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -710,6 +719,11 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
@ -52,7 +52,7 @@ index d4bebddab..d41cd7a6e 100644
|
||||
entity.setCurrentChunk(null);
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
// Paper end
|
||||
@@ -918,6 +932,15 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -912,6 +926,15 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[k].isEmpty()) {
|
||||
Iterator iterator = this.entitySlices[k].iterator();
|
||||
|
||||
@ -68,7 +68,7 @@ index d4bebddab..d41cd7a6e 100644
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
|
||||
@@ -954,7 +977,18 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -948,7 +971,18 @@ public class Chunk implements IChunkAccess {
|
||||
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
|
||||
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
||||
|
||||
@ -88,5 +88,5 @@ index d4bebddab..d41cd7a6e 100644
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
--
|
||||
2.18.0
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 65c9df6d439014bcebe771bfb9ad883d88766070 Mon Sep 17 00:00:00 2001
|
||||
From 14083c3e9a3f5e184795d82f42a51a3541b4dbd9 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 03:15:41 -0600
|
||||
Subject: [PATCH] Add exception reporting event
|
||||
@ -50,7 +50,7 @@ index 0000000000..93397188b7
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index d41cd7a6e9..68f8459861 100644
|
||||
index a04a296172..ab579b9052 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -60,7 +60,7 @@ index d41cd7a6e9..68f8459861 100644
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -426,6 +427,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -420,6 +421,7 @@ public class Chunk implements IChunkAccess {
|
||||
return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k));
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ index d41cd7a6e9..68f8459861 100644
|
||||
public IBlockData getType(BlockPosition blockposition) {
|
||||
return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
}
|
||||
@@ -809,10 +811,15 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -803,10 +805,15 @@ public class Chunk implements IChunkAccess {
|
||||
this.tileEntities.remove(blockposition);
|
||||
// Paper end
|
||||
} else {
|
||||
@ -239,7 +239,7 @@ index e649d662ae..560edb523f 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index fbcdf9ecaf..8aa8d40cb4 100644
|
||||
index 65e84b666f..19eb905979 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8a51de86a66826f23e215c402a36e92d4fc84894 Mon Sep 17 00:00:00 2001
|
||||
From 9b89ac214dad604784dbbe857ea7a1941f2a2fdc Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 20:16:03 -0400
|
||||
Subject: [PATCH] Add World Util Methods
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 68f8459861..dcd122d8b5 100644
|
||||
index ab579b9052..b006282f38 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -639,6 +639,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -633,6 +633,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 563bf91958f3a6f200cc977abe04ad5bd92dd388 Mon Sep 17 00:00:00 2001
|
||||
From a13d2700664c3333e72da26c2ea598c4cad882f2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 02:07:55 -0600
|
||||
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
|
||||
@ -52,10 +52,10 @@ index 5ed34cf7e3..f4ed98d2d9 100644
|
||||
public MutableBlockPosition() {
|
||||
this(0, 0, 0);
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index dcd122d8b5..dee1f7bfe9 100644
|
||||
index b006282f38..a36034cc52 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -427,12 +427,24 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -421,12 +421,24 @@ public class Chunk implements IChunkAccess {
|
||||
return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k));
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 01d56a7e10798f739aa8b3f292b93e9d4fddb12e Mon Sep 17 00:00:00 2001
|
||||
From b225523bd1ad1b5fe22d7e364806877b61493bac Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 18 Jun 2016 23:22:12 -0400
|
||||
Subject: [PATCH] Delay Chunk Unloads based on Player Movement
|
||||
@ -17,7 +17,7 @@ This allows servers with smaller worlds who do less long distance exploring to s
|
||||
wasting cpu cycles on saving/unloading/reloading chunks repeatedly.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index f8102d9f0..547ab0962 100644
|
||||
index ab2568ffcb..8918bbf7da 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -288,4 +288,18 @@ public class PaperWorldConfig {
|
||||
@ -40,7 +40,7 @@ index f8102d9f0..547ab0962 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 5390396d5..3c9c3cd41 100644
|
||||
index 7e1a90d904..7f1d0b39cf 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -37,6 +37,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -50,9 +50,9 @@ index 5390396d5..3c9c3cd41 100644
|
||||
+ public Long scheduledForUnload; // Paper - delay chunk unloads
|
||||
public final int locX;
|
||||
public final int locZ;
|
||||
private boolean l;
|
||||
private boolean l; public boolean needsGapCheck() { return l; } // Paper - OBFHELPER
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index b1e690109..9739288b5 100644
|
||||
index b1e6901090..9739288b53 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -306,6 +306,19 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@ -76,7 +76,7 @@ index b1e690109..9739288b5 100644
|
||||
this.chunkScheduler.a(booleansupplier);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index ac0e90eec..3f4a8f21c 100644
|
||||
index ac0e90eeca..3f4a8f21c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -33,8 +33,16 @@ public class PlayerChunk {
|
||||
@ -113,7 +113,7 @@ index ac0e90eec..3f4a8f21c 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index a69d510dd..7b67fa320 100644
|
||||
index a69d510dd1..7b67fa3208 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -460,7 +460,13 @@ public class PlayerChunkMap {
|
||||
@ -132,7 +132,7 @@ index a69d510dd..7b67fa320 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 785f02065..d31101861 100644
|
||||
index 785f020652..d31101861c 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1342,7 +1342,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
@ -151,7 +151,7 @@ index 785f02065..d31101861 100644
|
||||
this.methodProfiler.a(() -> {
|
||||
return String.valueOf(TileEntityTypes.a(tileentity.C()));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 50923951a..8421c397a 100644
|
||||
index 50923951a5..8421c397a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1628,7 +1628,7 @@ public class CraftWorld implements World {
|
||||
@ -164,7 +164,7 @@ index 50923951a..8421c397a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 12040596d..f9bb19fed 100644
|
||||
index 12040596df..f9bb19fed6 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -284,6 +284,11 @@ public class ActivationRange
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 41c8d7f3f017c9bc08a29c044b8b8cb5ff87dc15 Mon Sep 17 00:00:00 2001
|
||||
From dff8b771c79b65f0225427e0fa0ca4d6f9c38feb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 19 Sep 2016 23:16:39 -0400
|
||||
Subject: [PATCH] Auto Save Improvements
|
||||
@ -32,7 +32,7 @@ index aa0e3c757d..c1845d6811 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 547ab09627..78a3188274 100644
|
||||
index 8918bbf7da..015d7fcb5c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -2,6 +2,7 @@ package com.destroystokyo.paper;
|
||||
@ -64,7 +64,7 @@ index 547ab09627..78a3188274 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 3c9c3cd41d..8d1264879b 100644
|
||||
index 7f1d0b39cf..5285bfb409 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -50,9 +50,9 @@ public class Chunk implements IChunkAccess {
|
||||
@ -79,7 +79,7 @@ index 3c9c3cd41d..8d1264879b 100644
|
||||
private int y;
|
||||
private long z;
|
||||
private int A;
|
||||
@@ -1028,11 +1028,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -1022,11 +1022,11 @@ public class Chunk implements IChunkAccess {
|
||||
if (this.v && this.world.getTime() != this.lastSaved || this.x) {
|
||||
return true;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 4f4d6ef8142abef5a025ef5f24c1568518ca72e7 Mon Sep 17 00:00:00 2001
|
||||
From 35c2cb8cce2e2a3c698ccd62abd90ef8aff04f1d Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 5 Oct 2016 16:27:36 -0500
|
||||
Subject: [PATCH] Option to remove corrupt tile entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 78a318827..79260172d 100644
|
||||
index 015d7fcb5c..9ee62da233 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -318,4 +318,9 @@ public class PaperWorldConfig {
|
||||
@ -19,10 +19,10 @@ index 78a318827..79260172d 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 8d1264879..6bbb737df 100644
|
||||
index 5285bfb409..ca6107a5af 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -833,6 +833,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -827,6 +827,12 @@ public class Chunk implements IChunkAccess {
|
||||
"Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16));
|
||||
e.printStackTrace();
|
||||
ServerInternalException.reportInternalException(e);
|
||||
@ -35,7 +35,7 @@ index 8d1264879..6bbb737df 100644
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -842,6 +848,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -836,6 +842,7 @@ public class Chunk implements IChunkAccess {
|
||||
this.h.put(new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z")), nbttagcompound);
|
||||
}
|
||||
|
||||
@ -44,5 +44,5 @@ index 8d1264879..6bbb737df 100644
|
||||
if (this.i) {
|
||||
TileEntity tileentity = (TileEntity) this.tileEntities.remove(blockposition);
|
||||
--
|
||||
2.18.0
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b6161b8cf53fda783f69a0b388b054a8f217cc28 Mon Sep 17 00:00:00 2001
|
||||
From f144da0f68e58501c0d831f61b0838312688b069 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 3 Jul 2018 21:56:23 -0400
|
||||
Subject: [PATCH] InventoryCloseEvent Reason API
|
||||
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 6bbb737df..614fce444 100644
|
||||
index ca6107a5af..9f2a08b03d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -900,7 +900,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -894,7 +894,7 @@ public class Chunk implements IChunkAccess {
|
||||
{
|
||||
if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
|
||||
{
|
||||
@ -19,7 +19,7 @@ index 6bbb737df..614fce444 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -925,7 +925,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -919,7 +919,7 @@ public class Chunk implements IChunkAccess {
|
||||
{
|
||||
if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
|
||||
{
|
||||
@ -29,7 +29,7 @@ index 6bbb737df..614fce444 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 5e13cb064..c7dc6fe0e 100644
|
||||
index 5e13cb0640..c7dc6fe0ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -162,7 +162,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -56,7 +56,7 @@ index 5e13cb064..c7dc6fe0e 100644
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 3644fde3b..68f5842cf 100644
|
||||
index 3644fde3bb..68f5842cfe 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -346,7 +346,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -110,7 +110,7 @@ index 3644fde3b..68f5842cf 100644
|
||||
this.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 4cdf79002..793174c51 100644
|
||||
index 4cdf790029..793174c51b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2055,7 +2055,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@ -123,7 +123,7 @@ index 4cdf79002..793174c51 100644
|
||||
this.player.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 304cae655..6d511b623 100644
|
||||
index 304cae655d..6d511b6230 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -422,7 +422,7 @@ public abstract class PlayerList {
|
||||
@ -136,7 +136,7 @@ index 304cae655..6d511b623 100644
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||
cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 92fe80316..70a4dbe26 100644
|
||||
index 92fe80316f..70a4dbe26b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -412,8 +412,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@ -155,7 +155,7 @@ index 92fe80316..70a4dbe26 100644
|
||||
public boolean isBlocking() {
|
||||
return getHandle().isBlocking();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 40b590da3..f372f19de 100644
|
||||
index 40b590da36..f372f19dec 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -740,7 +740,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -168,7 +168,7 @@ index 40b590da3..f372f19de 100644
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 29d8773f2..ea787a523 100644
|
||||
index 29d8773f2e..ea787a523c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -929,8 +929,19 @@ public class CraftEventFactory {
|
||||
@ -193,5 +193,5 @@ index 29d8773f2..ea787a523 100644
|
||||
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());
|
||||
}
|
||||
--
|
||||
2.16.1.windows.1
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 40ca2e7602f37daf8e67ed9099c64941dfb6597e Mon Sep 17 00:00:00 2001
|
||||
From e9cd3efda6cfbe48f2c343c4efbd63bb2fdfa894 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 03:39:51 -0400
|
||||
Subject: [PATCH] Avoid Chunk Lookups for Entity/TileEntity Current Chunk
|
||||
@ -10,10 +10,10 @@ to the object directly on the Entity/TileEntity object we can directly grab.
|
||||
Use that local value instead to reduce lookups in many hot places.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 614fce4447..e806d13d22 100644
|
||||
index 9f2a08b03d..0dab65c870 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -725,6 +725,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -719,6 +719,7 @@ public class Chunk implements IChunkAccess {
|
||||
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1a9d10661ff39ff804ecff3b146f45b7dd2541fa Mon Sep 17 00:00:00 2001
|
||||
From c6da84012c3f0a1403467ae6f87959436d5906cb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||
@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
||||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index fb2467636a..3aa6f031f3 100644
|
||||
index 01670da006..6a3d92e742 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -433,4 +433,47 @@ public class PaperWorldConfig {
|
||||
@ -85,7 +85,7 @@ index fb2467636a..3aa6f031f3 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index e806d13d22..3bddc5f9b5 100644
|
||||
index 0dab65c870..91049ed20f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -1,5 +1,10 @@
|
||||
@ -106,8 +106,8 @@ index e806d13d22..3bddc5f9b5 100644
|
||||
+ private static final Logger logger = LogManager.getLogger(); // Paper
|
||||
public final int locX;
|
||||
public final int locZ;
|
||||
private boolean l;
|
||||
@@ -693,6 +699,7 @@ public class Chunk implements IChunkAccess {
|
||||
private boolean l; public boolean needsGapCheck() { return l; } // Paper - OBFHELPER
|
||||
@@ -687,6 +693,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i != this.locX || j != this.locZ) {
|
||||
Chunk.d.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity);
|
||||
entity.die();
|
||||
@ -115,7 +115,7 @@ index e806d13d22..3bddc5f9b5 100644
|
||||
}
|
||||
|
||||
int k = MathHelper.floor(entity.locY / 16.0D);
|
||||
@@ -869,6 +876,51 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -863,6 +870,51 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
List entityslice = aentityslice[j]; // Spigot
|
||||
@ -180,7 +180,7 @@ index 7d8f723968..46399cc9b0 100644
|
||||
this.uniqueID = uuid;
|
||||
this.au = this.uniqueID.toString();
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ba1fb577a1..ae7e17231a 100644
|
||||
index ee2cdb897c..956eabd7dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -75,7 +75,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
@ -193,7 +193,7 @@ index ba1fb577a1..ae7e17231a 100644
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
private final List<TileEntity> c = Lists.newArrayList();
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 8e8cf659f8..6579387623 100644
|
||||
index 709f3e525c..2692d0a1b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -41,7 +41,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -239,5 +239,5 @@ index 8e8cf659f8..6579387623 100644
|
||||
logger.error("Overwrote an existing entity " + old + " with " + entity);
|
||||
if (DEBUG_ENTITIES) {
|
||||
--
|
||||
2.18.0
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f73216e0e600cedf96b49f3fc04cbb5e43a2f412 Mon Sep 17 00:00:00 2001
|
||||
From 00d7ab0e1fdd32d6d3f1465e36456f533d0763e9 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 23 Jul 2018 22:18:31 -0400
|
||||
Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 3bddc5f9b..33ce24479 100644
|
||||
index 91049ed20f..66712db2a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -718,6 +718,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -712,6 +712,7 @@ public class Chunk implements IChunkAccess {
|
||||
entity.ag = this.locZ;
|
||||
this.entitySlices[k].add(entity);
|
||||
// Paper start
|
||||
@ -17,7 +17,7 @@ index 3bddc5f9b..33ce24479 100644
|
||||
if (entity instanceof EntityItem) {
|
||||
itemCounts[k]++;
|
||||
} else if (entity instanceof IInventory) {
|
||||
@@ -749,6 +750,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -743,6 +744,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
@ -26,5 +26,5 @@ index 3bddc5f9b..33ce24479 100644
|
||||
itemCounts[i]--;
|
||||
} else if (entity instanceof IInventory) {
|
||||
--
|
||||
2.18.0
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c6e17840efbbe99481a355f085e8044eb0a2fb52 Mon Sep 17 00:00:00 2001
|
||||
From 01a7a706b556bb48887a2e4cf43852373a54619c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 23 Jul 2018 22:44:23 -0400
|
||||
Subject: [PATCH] Add some Debug to Chunk Entity slices
|
||||
@ -9,10 +9,10 @@ This should hopefully avoid duplicate entities ever being created
|
||||
if the entity was to end up in 2 different chunk slices
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 33ce24479..e8af8f419 100644
|
||||
index 66712db2a2..39cbde281b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -716,8 +716,34 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -710,8 +710,34 @@ public class Chunk implements IChunkAccess {
|
||||
entity.ae = this.locX;
|
||||
entity.af = k;
|
||||
entity.ag = this.locZ;
|
||||
@ -48,7 +48,7 @@ index 33ce24479..e8af8f419 100644
|
||||
this.markDirty();
|
||||
if (entity instanceof EntityItem) {
|
||||
itemCounts[k]++;
|
||||
@@ -747,9 +773,13 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -741,9 +767,13 @@ public class Chunk implements IChunkAccess {
|
||||
i = this.entitySlices.length - 1;
|
||||
}
|
||||
// Paper start
|
||||
@ -64,7 +64,7 @@ index 33ce24479..e8af8f419 100644
|
||||
this.markDirty();
|
||||
if (entity instanceof EntityItem) {
|
||||
itemCounts[i]--;
|
||||
@@ -986,6 +1016,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -980,6 +1010,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
// Spigot End
|
||||
entity.setCurrentChunk(null); // Paper
|
||||
@ -73,7 +73,7 @@ index 33ce24479..e8af8f419 100644
|
||||
// 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)
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 9339b3255..f2eb479ad 100644
|
||||
index fdc9d96c27..8951ac8095 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -64,6 +64,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -85,5 +85,5 @@ index 9339b3255..f2eb479ad 100644
|
||||
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
|
||||
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
--
|
||||
2.18.0
|
||||
2.19.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f2d6b77d7f061d9dc7ceb3fce2f58a25f33f3fc0 Mon Sep 17 00:00:00 2001
|
||||
From ae23abdc7f17c83315f4b81e56103f73235179f6 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 3 Aug 2018 22:47:46 -0400
|
||||
Subject: [PATCH] Entity add to world fixes
|
||||
@ -14,10 +14,10 @@ Fix this by differing entity add to world for all entities at the same time
|
||||
the original entity is dead, overwrite it as the logic does for unloaod queued entities.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index e8af8f4196..56c3783412 100644
|
||||
index 39cbde281b..4a39461eb2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -905,6 +905,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -899,6 +899,7 @@ public class Chunk implements IChunkAccess {
|
||||
this.world.a(this.tileEntities.values());
|
||||
List[] aentityslice = this.entitySlices; // Spigot
|
||||
int i = aentityslice.length;
|
||||
@ -25,7 +25,7 @@ index e8af8f4196..56c3783412 100644
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
List entityslice = aentityslice[j]; // Spigot
|
||||
@@ -952,12 +953,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -946,12 +947,11 @@ public class Chunk implements IChunkAccess {
|
||||
thisChunk.put(entity.uniqueID, entity);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
From d64e69f6935741d935029143b1cb8046c2155405 Mon Sep 17 00:00:00 2001
|
||||
From a69c54d35c9703273e6d903e3d543fb7f89d85a7 Mon Sep 17 00:00:00 2001
|
||||
From: stonar96 <minecraft.stonar96@gmail.com>
|
||||
Date: Mon, 20 Aug 2018 03:03:58 +0200
|
||||
Subject: [PATCH] Anti-Xray
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 19f4c61cdc..3acb1ff9fd 100644
|
||||
index 5fddb11774..bafc43f83c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -1,7 +1,10 @@
|
||||
@ -1049,10 +1049,10 @@ index 0000000000..37093419cf
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 56c3783412..f3d9211baa 100644
|
||||
index 4a39461eb2..3a22e69d99 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -541,7 +541,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -535,7 +535,7 @@ public class Chunk implements IChunkAccess {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1061,7 +1061,7 @@ index 56c3783412..f3d9211baa 100644
|
||||
this.sections[j >> 4] = chunksection;
|
||||
flag1 = j >= l;
|
||||
}
|
||||
@@ -641,7 +641,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -635,7 +635,7 @@ public class Chunk implements IChunkAccess {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From c2c5c415ea05a6b591c02a90cefddcbf0fb8d142 Mon Sep 17 00:00:00 2001
|
||||
From c76be36e441abe401391cdebea4b878a36c66deb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 10 Sep 2018 23:56:36 -0400
|
||||
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 1d301dcb70..33f5aa721f 100644
|
||||
index 92101375c4..4f72b1b184 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -488,6 +488,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -482,6 +482,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fca711e6d936513f9b0955d273a9969e5b351190 Mon Sep 17 00:00:00 2001
|
||||
From 87788b37febf210a1c7e65dfee02385c878e80cb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 20 Sep 2018 19:11:33 -0400
|
||||
Subject: [PATCH] MC-134115: Fix Double Chest Conversion Error
|
||||
@ -9,10 +9,10 @@ loss from chunks if they crossed chunk boundries.
|
||||
This fixes the issue.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 33f5aa721f..ca5cd62866 100644
|
||||
index 4f72b1b184..1c4e892aad 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -521,6 +521,26 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -515,6 +515,26 @@ public class Chunk implements IChunkAccess {
|
||||
return this.a(blockposition, iblockdata, flag, true);
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren