DecentSoftware-eu / DecentHolograms3

[W.I.P] New, rewritten version of DecentHolograms
https://www.spigotmc.org/resources/96927/
GNU General Public License v3.0
6 stars 3 forks source link

Hologram feature questions #4

Open SlimeDog opened 1 year ago

SlimeDog commented 1 year ago

A 1.19.4 text_display entity can employ the following attributes:

Some of the attributes can be applied to block_display and item_display entities as well. It looks like all of this could be implemented as packet-based pseudo-entities.

Here is an example use case: Screen Shot 2023-02-12 at 5 58 26 PM Screen Shot 2023-02-12 at 5 59 27 PM Screen Shot 2023-02-12 at 6 00 06 PM

d0by1 commented 1 year ago

Hey, we have discussed this on our Discord server and I'm definitelly interested in these new features. It's just probably going to take a while for me to actually implement them into the plugin, as it is a lot of work. But I'm pretty sure it is, at one point, going to be a part of the plugin in some way. I guess we will just have to wait and see how this new feature is going to work when it gets released.

SlimeDog commented 1 year ago

Glad to hear. I look forward to seeing these features in DecentHolograms. I have been playing with the 23w06a snapshot, and it is quite exciting.

SlimeDog commented 1 year ago

The display entities (as of 23w06a) are missing a visibility attribute. Permissions-based visibility is an important feature in hologram providers like DecentHolograms.

SlimeDog commented 1 year ago

Please feel free to convert this issue into a feature request.

Andre601 commented 1 year ago

Mojang also added an invisible entity for interaction, where you can define a width and height. This can be very useful in DH for easier interactions as A) You wouldn't rely on multiple entities to interact with (Reduces possible client-lag for large amounts of entities) and B) you could keep the armor stands with a 0 hitbox and add the entity when a click action is applied (People did complain about issues with armor stands still having a hitbox).

It could perhaps even allow more precise per-line actions. Tho that would require proper alignment using specific off-sets from the armor stands and line height.

Andre601 commented 1 year ago

Also, just for the sake of having stuff at one place, here are infos regarding text and item display entities that may be of use for DH (Taken from wiki):

Text:

Item:

I personally feel like some of these things could be put as NBT stuff in the commands, if that would be a doable thing, as supporting all these things could become a tedious task in the end...

Tho, personally speaking, I feel like these options should be available through dedicated commands:

Speaking of multi-line. I think DH should by default use only one text entity and simply add new lines to it using the line-break features... Question would be how to handle line heights and such in these cases as it could be a bit more difficult to achieve if people want specific line heights... Perhaps make it that lines no longer have a line height set and when one is added, treat it as a new, separate text display.

SlimeDog commented 1 year ago

Speaking of multi-line. I think DH should by default use only one text entity and simply add new lines to it using the line-break features... Question would be how to handle line heights and such in these cases as it could be a bit more difficult to achieve if people want specific line heights... Perhaps make it that lines no longer have a line height set and when one is added, treat it as a new, separate text display.

At present, DH supports permission-based visibility of individual lines, so a single text with line-breaks would be significantly more difficult.

Andre601 commented 1 year ago

At present, DH supports permission-based visibility of individual lines, so a single text with line-breaks would be significantly more difficult.

I honestly have my doubt too many are using it... Tho, perhaps a system could be worked out where DH would keep text in the same display entity and only splits into new ones when specific settings (line height, permission, etc) are applied... Idk, I just feel like keeping one display entity were possible is a good idea, especially when it makes things like text alignment a lot easier to achieve.

SlimeDog commented 1 year ago

keeping one display entity were possible is a good idea, especially when it makes things like text alignment a lot easier to achieve

Agree with all of that. A sample of one: I don't use separate text lines.