Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ See the patches list below.
[FalchusSpigot-????] Fix MC-87 map scaling/cloning issues
[FalchusSpigot-????] Fix view distance lookup
[FalchusSpigot-????] Only send Dragon/Wither Death sounds to same world
[FalchusSpigot-????] sendQueuedPackets per-world
[FalchusSpigot-????] Improve NetworkManager

[DashSpigot-0033] Fix SPIGOT-1746: Tile entities may not always tick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public void updatePlayers() {
e.printStackTrace();
}
worldServer.ticker.getLatch().reset();
for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
player.playerConnection.sendQueuedPackets();
for (EntityHuman human : worldServer.players) { // FalchusSpigot - per-world
((EntityPlayer) human).playerConnection.sendQueuedPackets();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
import com.windpvp.windspigot.async.entitytracker.AsyncEntityTracker;
import com.windpvp.windspigot.config.WindSpigotConfig;

import net.minecraft.server.CrashReport;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.NetworkManager;
import net.minecraft.server.PlayerConnection;
import net.minecraft.server.ReportedException;
import net.minecraft.server.WorldServer;
import net.minecraft.server.*;

public class WorldTicker implements Runnable {

Expand Down Expand Up @@ -71,12 +65,14 @@ public void run() {
worldserver.timings.tracker.startTiming(); // Spigot
// this.methodProfiler.b();
// this.methodProfiler.a("tracker");
if (MinecraftServer.getServer().getPlayerList().getPlayerCount() != 0) // Tuinity
if (worldserver.players.size() != 0) // Tuinity // FalchusSpigot - per-world
{
// Tuinity start - controlled flush for entity tracker packets
List<NetworkManager> disabledFlushes = new java.util.ArrayList<>(
MinecraftServer.getServer().getPlayerList().getPlayerCount());
for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
// FalchusSpigot start - per-world
List<NetworkManager> disabledFlushes = new java.util.ArrayList<>(worldserver.players.size());
for (EntityHuman human : worldserver.players) {
EntityPlayer player = (EntityPlayer) human;
// FalchusSpigot end
PlayerConnection connection = player.playerConnection;
if (connection != null) {
connection.networkManager.disableAutomaticFlush();
Expand All @@ -103,4 +99,4 @@ public ResettableLatch getLatch() {
return latch;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ public void updatePlayers() {
entry.update();
}
// WindSpigot start
for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
player.playerConnection.sendQueuedPackets();
for (EntityHuman human : world.players) { // FalchusSpigot - per-world
((EntityPlayer) human).playerConnection.sendQueuedPackets();
}
// WindSpigot end
}
Expand Down
Loading