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

Portable Teleporter GUI Does Not Update Correctly #8178

Closed
UnknownSerhan opened this issue Jul 31, 2024 · 3 comments
Closed

Portable Teleporter GUI Does Not Update Correctly #8178

UnknownSerhan opened this issue Jul 31, 2024 · 3 comments

Comments

@UnknownSerhan
Copy link
Contributor

UnknownSerhan commented Jul 31, 2024

Issue description

Portable Teleporter GUI doesn't update correctly after changing frequencies. The frequency is actually set after clicking though.

Base.Profile.2024.07.31.-.23.29.51.03.mp4

Steps to reproduce

  1. Get a portable teleporter and try to set a frequency.
  2. See that the GUI doesn't update but the frequency is set correctly.

Minecraft version

1.21 (Latest)

NeoForge version

21.0.145

Mekanism version

10.6.7 (Latest)

Other relevant versions

No response

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

@AndreyBali
Copy link

when you click the "Set" button, a packet is sent to the server with your selected frequency
then server changes nbt data(components) of your portable teleporter item, and send you a packet for it, but it never sends a packet for updating frequency, needed to update the gui

i dont know, how to correctly solve this problem, here is a few options:

  • (server) send update frequency packet alongside item update packet
  • (client) listen for item updates, and change frequency in gui, if item has changed
  • (client) when "Set" button is pressed, change frequency in gui, before sending a packet to the server (it will work fine, because "Teleport" button send a packet with selected frequency from client side)

in portable qio, frequency is read from item data
before this commit, portable teleporter's frequency was read from item data

i implemented the third solution for my friend, i can share the code and compiled mod, if anyone wants

*this information is at the moment of 10.7.7.64 release

@luan122
Copy link

luan122 commented Jan 20, 2025

when you click the "Set" button, a packet is sent to the server with your selected frequency then server changes nbt data(components) of your portable teleporter item, and send you a packet for it, but it never sends a packet for updating frequency, needed to update the gui

i dont know, how to correctly solve this problem, here is a few options:

  • (server) send update frequency packet alongside item update packet
  • (client) listen for item updates, and change frequency in gui, if item has changed
  • (client) when "Set" button is pressed, change frequency in gui, before sending a packet to the server (it will work fine, because "Teleport" button send a packet with selected frequency from client side)

in portable qio, frequency is read from item data before this commit, portable teleporter's frequency was read from item data

i implemented the third solution for my friend, i can share the code and compiled mod, if anyone wants

*this information is at the moment of 10.7.7.64 release

could you share it please?

@AndreyBali
Copy link

@luan122
i made a pull request #8328
you can compile https://github.com/AndreyBali/Mekanism/tree/portable_teleporter_fix and replace your mekanism mod with build/libs/Mekanism-1.21.1-10.7.7.homebaked.jar

i also uploaded compiled mod to mediafire: https://www.mediafire.com/file/rz5nbll2nkq5ynm/Mekanism-1.21.1-10.7.7.homebaked.jar/file
but its always better to check the code and compile it yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants