mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Fix non block ticking chunks not sending block/light updates
Needed to redirect the getTickingChunk call in broadcastChangedChunks to use the chunk to send method.
This commit is contained in:
parent
f7086a34b5
commit
70ccc97b36
@ -26486,13 +26486,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ if (ret != null || !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) {
|
+ if (ret != null || !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) {
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
}
|
||||||
+
|
+
|
||||||
+ final ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder holder = ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler()
|
+ final ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder holder = ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler()
|
||||||
+ .chunkHolderManager.getChunkHolder(chunkX, chunkZ);
|
+ .chunkHolderManager.getChunkHolder(chunkX, chunkZ);
|
||||||
+ if (holder == null) {
|
+ if (holder == null) {
|
||||||
+ return ret;
|
+ return ret;
|
||||||
}
|
+ }
|
||||||
+
|
+
|
||||||
+ return ca.spottedleaf.moonrise.common.PlatformHooks.get().getCurrentlyLoadingChunk(holder.vanillaChunkHolder);
|
+ return ca.spottedleaf.moonrise.common.PlatformHooks.get().getCurrentlyLoadingChunk(holder.vanillaChunkHolder);
|
||||||
+ // Paper end - rewrite chunk system
|
+ // Paper end - rewrite chunk system
|
||||||
@ -26554,15 +26554,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ ret.complete(ChunkResult.of(chunk));
|
+ ret.complete(ChunkResult.of(chunk));
|
||||||
+ }
|
+ }
|
||||||
+ };
|
+ };
|
||||||
+
|
|
||||||
|
- private boolean chunkAbsent(@Nullable ChunkHolder holder, int maxLevel) {
|
||||||
|
- return holder == null || holder.oldTicketLevel > maxLevel; // CraftBukkit using oldTicketLevel for isLoaded checks
|
||||||
+ ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().scheduleChunkLoad(
|
+ ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().scheduleChunkLoad(
|
||||||
+ chunkX, chunkZ, leastStatus, true,
|
+ chunkX, chunkZ, leastStatus, true,
|
||||||
+ ca.spottedleaf.concurrentutil.util.Priority.HIGHER,
|
+ ca.spottedleaf.concurrentutil.util.Priority.HIGHER,
|
||||||
+ complete
|
+ complete
|
||||||
+ );
|
+ );
|
||||||
|
+
|
||||||
- private boolean chunkAbsent(@Nullable ChunkHolder holder, int maxLevel) {
|
|
||||||
- return holder == null || holder.oldTicketLevel > maxLevel; // CraftBukkit using oldTicketLevel for isLoaded checks
|
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ // can return now
|
+ // can return now
|
||||||
@ -26676,6 +26676,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
} finally {
|
} finally {
|
||||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
||||||
|
- LevelChunk chunk = playerchunk.getTickingChunk();
|
||||||
|
+ LevelChunk chunk = playerchunk.getChunkToSend(); // Paper - rewrite chunk system
|
||||||
|
|
||||||
|
if (chunk != null) {
|
||||||
|
playerchunk.broadcastChanges(chunk);
|
||||||
|
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collectTickingChunks(List<LevelChunk> chunks) {
|
private void collectTickingChunks(List<LevelChunk> chunks) {
|
||||||
|
Loading…
Reference in New Issue
Block a user