Add network signal insulators
Description
A feature for energy and cargo networks to stop nodes from connecting.
Proposed changes
Add 2 items, 1 for energy and 1 for cargo, that you can place in between network nodes to stop them form connecting. To accomplish this the following is necessary:
- Add
INSULATORto the network and energy component enums to classify them. - Stop discovering neighbors in the current direction if an insulator is found.
- If an insulator is placed inside the network, rebuild it.
- if an insulator is broken inside the network update all its neighbors that are connected to the network.
Related Issues (if applicable)
Implements approved suggestion #1652
Checklist
- [x] I have fully tested the proposed changes and promise that they will not break everything into chaos.
- [ ] I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
- [x] I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
- [x] I followed the existing code standards and didn't mess up the formatting.
- [x] I did my best to add documentation to any public classes or methods I added.
- [x] I have added
NonnullandNullableannotations to my methods to indicate their behaviour for null values - [ ] I added sufficient Unit Tests to cover my code.
Your Pull Request was automatically labelled as: "🎈 Feature" Thank you for contributing to this project! ❤️
Slimefun preview build
A Slimefun preview build is available for testing! Commit: 813b55b7
https://preview-builds.walshy.dev/download/Slimefun/3963/813b55b7
Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!
I like this feature, only worried about performance on this. Can we maybe get some testing on performance on it.
Also we need some general testing on this. This is a major change for 2 essential things in Slimefun. We should block this till it has been tested a bunch
Agreed, needs some good testing :)
Can we also get a toggle on this maybe within a gui. I think the reason few years ago was that people wanted this because the matter fabracitor uses so much energy and more machines do these days. A toggle would solve this problem.
Can we also get a toggle on this maybe within a gui. I think the reason few years ago was that people wanted this because the matter fabracitor uses so much energy and more machines do these days. A toggle would solve this problem.
What about right clicking the insulator to enable/disable it?
Also yes, please test this a lot. I have tried my best to break this already, but I would feel a lot safer if someone else tested this as well.
Yes that’s fine by me as well
both cargo and energy insulators seem to be working as intended. my suggestion would be alter the appearance as the only difference is a white dot on the top.
Have you tested this with a large network or small network? Also if anyone if up for designing better textures, please send the file or the base64 encoded string :DD.
i didnt have a large network setup to test on. it was a pretty basic one
Alright, good to know. Maybe someone with a big network setup can also test this a little?