[Bug]: Ad Astra Oxygen Distributors and Gravity Normalizers send a load of data.
Luviam opened this issue · 4 comments
Bug Description
Oxygen Distributors and Gravity Normalizers send a ton of internet data which can lag your game the same way DDos attacks lag games. NOTE: I'm on a dedicated forge server.
Short video I made to explain the issue a bit better and to show off data spikes. (I've censored some info for privacy reasons)
https://youtu.be/OHvV-aAnZv0
How to Reproduce?
- Place down a gravity normalizer or oxygen distributor in a very large enclosed space, 6000+ blocks preferably.
- Power and or fuel said gravity normalizer or oxygen distributor
- Watch as the rate/amount of data you're receiving spikes. (Task Manager works fine for viewing the rate of data being received)
Expected Behavior
I Expected the gravity normalizer and or oxygen distributors to not DDos my game lmao.
Version
1.15.9
Mod Loader Version
1.20.1-47.2.19
Mod Loader
Forge
Logs or additional context
No response
Code of Conduct
- I have searched the issue tracker and confirmed that the issue has not been reported
- I have checked the FAQ (if one is present) and my issue is not listed
- I have verified that I am using the latest version of the mod
- I have verified that I have installed all the required dependencies for the mod
- I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
So what's happening here is I kind of forgot that NBT is synced to the client every tick. So the oxygen distributor and gravity normalizer are serializing and deserializing 6,000 (more in your case) block positions every tick. I'll fix it by only sending the block positions to the client when the distributor and normalizer recalculates the positions, which is by default every 100 ticks, which will significantly reduce the amount of data sent.
He Forgor ☠️
But ugh on a serious note, thanks for looking at this! I Can continue expanding my enormous space station now lmao.
ad_astra-forge-1.20.1-1.15.10.zip
I haven't had a chance to test on a dedicated server, but in theory it should function properly now. Let me know if it works!