Strainers cause a lot of network congestion
quat1024 opened this issue ยท 2 comments
Strainers, if they are waterlogged and ready to work, always call markDirty
from tick
:
BaseBlockEntity always calls markForUpdate
from markDirty
:
And markForUpdate
causes a packet to be dispatched to nearby players, so just like that, 20 packets per second per strainer :(
It looks like barrels also sync in both branches of an if/else:
I understand that markDirty
should be called because timers are being ticked down earlier in these tickers, but it should probably not result in a full sync of the entire NBT tag to clients !
I'm writing a packet logger and strainer syncs are one of the most commonly received packets across all received packets at Blanketcon. Fireblanket includes an optimization that prevents a block entity from syncing the same NBT tag twice in a row, but since these tags include the ticking-down timer, that optimization can't kick in :(