Final & Synchronized Data sending with slight delays to heavily improve server performance

This commit is contained in:
Kam committed 2023-05-15 20:03:52 -04:00
1 parent ee33a57323
commit cf82314181
8 files changed
+47 -36

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ import java.util.Map;
public class Server {
public static boolean sendData(EntityPlayerMP player, EnumPacketClient enu, Object... obs) {
public static boolean sendData(final EntityPlayerMP player, final EnumPacketClient enu, final Object... obs) {
ByteBuf buffer = Unpooled.buffer();
try {
if(!fillBuffer(buffer, enu, obs))
@@ -58,7 +58,7 @@ public class Server {
return true;
}
public static void sendAssociatedData(Entity entity, EnumPacketClient enu, Object... obs) {
public static void sendAssociatedData(final Entity entity, final EnumPacketClient enu, final Object... obs) {
CustomNPCsScheduler.runTack(() -> {
ByteBuf buffer = Unpooled.buffer();
try {