Skip to content

Commit cd81085

Browse files
committed
Fix StructureManager lost logic for null levelAccessor
1 parent a18bb5b commit cd81085

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎paper-server/patches/sources/net/minecraft/world/level/StructureManager.java.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
+ // Paper start - Fix swamp hut cat generation deadlock
99
+ return startsForStructure(sectionX, sectionZ, matcher, this.level);
1010
+ }
11-
+ public List<StructureStart> startsForStructure(final int sectionX, final int sectionZ, final Predicate<Structure> matcher, final LevelAccessor level) {
11+
+ public List<StructureStart> startsForStructure(final int sectionX, final int sectionZ, final Predicate<Structure> matcher, final @Nullable LevelAccessor levelAccessor) {
12+
+ Map<Structure, LongSet> allReferences = (levelAccessor == null ? this.level : levelAccessor).getChunk(sectionX, sectionZ, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences();
1213
+ // Paper end - Fix swamp hut cat generation deadlock
13-
+ Map<Structure, LongSet> allReferences = level.getChunk(sectionX, sectionZ, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); // Paper - Fix swamp hut cat generation deadlock
1414
Builder<StructureStart> result = ImmutableList.builder();
1515

1616
for (Entry<Structure, LongSet> entry : allReferences.entrySet()) {

0 commit comments

Comments
 (0)