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

Hologram feature questions #4

Open
SlimeDog opened this issue Feb 13, 2023 · 9 comments
Open

Hologram feature questions #4

SlimeDog opened this issue Feb 13, 2023 · 9 comments

Comments

@SlimeDog
Copy link

SlimeDog commented Feb 13, 2023

A 1.19.4 text_display entity can employ the following attributes:

  • Lock the orientation of the entity, so that it doesn't rotate to face the player
  • Locate the entity inside a block, but allow it to show through
  • Add a shadow
  • Make the background transparent
  • And many others -- see https://minecraft.fandom.com/wiki/Display_Entities

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

  • The text is located just inside the block, with shadow and invisible background.
  • In the last image, the holographic entity is located on the left face of the block, so is invisible to the player.
@d0by1
Copy link
Member

d0by1 commented Feb 13, 2023

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
Copy link
Author

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
Copy link
Author

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

@SlimeDog
Copy link
Author

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

@Andre601
Copy link

Andre601 commented Feb 17, 2023

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
Copy link

Andre601 commented Feb 17, 2023

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:

  • Rotation ("Billboard" in NBT): Controls rotation of text and can be fixed (No movement), horizontal (Fixed on vertical, but moves horizontal), vertical (fixed on horizontal, but moves vertical) or center (pivots around center.
  • Brightness: Not sure if text is affected
  • Height: The max height used to determine when to cull entity. 0 means no culling
  • Width: Same rules as height.
  • View distance: Max distance of the entity to be viewable.
  • Alignment: Text alignment. Can be center (default), left or right.
  • Background: Background colour in ARGB. Values below 0.1 alpha are treated as transparent.
  • Default Background: Whether default background (Same as chat) should be used. Overrides Background colour option.
  • Line Width: Max line width before splitting text on a new line. Defaults is 200
  • See through: Whether text can be seen through blocks.
  • Shadow: Whether text has a shadow.
  • Text opacity: Value between -128 and 127, determines text opacity (Values below 26 are treated as transparent. -1 is treated as 255)

Item:

  • Has for the most part the same options as text with exception for
    • Alignment
    • Background
    • Default Background
    • Line Width
    • See through
    • Shadow
    • Text opacity
  • Item Display: What view model of the item should be displayed (i.e. first person left hand, FP off-hand, ...)

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:

  • Lock Rotation
  • Toggle see through blocks
  • Text alignment (And by extension multi-line text)
  • Toggle Background visibility

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
Copy link
Author

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
Copy link

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
Copy link
Author

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.

JesusChrist69 added a commit to JesusChrist69/DH3-GitActions-test that referenced this issue Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants