Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tesla Tower do not establish connections when being placed #16268

Closed
2 of 3 tasks
RealSilverMoon opened this issue May 14, 2024 · 0 comments · Fixed by GTNewHorizons/TecTech#281
Closed
2 of 3 tasks

Tesla Tower do not establish connections when being placed #16268

RealSilverMoon opened this issue May 14, 2024 · 0 comments · Fixed by GTNewHorizons/TecTech#281
Labels
Bug: Minor Status: Triage Issue awaiting triage. Remove once this issue is processed

Comments

@RealSilverMoon
Copy link
Contributor

Your GTNH Discord Username

real_silver_moon

Your Pack Version

2.6.0

Your Server

SP

Java Version

Java 8

Type of Server

Single Player

Your Expectation

Telsa Tower should establish a connection to the Tesla Coil Cover in range.

The Reality

When you place a tesla tower (or the server restart), it does not establish a connection to the Tesla Coil Cover in range. However, if you first place the tower then place the cover, everything is fine.
QQ截图20240514112329
Not connected.
QQ截图20240514112345
Remove the cover...
QQ截图20240514112410
and replace it.

Your Proposal

Caused by:
Tesla tower will try to generateTeslaNodeMap onFirstTick. This method will traversal every ITeslaConnectableSimple that's stored in map once and calculate distance (getTeslaPosition) between the tesla tower and the cover. However, getTeslaPosition() returns posTop, which was initialized on checkMachine(). That method is definitely called after onFirstTick(), and before that it's just (0,0,0). Every distance is calculated by the cover's position and (0,0,0). This happens both when the tower is placed and when the server is started. The latter is fatal for server players.
BTW, another problem related to this is that when you change the distance in tesla tower's GUI, it will not try connecting to the cover farther because the farther cover will only be connected once onFirstTick and it failed on distance check.

Final Checklist

  • I have searched this issue tracker and there is nothing similar already. Posting on a closed issue saying the bug still exists will prompt us to investigate and reopen it once we confirm your report.
  • I can reproduce this problem consistently by follow the exact steps I described above, or this does not need reproducing, e.g. recipe loophole.
  • I have asked other people and they confirm they also have this problem by follow the exact steps I described above, or this does not need reproducing, e.g. recipe loophole.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Minor Status: Triage Issue awaiting triage. Remove once this issue is processed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant