2018-01-11 06:31:19 +01:00
|
|
|
From 0cf99c270c5b53a3d3a31efaab59b4aa6dbd42b8 Mon Sep 17 00:00:00 2001
|
2016-06-23 04:18:41 +02:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Thu, 12 May 2016 01:55:17 -0400
|
|
|
|
Subject: [PATCH] Do not mark chunks as active for neighbor updates
|
|
|
|
|
|
|
|
Fixes chunk unload issues
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
2017-12-22 22:25:01 +01:00
|
|
|
index ecc76a88..f1bcdef5 100644
|
2016-06-23 04:18:41 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2017-12-22 22:25:01 +01:00
|
|
|
@@ -1007,25 +1007,25 @@ public class Chunk {
|
2016-06-23 04:18:41 +02:00
|
|
|
// CraftBukkit end
|
2016-08-28 02:36:26 +02:00
|
|
|
world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper
|
|
|
|
world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper
|
2016-06-23 04:18:41 +02:00
|
|
|
- Chunk chunk = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ - 1);
|
|
|
|
- Chunk chunk1 = ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ);
|
|
|
|
- Chunk chunk2 = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ + 1);
|
|
|
|
- Chunk chunk3 = ichunkprovider.getLoadedChunkAt(this.locX - 1, this.locZ);
|
|
|
|
+ Chunk chunk = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX, this.locZ - 1); // Paper
|
|
|
|
+ Chunk chunk1 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX + 1, this.locZ); // Paper
|
|
|
|
+ Chunk chunk2 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX, this.locZ + 1); // Paper
|
|
|
|
+ Chunk chunk3 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX - 1, this.locZ); // Paper
|
|
|
|
|
|
|
|
- if (chunk1 != null && chunk2 != null && ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ + 1) != null) {
|
|
|
|
+ if (chunk1 != null && chunk2 != null && MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX + 1, this.locZ + 1) != null) { // Paper
|
|
|
|
this.a(chunkgenerator);
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (chunk3 != null && chunk2 != null && ichunkprovider.getLoadedChunkAt(this.locX - 1, this.locZ + 1) != null) {
|
|
|
|
+ if (chunk3 != null && chunk2 != null && MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX - 1, this.locZ + 1) != null) { // Paper
|
|
|
|
chunk3.a(chunkgenerator);
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (chunk != null && chunk1 != null && ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ - 1) != null) {
|
|
|
|
+ if (chunk != null && chunk1 != null && MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX + 1, this.locZ - 1) != null) { // Paper
|
|
|
|
chunk.a(chunkgenerator);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (chunk != null && chunk3 != null) {
|
|
|
|
- Chunk chunk4 = ichunkprovider.getLoadedChunkAt(this.locX - 1, this.locZ - 1);
|
|
|
|
+ Chunk chunk4 = MCUtil.getLoadedChunkWithoutMarkingActive(ichunkprovider,this.locX - 1, this.locZ - 1); // Paper
|
|
|
|
|
|
|
|
if (chunk4 != null) {
|
|
|
|
chunk4.a(chunkgenerator);
|
|
|
|
--
|
2018-01-11 06:31:19 +01:00
|
|
|
2.14.3
|
2016-06-23 04:18:41 +02:00
|
|
|
|