Is your feature request related to a problem? Please describe.
Optimize Vis Relay networks to be TPS friendly:
https://spark.lucko.me/Y9iyvDRX5E
Describe the solution you'd like
Refactor relays to have parent and child connections stored in a separate class much like Gadomany's Jar Networks.
Have 2 lists in the network:
Set<TileVisRelay> children = new HashSet<TileVisRelay>(); // To check if the network is intact, else refresh connections
Set<TileVisRelay> providers = new HashSet<TileVisRelay>(); // To provide the Vis Relays that are in range of a TileVisNode.isSource()
So instead VisNetHandler.drainVis needlessly cascading through all relays with VisNetHandler.getAllChildren() it just accesses those that have direct access to vis sources with providers.
Refreshing connections resets all VisRelays.
VisRelays within a TileVisNode.isSource() will initiate the creation of a new network if it does not have one.
These Vis Relays will connect to nearby VisRelays, thereby integrating them into its VisRelayNetwork.
This process continues recursively, ensuring that each connected VisRelay updates and further connects to additional VisRelays within range.
When multiple VisRelayNetwork connect to one another, the smallest gets absorbed by the largest, which adopts all of its children.
Describe alternatives you've considered
Adding mirrors that extend the range of TileVisNode as long as these are not are not instances of TileVisRelay (hence not making even more cascading lag).
That's a bandaid to a bigger issue but I might get to do it soon.
Additional context
This change would allow to fix #17 as network refreshes would update the parents of VisRelay.
This whole proposal is already a tall order and the fact that it needs to be done through mixins/asm makes it a needlessly convoluted task.
I would want to take this on with someone who is already closely familiar with TC4 code and a better coder than myself.
Your expertise would be invaluable in executing this improvement effectively and in a timely manner.
I look forward to your views and opinions on this proposal.
Is your feature request related to a problem? Please describe.
Optimize Vis Relay networks to be TPS friendly:
https://spark.lucko.me/Y9iyvDRX5E
Describe the solution you'd like
Refactor relays to have parent and child connections stored in a separate class much like Gadomany's Jar Networks.
Have 2 lists in the network:
Set<TileVisRelay> children = new HashSet<TileVisRelay>();// To check if the network is intact, else refresh connectionsSet<TileVisRelay> providers = new HashSet<TileVisRelay>();// To provide the Vis Relays that are in range of a TileVisNode.isSource()So instead
VisNetHandler.drainVisneedlessly cascading through all relays withVisNetHandler.getAllChildren()it just accesses those that have direct access to vis sources withproviders.Refreshing connections resets all VisRelays.
VisRelays within a
TileVisNode.isSource()will initiate the creation of a new network if it does not have one.These Vis Relays will connect to nearby VisRelays, thereby integrating them into its VisRelayNetwork.
This process continues recursively, ensuring that each connected VisRelay updates and further connects to additional VisRelays within range.
When multiple VisRelayNetwork connect to one another, the smallest gets absorbed by the largest, which adopts all of its children.
Describe alternatives you've considered
Adding mirrors that extend the range of
TileVisNodeas long as these are not are not instances ofTileVisRelay(hence not making even more cascading lag).That's a bandaid to a bigger issue but I might get to do it soon.
Additional context
This change would allow to fix #17 as network refreshes would update the parents of VisRelay.
This whole proposal is already a tall order and the fact that it needs to be done through mixins/asm makes it a needlessly convoluted task.
I would want to take this on with someone who is already closely familiar with TC4 code and a better coder than myself.
Your expertise would be invaluable in executing this improvement effectively and in a timely manner.
I look forward to your views and opinions on this proposal.