DDSS2-NetGuard-1.4.jar
Curse Maven Snippet
What's new
================================================================================
DDSS2 NetGuard 1.4:
================================================================================
In Short:
-This NetGuard patch significantly improves multiplayer safety while retaining the original purpose of NetGuard: reducing excessive repeat packet traffic
from problematic or overly chatty mods.
The Long Version:
Networking / Throttling Rewrite:
Completely reworked NetGuard’s packet throttling system for safer multiplayer behavior.
Throttling is now handled per actual NetworkManager connection instead of relying on a potentially shared/global fallback.
One player’s packet traffic can no longer consume another player’s throttle window.
Removed the old PacketTarget reflection-based player detection entirely.
NetGuard now captures the original Forge message during SimpleChannel dispatch and applies the final throttle at the actual connection send boundary.
Improved Safety:
Added exact IPacket instance verification to prevent unrelated or nested packet sends from being throttled accidentally.
Only the exact encoded packet associated with the active SimpleChannel message may now be suppressed.
Unrelated packets automatically fail open and are sent normally.
Added proper ThreadLocal stack handling for nested network sends.
Thread-local state is always cleaned up using finally, preventing stale send contexts.
Configuration:
Existing throttle values remain compatible with previous configurations.
Throttle intervals are now documented correctly as 50 ms wall-clock units instead of misleading Minecraft “ticks.”
Example:
2 = 100 ms
10 = 500 ms
20 = 1 second
100 = 5 seconds
Invalid regexes, malformed rules, and invalid intervals now produce warnings instead of being silently ignored.
Cleanup:
Removed obsolete reflection/accessor logic.
Simplified per-player state handling into direct per-connection tracking.
Connection throttle state is cleaned up when players disconnect.
This mod has no additional files

