Update code from Leaves

This commit is contained in:
Helvetica Volubi
2025-10-22 11:34:52 +08:00
parent 83e7718346
commit 21e9299352
@@ -255,10 +255,6 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
}
loggerPlayers.forEach((player, list) -> {
if (list.isEmpty()) {
return;
}
CompoundTag nbt = new CompoundTag();
for (DataLogger.Type type : list) {
Tag data = DATA.get(type, player);
@@ -267,7 +263,9 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
DATA.remove(type, player);
}
}
sendPacket(player, new HudDataPayload(HudDataPayloadType.PACKET_S2C_DATA_LOGGER_TICK, nbt));
if (!nbt.isEmpty()) {
sendPacket(player, new HudDataPayload(HudDataPayloadType.PACKET_S2C_DATA_LOGGER_TICK, nbt));
}
});
}