OptiGUI

OptiGUI

7M Downloads

Custom name is still broken

opekope2 opened this issue ยท 8 comments

commented

It was never fixed. The client always forgets NBT information as soon as block entities get unloaded.

commented

Apparently, the server doesn't send the NBT after restarting, so it's still broken

commented

This mod on server resolve the issue
https://modrinth.com/mod/know-my-name

commented

I haven't seen this mod, thanks for sending it.
Also, custom names appear on the top of the GUI, which should work on a vanilla server.
I tried to use a method to query nbt of a block entity (similar to what F3+I does), but that requires some permissions (which is not always granted).
There was a time when the OptiGUI code world run on the server side, which kind of worked on a local world, but not on a remote server. This feature was not intended and OptiGUI no longer does anything on server-side.

commented

Custom names are stored in NBT, which is sent by the server for most block entities, but not for chests.
Custom name matching works for most block entities, except for chests.

commented

Maybe you could add it in description just like animatica for people who want to solve that problem

commented

Yeah, I'll do it soon. Much easier to do, until I have time to fix this (and other bugs)

commented

We implemented the same fix into Purpur in July, so that OptiGUI could work

https://github.com/PurpurMC/Purpur/blob/ver/1.19.3/patches/server/0277-Send-client-custom-name-of-BE.patch

commented

Custom name is finally fixed by a workaround by using Interaction.screenTitle as a fallback, as seen on line 59:

https://github.com/opekope2/OptiGUI-Next/blob/2735ac588f0857ee04f1f03b4986f5060b817a28/src/main/kotlin/opekope2/optigui/internal/mc_all/Util.kt#L55-L61

I'll leave this here in case anyone wants to develop filters for OptiGUI.