Skip to content

Commit

Permalink
Fix multithreaded tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jun 13, 2023
1 parent 7aa76e2 commit cf4b330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patches/server/0079-Multithreaded-Tracker.patch
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ index f22261a7192c05d40304d7ecd7b08c2469644426..23d9ad42a121dd5561453d0ee7b51f41
private final int range;
SectionPos lastSectionPos;
- public final Set<ServerPlayerConnection> seenBy = new ReferenceOpenHashSet<>(); // Paper - optimise map impl
+ public final Set<ServerPlayerConnection> seenBy = it.unimi.dsi.fastutil.objects.ReferenceSets.synchronize(new ReferenceOpenHashSet<>()); // Paper - optimise map impl // Mirai - sync
+ public final Set<ServerPlayerConnection> seenBy = it.unimi.dsi.fastutil.objects.ObjectSet.of(((ServerPlayerConnection) it.unimi.dsi.fastutil.objects.ReferenceSets.synchronize(new ReferenceOpenHashSet<>()))); // Paper - optimise map impl // Mirai - sync

public TrackedEntity(Entity entity, int i, int j, boolean flag) {
this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast, this.seenBy); // CraftBukkit
Expand Down

0 comments on commit cf4b330

Please sign in to comment.