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

[Bug] MC-26757 fix does not appear to account for if text has many lines or if there is too much text #106

Closed
2 tasks done
mattp12 opened this issue Jun 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@mattp12
Copy link

mattp12 commented Jun 14, 2022

Bug Description

The MC-26757 fix fixes text going off-screen. However, it does not seem to fix situations in which there are many new lines or if there is too much text.

An example of a command you can run to get many new lines:

/give @p ice{display:{Lore:['{"text":"a"}','{"text":"b"}','{"text":"c"}','{"text":"d"}','{"text":"e"}','{"text":"f"}','{"text":"g"}','{"text":"h"}','{"text":"i"}','{"text":"j"}','{"text":"k"}','{"text":"l"}','{"text":"m"}','{"text":"n"}','{"text":"o"}','{"text":"p"}','{"text":"q"}','{"text":"r"}','{"text":"s"}','{"text":"t"}','{"text":"u"}','{"text":"v"}','{"text":"w"}','{"text":"x"}','{"text":"y"}','{"text":"z"}']}} 1

Screenshot_1

Additionally, if there is too much text, the text can go off-screen if the item is placed too far to the side. I believe a solution would be to wrap the text if it goes on too long.

/give @p ice{display:{Lore:['{"text":"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}']}} 1

Screenshot_2

How to Reproduce?

Run commands from bug description and observe results.

Expected Behavior

For the item descriptions to not go off-screen.

Version

2.0.0

Mod Loader Version

1.19 0.14.7

Mod Loader

Fabric

Logs or additional context

No response

Has not been reported.

  • I made sure this bug hasn't already been reported.

Is on most update to date version.

  • I made sure I am using the most up to date mod loader and mod version.
@mattp12 mattp12 added the bug Something isn't working label Jun 14, 2022
@isXander
Copy link
Owner

I improved behaviour vertically to try to fit the tooltip on the screen unless it goes off the top.
image

@isXander
Copy link
Owner

I have also now improved behaviour horizontally by doing the same thing. If the tooltip goes off the screen to the left too much it caps it so you can always read the first bit.
image

@isXander
Copy link
Owner

Text wrapping is something I really want to avoid because

  1. it's really hard to get right
  2. in some cases a mod or server could utilise this issue

So I think is will suffice for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants