Split packets when sending items over network (#107)

Packets are now split into smaller chunks when sent. The packet
size is adjustable in the config.
This commit is contained in:
firenoo authored and GitHub committed 2023-03-23 17:14:14 +01:00
1 parent 6a244c12c4
commit 9c2ef02383
12 files changed
+316 -181

No files matched your search

@@ -17,6 +17,7 @@ public class Config {
public static boolean removeRecipe;
public static boolean blacklistEssentiaGas;
public static double portableCellBattery;
public static int packetSize;
public static void run() {
loadCategory();
@@ -51,7 +52,9 @@ public class Config {
"Blacklist Essentia Gas from Thaumic Energistics, so they won't be stored in Fluid Storage Cells.");
portableCellBattery = Config.get("Fluid Craft for AE2", "Portable Fluid Cell Battery Capacity", 20000D)
.getDouble();
packetSize = Config.get("Fluid Craft for AE2", "packetSize", 256, "Number of items to be sent per packet")
.getInt();
if (packetSize <= 0) packetSize = 256;
if (Config.hasChanged()) Config.save();
}