Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Hopefully fix entity tracker problems
Browse files Browse the repository at this point in the history
  • Loading branch information
windcolor-dev committed Sep 27, 2023
1 parent ed62037 commit c21c42d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import ga.windpvp.windspigot.async.AsyncUtil;
import ga.windpvp.windspigot.config.WindSpigotConfig;
import me.rastrian.dev.utils.IndexedLinkedHashSet;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.EntityTracker;
import net.minecraft.server.EntityTrackerEntry;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.WorldServer;

public class MultithreadedEntityTracker extends EntityTracker {
Expand Down Expand Up @@ -43,6 +45,9 @@ public void updatePlayers() {
e.printStackTrace();
}
worldServer.ticker.getLatch().reset();
for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
player.playerConnection.sendQueuedPackets();
}
}

public static ExecutorService getExecutor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import co.aikar.timings.SpigotTimings;
import ga.windpvp.windspigot.config.WindSpigotConfig;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.WorldServer;

Expand Down Expand Up @@ -60,6 +61,9 @@ private void tickWorlds() {
ticker.worldserver.timings.tracker.stopTiming();
ticker.getLatch().reset();
}
for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
player.playerConnection.sendQueuedPackets();
}
}

// Move BukkitScheduler stuff here so async entity tracking does not interfere
Expand Down

0 comments on commit c21c42d

Please sign in to comment.