[PERFORMANCE] Change cable updates to event-based
Oxey405 opened this issue ยท 0 comments
Hello,
i've been enjoying this mod for a few months with my friends on a Minecraft server we're having and I've noticed a ton of lag coming from this mod especially because of cable updates happening too frequently.
i've thought of something to mitigate the lag caused by those too-frequent updates ;
instead of calling updateCableNetwork every 20 ticks, you could update it every time a BlockUpdate happens.
See from InventoryConnectorBlockEntity.java:48
Programming this with the neighborUpdate event may optimize the mod's performance in most cases.
I was going to try and implement it myself but I found the 1.20.1 version of the repo a bit to confusing to setup.
I would love to help in implementing this idea myself if you don't have time for it.
Thanks a lot for the mod anyway ; it's been very enjoyable and has massively simplified our storage system.