mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-04 18:01:17 +01:00
812618deba
Unintended side effects in recent versions, this patch has likely outlived its usefulness. Closes GH-452
49 lines
2.8 KiB
Diff
49 lines
2.8 KiB
Diff
From 58b3bab4987b97c0c963f72537ba7aa87c242ea3 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 0ee8a13..1ec820f 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -1004,25 +1004,25 @@ public class Chunk {
|
|
// CraftBukkit end
|
|
world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper
|
|
world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper
|
|
- 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);
|
|
--
|
|
2.9.3
|
|
|