Skip to content

Commit

Permalink
Move check
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Dec 12, 2024
1 parent 4b40df5 commit 6f79918
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion patches/net/minecraft/server/level/ChunkMap.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
+ ChunkHolder holder = this.visibleChunkMap.get(entry.getLongKey());
+ if (holder != null && !entry.getValue().isEmpty()) {
+ var chunk = holder.getTickingChunk();
+ if (chunk != null && !list.contains(chunk)) {
+ if (chunk != null) {
+ list.add(chunk);
+ }
+ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
ChunkAccess chunkaccess1 = chunkholder.getChunkIfPresent(ChunkStatus.FULL);
if (chunkaccess1 != null) {
this.storeInCache(i, chunkaccess1, ChunkStatus.FULL);
@@ -388,6 +_,7 @@
@@ -384,10 +_,11 @@
private void collectTickingChunks(List<LevelChunk> p_363421_) {
this.chunkMap.forEachSpawnCandidateChunk(p_381767_ -> {
LevelChunk levelchunk = p_381767_.getTickingChunk();
- if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_381767_.getPos())) {
+ if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_381767_.getPos()) && !this.distanceManager.shouldForceTicks(p_381767_.getPos().toLong())) { // Neo: we add force ticked chunks in the list below
p_363421_.add(levelchunk);
}
});
Expand Down

0 comments on commit 6f79918

Please sign in to comment.