Remove more threading

This commit is contained in:
Kam committed 2023-05-16 17:45:23 -04:00
1 parent 49fab85291
commit f77a2ff101
3 files changed
+10 -15

No files matched your search

+9 -11
View File
@@ -51,17 +51,15 @@ public class Server {
}
public static void sendAssociatedData(final Entity entity, final EnumPacketClient enu, final Object... obs) {
CustomNPCsThreader.runTack(() -> {
ByteBuf buffer = Unpooled.buffer();
try {
if(!fillBuffer(buffer, enu, obs))
return;
TargetPoint point = new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 60);
CustomNpcs.Channel.sendToAllAround(new FMLProxyPacket(buffer,"CustomNPCs"), point);
} catch (IOException e) {
e.printStackTrace();
}
});
ByteBuf buffer = Unpooled.buffer();
try {
if(!fillBuffer(buffer, enu, obs))
return;
TargetPoint point = new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 60);
CustomNpcs.Channel.sendToAllAround(new FMLProxyPacket(buffer,"CustomNPCs"), point);
} catch (IOException e) {
e.printStackTrace();
}
}
public static void sendToAll(EnumPacketClient enu, Object... obs) {
ByteBuf buffer = Unpooled.buffer();