DecentHolograms icon indicating copy to clipboard operation
DecentHolograms copied to clipboard

Hologram update on teleport

Open SladeHazard opened this issue 1 year ago • 6 comments

Just making sure

  • [X] I made sure, this bug is not already known or reported.
  • [X] I believe, that this bug is fixable.

Reproduction

Teleporting even a little makes the hologram disappear and reappear for example if I typed /spawn like 3 times, which will make me teleport, all the holograms disappear and then appear again... this shouldn't happen. also happens if I only tp 1 block using /tp x y z

Solution

cancel hologram packet update on teleport

Server Version

LATEST! 1.12.2 Paper Java 11

Client Version

1.20.1

Plugin Version

2.8.3

Log

N/A tested with no other plugins

SladeHazard avatar Sep 22 '23 21:09 SladeHazard

LATEST! 1.12.2 Paper Java 11

This isn't a version... Actually use and give the output of /version to work with alongside any logs.

Andre601 avatar Sep 22 '23 21:09 Andre601

LATEST! 1.12.2 Paper Java 11

This isn't a version... Actually use and give the output of /version to work with alongside any logs.

git-Paper-1620 (MC: 1.12.2) LOG = https://hastebin.com/share/nitiwakibo.markdown

I can also confirm that this only happens with decentholograms and not other plugins such as hdisplay on packets mode

SladeHazard avatar Sep 23 '23 17:09 SladeHazard

Hello, I have the same issue and I want to know how to fix it because I'm trying to do tasks that require a lot of teleports and it is annoying that holograms disappear and appear all the time.

Server Version

git-Paper-261 (MC: 1.20.2)

Client Version

1.20.1

Plugin Version

2.8.6

davidgb8246 avatar Jan 05 '24 19:01 davidgb8246

I was looking at this a bit and as it seems is this an intentional behaviour of DecentHolograms.

It's due to some MC versions having the annoying issue that entities despawn/disapear when a player respawns or even just teleports (The distance doesn't matter here), causing them to permanently disappear, so DH is calling hideAll to hide all holograms for the player, which then reappear in the next update cycle, which is that quick disappearing and reappearing you encounter.

This is the code in question doing it. The description I just gave is available above in the onRespawn method. https://github.com/DecentSoftware-eu/DecentHolograms/blob/e4c979c31f37beeb3c1d97283623553b2ec849df/src/main/java/eu/decentsoftware/holograms/api/listeners/PlayerListener.java#L56-L60

To make this issue less annoying would DH need some changes:

  • It would need to know what version a player uses, which is easier said than done... We can't just assume every player has the same version, thanks to ViaVersion and alike. Obviously could we hook into ViaVersion, if present and enabled, to check the version, but then we would also need to have support for ProtocolSupport and all other plugins that do a ViaVersion-like job, so a more generic aproach would be better here which could be quite difficult.
  • We would also need to know what versions exactly do have this bug/issue, so that the workaround only applies to those... This too is hard to figure out, as it would need testing pretty much every version that DH officially supports which can be a lot. Help on this one is apreciated.

Those are the things I managed to figure out myself so far. D0by may have some more input on this.

Andre601 avatar Jan 05 '24 20:01 Andre601

  • We would also need to know what versions exactly do have this bug/issue

but how did you know in the first place that certain versions have this bug/issue without knowing what versions have them

SladeHazard avatar Jan 06 '24 06:01 SladeHazard

I tried removing the respawn eventhandler, on a spigot 1.12.2 server, with 1.8.9 client. teleporting a lot had no effects on the hologram, but killing myself instantly broke them after respawning, however 2 holograms did always come back, while others didn't. tested this multiple times

SladeHazard avatar Jan 06 '24 17:01 SladeHazard

Hello, this issue has been resolved in DH v2.8.9. I added a new option in config.yml called update-visibility-on-teleport, which is set to false by default.

d0by1 avatar Jun 29 '24 14:06 d0by1